Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Execute Process task has amnesia!

Author  Topic 

banditking
Starting Member

5 Posts

Posted - 2006-07-04 : 14:17:06
I am trying to execute a batch file from the Execute Process DTS task. It runs fine, but everytime I log off Enterprise manager, stop MSSQLServer or reboot, the Execute Process task loses it! I have to open its properties and repoint it to the batch file in question every time (note the path was correct and so were the parameters before I opened the properties)! Others are complaining too but I cannot find a coherent reply to this problem.

http://groups.google.ca/group/microsoft.public.sqlserver.dts/browse_thread/thread/8055bf3e729ad6d8/7f4ec56e80b8426c?lnk=st&q=dts+execute+process+batch&rnum=10&hl=en#7f4ec56e80b8426c

banditking
Starting Member

5 Posts

Posted - 2006-07-04 : 14:28:56
More
http://groups.google.ca/group/microsoft.public.sqlserver.dts/browse_thread/thread/180498ca96ccc7d9/4bcc7bdfca55390c?lnk=st&q=%22Execute+Process%22&rnum=37#4bcc7bdfca55390c
Go to Top of Page

banditking
Starting Member

5 Posts

Posted - 2006-07-04 : 17:09:46
OK I figured this out somewhat. Drive letter! My Execute Process task was trying to run the batch file on E: drive - E:\somepath\mybatch.bat. The moment I moved this to C:\somepath\mybatch.bat everything was all right! Does anyone know how I can use any drive I want to instead of the default C:\ drive?
Go to Top of Page

banditking
Starting Member

5 Posts

Posted - 2006-07-04 : 18:06:10
Figured that one out too -


REM Important - change directory to current (any mapped drive)
CD /d %~dp0


http://weblogs.asp.net/whaggard/archive/2005/01/28/362729.aspx

Go to Top of Page
   

- Advertisement -