Run "Execute Process Task" through a UNC path

  • Hello,

    I am trying to create a SSIS package and run a "Execute Process Task" to kick off a batch file sitting in a network folder.

    The DOS CMD doesn't support UNC paths, I have to have a map drive, but it's not necessarily true that the DBAs (who will run the package) will have the same map drive.

    Should DBAs and I have a same map drive pointing out the network folder?

    But it would be very difficult.

  • You can create another Execute Process Task to run a batch file that will map the drive, assuming that you can identify an arbitrary drive letter that won't otherwise be in use. This will get you there:

    net use [drive letter]: \\server\share /n

    Put this into a .bat file and call it from the new Execute Process task. If you're really tidy, you can clean up after yourself afterward and disconnect the drive (replace the /n switch with the /delete switch).

    hth,

    Tim

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • thanks Tim for your help,

    I had to talk with DBAs and had one drive mapped to the same folder.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply