Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running a command line prompt from a dts package 2

Status
Not open for further replies.

collierd

MIS
Dec 19, 2001
509
DE
Hello

I am using SQL Server 2000 on windows NT

Does anybody know the easiest way to automate the execution of a command from the dos prompt once a package has completed?

Thanks

Damian.
 
Create a batch file to run your command from the dos shell, then call it from the DTS package by creating an 'Execute Process Task', Specifying the name of the batch file.

Hope this helps,

Chris Dukes
 
as your last step in the DTS package youv'e created ... add a "Execute SQL Task" and in the SQL Statement box use the xp_xmdshell to do your DOS task. Thanks

J. Kusch
 
Sorry ... that was xp_cmdshell .... NOT xp_xmdshell. fat fingers this morning! Thanks

J. Kusch
 
JayKusch,

Although a solution, I would not suggest using the xp_cmdshell due to the power and security issues with xp_cmdshell.

Chris Dukes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top