Using UNC Path With Execute Process Task

I have an Execute Process task in which the process can either delete, get or put files to an SFTP site. The executeable takes arguments in the following format:
"host" "user" "password" "put" "full local path/filename" "full remote path/filename"
I have the task configured as follows:
RequireFullFileName: True
Executeable: \\server\groups\Development\ETLFiles\ETL_Utilities\ocsshhelper\ocsshhelper.exe
Arguments: sftp user password \\server\groups\Developmement\ETLFiles\ETL_Data_Files\CT_FS_Export_20081113.csv stateExport\export
WorkingDirectory: \\server\groups\Development\ETLFiles\ETL_Utilities\ocsshhelper
WindowStyle: Hidden
Arguments, Executeable and WorkingDirectory have been configured as Expressions. When I execute the package in BIDS from my Windows  XP SP3 machine, The task fails with the following error:
[Execute Process Task] Error: In Executing "\\server\groups\Development\ETLFiles\ETL_Utilities\ocSSHHelper\ocsshhelper.exe" "sftp user password put \\server\groups\Development\ETLFiles\ETL_Data_Files\CT_FS_Export_20081113.csv stateExport\export" at "\\server\groups\Development\ETLFiles\ETL_Utilities\ocSSHHelper", The process exit code was "-532459699" while the expected was "0".
My domain account has 'effective' full control rights to the location of ocsshhelper.exe.
It could be that the executable does not support UNC paths, and I'm checking that. I have another package that uses this same application, but uses the physical path, and there are no problems. Does the Execute Process task have issues with UNC paths?
Thank you for your help
cdun2

Actually it doesn't work properly in SQL Server 2008 R2.  I have a similar EP task.  If I set the working directory to \\server\share\subdir the task fails. However, if I map a drive latter to the \\server\share and set working directory to <drive>:\subdir
it works

Similar Messages

  • Using UNC paths with Safari

    Hi All
    I am probably going to look stupid here but.... How do you use a UNC path in Safari?
    When I type in \\myserver\ looking for a local server Safari converts it to http://myserver/ which obviously gives me a totally different result. Just used to doing this in i.e. and use it alot in my daily job.
    Any advice appreciated?
    Many thanks
    TSM

    You should file enhancement request regarding this issue to https://bugreport.apple.com. However I doubt Apple developers implement it since other tested browsers like Firefox and Opera don't support this paths either.

  • NOT able to call exe in ssis execute process task

    I am creating an SSIS package in which we execute an exe file from the EXECUTE PROCESS COMPONENT which contains the logics and uses few sp’s which checks the expiry dates of the certificates of some URL's. But when we keep the file on sever and run it through
    TWS it is showing the error "FILE NOT IN PATH" .But if we keep the exe file in local path then it executes through TWS. If we run the package locally without TWS then it runs successfully no matter if the exe is in local path or placed in a shared
    server folder. So i want to know is there any constraints in running the EXE file from the shared folder through TWS.
    Note:
    1.TWS- IBM Tivoli workload scheduler to call and execute ssis packages
    2. TWS is install in different server (Like server A)
    3. SSIS package and exe file located in different server (Like server B)
    4. We are using dynamic path in SSIS package to locate SSIS package and exe file.

    Hi SR_MCTS,
    According to your description, a package that execute an exe file with Execute Process Task can be executed successfully without using TWS or the exe file stores in local path with TWS. While it fails when use TWS to execute the package with the exe file
    stores in shared folder.
    If in this scenario, it seems that the logon user that use TWS to execute the package has no access to the shared folder. We can logon as the relevant account or change some relevant settings on TWS to make sure the user has access to shared folder which
    hosts the exe file.
    Besides, since I’m not familiar with TWS, I’m not sure whether the issue is caused by there are some constraints in running the exe file from the shared folder through TWS. As to this issue about TWS, I suggest you post the question in the following forum:
    https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000002658&tags=tws. It is appropriate and more experts will assist you.
    Thank you for your understanding.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Pass Passord Variable to a Batch File using Execute Process Task

    I have an FTP batch file that I want to execute using Execute Process Task. The content of the ftp (ftpscript.cmd) is as below:
    open ftpsite
    UserName
    Password
    ASCII
    get file  c:\temp\test.txt
    bye
    Using SSIS Execute process task, I was able to download data. I configured the Execute Process task as follows:
    Executable: ftp.exe
    Arguments: -s:"c:\temp\ftpscript.cmd"
    The above works fine. But the problem is that I don't want to store the password value in the batch file for security/policy reasons. Please, is there a way I can pass the password value to the ftp executable or the batch file at run time?
    I know how to get and store variables in SSIS but I don't know how to pass this kind of variable to the batch file just before execution.
    Any suggestions will be appreciated. Thanks.

    you can dynamically generate the source (CMD) for the FTP and delete after the execution. The password can be stored in a secure database for example, not 100 % secure, but the best you can do.
    Another option I did was an encrypted VBScript (also quite easy to open in plain text to some people).
    Finally it can be a binary e.g. an EXE with the FTP called as process in it.
    Arthur My Blog

  • SSIS-Execute Process task Error in 2012 version _File/Process "\\Servername\Foldername\batfile.bat" is not in path

    Hi Sir,
    I have develop the SSIS Package in 2012 version and i am calling the SSIS Package using Stored Procedure according to my requirement and that stored procedure will be using in my SSRS report Datasource.
    once after the SSIS Pacakge has design and develop and deploy into the server as Project Deployment model..when i run the ssis Package ,calling through the SP it is working fine...
    even when i design a SSRS report  using SSDT(sql server data tools),  in the SSRS reprot calling the above SP in Dataset.when i execute the SSRS report it is wroking fine...
    once SSRS report has been deployed into the  remote Server.. when i Execute the SSRS report i am getting the below Error message:
    SSIS-Execute Process task Error  _File/Process "\\Servername\Foldername\batfile.bat" is not in path
    belo is the SP for calling the SSIS package.
    DECLARE @EXECUTION_ID BIGINT,
            @PKG_RESULT INT
    EXEC [SSISDB].[CATALOG].[CREATE_EXECUTION] @PACKAGE_NAME=N'abc.DTSX',
                                               @EXECUTION_ID=@EXECUTION_ID
    OUTPUT,
                                               @FOLDER_NAME=N'aa',
                                               @PROJECT_NAME=N'xxx',
                                               @USE32BITRUNTIME=FALSE,
                                               @REFERENCE_ID=29 --unique identifier for environment
    EXEC [SSISDB].[CATALOG].[START_EXECUTION] @EXECUTION_ID

    Where the BAT part is ?
    It looks like a security issue.
    The account running has no permission apparently over "\\Servername\Foldername\batfile.bat"
    Arthur My Blog

  • SSIS-Execute Process task Error _File/Process "\\Servername\Foldername\batfile.bat" is not in path

    Hi Sir,
    I have designed the SSIS Package in 2012 Version. and i have deployed into the Integration Server,using Project Deployment Model.
    In the SSIS Pacakge we are calling the batch file using Execute Process task.
    when i am Executing the SSIS pacakge using Visual Studio(Sql Server Data tools) which is working fine.
    When i Execute the Pacakge uisng Sql server Management Studio,after the Deployment i am getting the below Error message.
    ExecProcess task:Error: File/Process "\\Servername\Foldername\batfile.bat" is not in path.
    Thanks for your time.
    Regards
    Prasad

    Hi Prasad,
    When you say executing the package in SSMS, I think you right click on the package and execute it manually rather than execute it through SQL Server Agent job, right? How did you execute the package from the SSMS on DEV server? Have your also deployed the
    SSIS project to the SSISDB catalog on DEV server or you used SSMS tool on DEV to connect to the QA server to execute the package?
    When you log into the Database Engine instance, make sure the credentials you used has access on the shared folder which hosts the .bat file. Besides, I think the issue may be caused by the Windows UAC feature which may lower the permissions level of an
    administrator to a standard user. So, I suggest that you run the SSMS as administrator to see if it works.
    Regards,
    Mike Yin
    TechNet Community Support

  • SSIS - How to run command line to copy files with User Variables within a Execute Process Task

    Hello,
    I'm am having syntax issues within the Arguments when trying to copy a file with cmd.exe using User Variables.
    It works when I hard code the arguments : /c copy /b  "\\folder1\file.txt" "\\folder2\file.txt"
    However, it's failing when I try using User Variables to replace the directory and file.
    User::FILES = \\folder1\file.txt
    User::FILE_NAME = file.txt
    "/c copy /b + @[User::FILES] + \" \\\\folder2\\" + @[User::FILE_NAME]"
    Does anybody know what's wrong with my syntax?
    Thanks!

    Hi SSISBeginner,
    Assuming the source file is "C:\Temp\Source\file.txt", the destination folder is "C:\Temp\Destination", the expression of FILES variable is "C:\Temp\Source\file.txt", and the expression of FILE_NAME variable is file.txt. Then, we can use the following
    expression for the Argument property of the Execute Process Task:
    "/C COPY /B "  +  @[User::FILES] + " C:\\Temp\\Destination\\" +   @[User::FILE_NAME]
    Note: Pay attention to the spaces in the double quotes in the expression.
    Regards,
    Mike Yin
    TechNet Community Support

  • Calling Remote Batch File Using 'Execute Process Task'

    I have a remote batch file on machine B that I need to execute using 'Execute process task' control from a package on machine
    A.
    How can i achieve this...

    You also need to make sure you run the job using a domain account proxy http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/
    Arthur
    MyBlog
    Twitter

  • Execute Process Task showing all the SSIS Config variables in SQL Job History

    Hi,
    Am using an Execute Process task to execute my child package. And executing the Parent package from a SQL JOB.
    I am using the same config file for both Parent and Child packages.
    After the Job execution was Successful / Failure, in Job history it is showing all the variables from Config file which are not using in Child package. With the below message.
    "The package path referenced an object that cannot be found"
    I don't want to catch all the Variables information in Job History. Instead I need only the Success / Failure message.
    PFA Screen.
    Thanks,
    Sailaja

    see
    http://www.mssqltips.com/sqlservertip/1417/custom-logging-in-sql-server-integration-services-ssis/
    https://www.simple-talk.com/sql/ssis/ssis-event-handlers-basics/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Ssis execute process task error: process exit code was 1 while the expected was 0

    Hi Sir,
    in my SSIS Package(2012) i am using Execute Process Task which will call bat file.  bat file is located on UNC Path.i am having  the below script in the batch file.
     del \\servername\foldername\name.txt
     rcmd \\servername D:\name1.bat
     del \\servername\foldername\name2.txt
    xcopy \\servername\foldername\file.txt   \\server\foldername\outfilefolder
    i am getting the below error message:
    ssis execute process task error:  process exit code was 1 while the expected was 0
    i want know at what cases error exit code was 1?
    Thanks for your time.

    Hi prasad.alm,
    The error is generic and can be caused by various factors. Here are some suggestions for your reference:
    Manually run the executable to execute the batch file so that we can check whether the command lines in the batch file are correct or not.
    Check there are no duplicate/existing files in the destination folder.
    Try to run the package in 32-bit or 64-bit runtime mode.
    If the issue occurs when running a job, try to create a CmdExec type job step to call the excutable. If this job also fails, it might be an issue between executable and SQL Server Agent rather than the SSIS package itself.
    If the issue persists, enable logging for the package, and check if we can obtain more detailed error message for further analysis.
    Regards,
    Mike Yin
    TechNet Community Support

  • Execute Process Task :Executing DOS Command lines in Execute Process Task

    Hi All,
    I am trying to sftp files using Tectia Client from my local system. For that I have used the Execute Process Task in SSIS. First I open DOS command and try to instantiate the sftp3.exe.
    Then I write down the below command
    binary
    open username@hostname
    lcd C:\Test
    cd <Destination Path name>
    put test.txt
    How to execute the command in execute process task ?
    help is appreciated
    Thanks

    Hi ConnectDebz,
    According to your description and script example, do you use WinSCP.exe to perform the SFTP files transfer? If so, you should set the Executable of the Execute Process Task to the path of the WinSCP.exe, save the script in a .txt file and set the Argument
    of the Execute Process Task like “/script=C:\Temp\sftploader.txt” (without quotes).
    References:
    http://www.sqlservergeeks.com/blogs/raunak.jhawar/sql-server-bi/395/sql-server-sftp-with-ssis-execute-process-task 
    http://gregcaporale.wordpress.com/2012/02/23/using-sftp-in-sql-server-ssis/ 
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Execute process task

    Hi,
    Can you please let  me know the  list of the command prompt switches used in execute process task of SSIS for arguments with their functionality?

    It depends on what command prompt utility you're calling inside.Arguments property of Execute process task accepts arguments as defined in your utility which you're using inside it
    For example if you're calling bcp you can use all switches of bcp like -c ,-T,-S etc
    similarly for WinSCP you just need to pass -script = <Script File path> 
    So you cant standardize the arguments list
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Execute Process Task - Error :The process exit code was "2" while the expected was "0".

    I am designing a utility which will keep two similar databases in sync. In other words, copying the new data from db1 to db2  and updating the old data from db1 to db2.
    For this I am making use of the 'Tablediff' utility which when provided with server name, database, table info will generate .sql file which can be used to keep the target table in sync with the source table.
    I am using the Execute Process Task  and the process parameters I am providing are:
    WorkingDirectory : C:\Program Files (x86)\Microsoft SQL Server\90\COM
    Executable :      C:\SQL_bat_Files\SQL5\TC_CTI\customer.bat
    The customer.bat file will have the following code:
    tablediff -sourceserver "LV-SQL5" -sourcedatabase "TC_CTI" -sourcetable "CUSTOMER_1" -destinationserver "LV-SQL2" -destinationdatabase "TC_CTI" -destinationtable "CUSTOMER"  -f "c:\SQL_bat_Files\sql5\TC_CTI\sql_files\customer1" 
    the .sql file will be generated at:  C:\SQL_bat_Files\sql5\TC_CTI\sql_files\customer1.
    The Problem:
    The Execute Process Task is working fine, ie., the tables are being compared correctly and the .SQL file is being generated as desired. But the task as such is reporting faliure with the following error :
    [Execute Process Task] Error: In Executing "C:\SQL_bat_Files\SQL5\TC_CTI\package_occurrence.bat" "" at "C:\Program Files (x86)\Microsoft SQL Server\90\COM", The process exit code was "2" while the expected was "0". ]
    Some of you may suggest to just set the ForceExecutionResult = Success (infact this is what I am doing now just to get the program working), but, this is not what I desire.
    Can anyone help ?

    Jwelch,
    Thanks for the input,
    "Change the SuccessValue property of the Execute Process task from 0 to 2 (which means that you will get a failure if there are no differences, since TableDiff returns 0 in that case)."
               -- Not possible b'coz if there is no difference in the tables, which is also a possiblility, the job will fail.
    "FailTaskIfReturnCodeIsNotSuccessValue to FALSE (which means it won't fail regardless of the code returned)."
              -- Does this mean the job will never fail? Lets say the target table doesnt exist, then, by setting "FailTaskIfReturnCodeIsNotSuccessValue to FALSE " will the job fail? I guess my question is, how is what you've suggested different from setting "ForceExecutionResult = Success". Both the cases will show the task status "Success" even if there is an error.
    Is there a way to keep the property of job 'Failure' if there is any generic errors like target table not found or say, the path given for .sql file output is not valid etc.
    Thanks again,
    Little_Birdie.

  • Execute Process task Error

    Hi All
    when i am using the Process execute task in ssis it is failing with the fallowing error
    [Execute Process Task] Error: In Executing "C:\Program Files\PuTTY\pscp.exe" "echo y | pscp -sftp -pw Password
    [email protected]:/opt/DSC_6_0_R5/logs/metrics.csv C:\Users\Public\Documents\SurendraData\DRA\PSCPTest\server1A_metrics_SSIS.csv" at "C:\Program Files\PuTTY", The process
    exit code was "1" while the expected was "0".
    when i run the same command from cmd promt is succesful
    The command is
    echo y | pscp -sftp -pw Passwprd
    [email protected]:/opt/DSC_6_0_R5/logs/metrics.csv C:\Users\Public\Documents\SurendraData\DRA\PSCPTest\server1A_metrics_SSIS.csv
    In Execute Process task i have set the fallowing value
    Executeable  = C:\Program Files\PuTTY\pscp.exe
    Arguments  = echo y | pscp -sftp -pw Passwprd
    [email protected]:/opt/DSC_6_0_R5/logs/metrics.csv C:\Users\Public\Documents\SurendraData\DRA\PSCPTest\server1A_metrics_SSIS.csv
    Working directory = C:\Program Files\PuTTY
    what is the issue ? how to solve that
    Surendra Thota

    The " are necessary to pass in a path with spaces1 st try it in a script. See if that works. If not see this good tutorial: https://sqlserverrider.wordpress.com/tag/execute-process-task/
    or
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2013/03/04/integration-services-packages-using-execute-process-task-with-winzip32-exe-fails-intermittently-when-run-under-a-sql-server-agent-job.aspx
    Arthur My Blog

  • Execute Process Task configuration for WinSCP

    Hi Experts,
    I've been tasked to use WinFTP to pull files from an sFTP site to our local W2007 server using an SSIS Execute Process Task.  I'm trying to get the task to run a script containing the UN/PW and other info, text below.  The script works from the
    command line:
    Here's the Process window from the task:
    When I run the task, the error says Host "\script=C" does not exist.  Are there some special characters I need to use around the colon or something?  It's like the task isn't sending the complete path.
    Here's the text of the script, in case it matters.
    option batch abort
    option confirm off
    open sftp://User:Password@site
    get Media*2013.txt C:\FTP\
    get Media*2014.txt C:\FTP\
    close
    exit
    None of the recommended solutions I've found have worked for me.  Help!?! Please???
    Thanks in advance!

    Look at this example, i remeber doing this where  a profile needs to be created in advance via the console this profile then need to be accessed via the script, this link should help you it has an example belo
    http://winscp.net/eng/docs/scripting
    Look at this aswell
    http://winscp.net/eng/docs/guide_automation#script_file
    # Automatically abort script on errors
    option batch abort
    # Disable overwrite confirmations that conflict with the previous
    option confirm off
    # Connect using a password
    # open sftp://user:[email protected] -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
    # Connect
    open sftp://[email protected] -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
    # Change remote directory
    cd /home/user
    # Force binary mode transfer
    option transfer binary
    # Download file to the local directory d:\
    get examplefile.txt d:\
    # Disconnect
    close
    # Connect as a different user
    open sftp://[email protected]
    # Change the remote directory
    cd /home/user2
    # Upload the file to current working directory
    put d:\examplefile.txt
    # Disconnect
    close
    # Exit WinSCP
    exit
    Abhinav http://bishtabhinav.wordpress.com/

