Dear,
I've created one batch probram(contains set of dos commands). Is it possible to call this progrm from the DTS package?
Does anyone know how to do it? please let me know.
Thnx in advance,
Hi,
I had followed the following steps and it works. You can try the same.
1) Create a test.bat file in c:\temp directory as follows.
@echo off
copy test.bat test1.bat
2) now at isql prompt write the following command and execute.
exec master..xpcmdshell "c:\temp\test.bat"
It will run the batch file and you will find a new file test1.bat in your c:\temp directory.
NOTE: Please be sure that you had created the test.bat file on the machine where sql server is running. Else if you want to create it on any other machine then follow the following steps.
Let us say your machine is 'myMachine' and it have a share name called temp which points to c:\temp
then,
1) Create a test.bat file on <myMachine> in c:\temp directory as follows.
@echo off
copy test.bat test1.bat
2) now at isql prompt write the following command and execute.
exec master..xpcmdshell "\\myMachine\temp\test.bat"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.