Maybe you are looking for

  • Faster way to get my own DVDs onto my iPod or iMovie

    I've tried DVDxDV and checked out Handbrake. They are both very slow, about 5 hours for a 1 hour DVD. Does anyone know of software out there that will rip my DVDs (personal, no copyright) onto my Mac?

  • Unicode in UNICHAR and UNICODE Excel Functions Is Decimal

    CASE # 12 64 08 79 83 Dear Microsoft Engineers, There is a lack of information in  Microsoft Support pages*, where UNICODE and  UNICHAR in Excel 2013 are out of real context, given that unicode is always hexadecimal. Please add a notice on these page

  • Losing image when exporting from CS5 to PDF

    Hi All! I am working off of a file that was sent to me by our designer. I made a few small changes to some text and went to export to PDF and one (and only one) of my images is lost in the PDF! The image was originally embedding in a .idml (mark up)

  • IPhoto says it is importing when it isn't

    I was importing photos, it had the little bar that would progress as the photos were being imported. The bar was all the way full, as in it should be done importing. I let it sit for an hour and it never stopped so i took my SD card out. It still say

  • Calls via voip and SIP services with Fring app for free to anyone? help

    Dear macstrors, I have been hearing that you can make free calls to any mobile phones/land lines with the application called Fring. On the basis of SIP. I have been trying to set it up and register with a free sip provider but still no luck. there is