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)
 Can I launch a DTS from a SPROC?

Author  Topic 

SMerrill
Posting Yak Master

206 Posts

Posted - 2002-05-15 : 22:03:52
Can I launch a DTS from a SPROC?

--SMerrill
Seattle, WA

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-05-15 : 22:11:55
Sure! Set up the DTS package and you can run it using the dtsrun command line utility (this is in fact what happens when you schedule a DTS package to run as a job) You run dtsrun using the xp_cmdshell system procedure.

The syntax is like this:

execute master..xp_cmdshell 'dtsrun /Npackagename /Sservername /Uusername /Ppassword'

Just change the names to match what you're using and you're all set.

This is fully documented in Books Online if you need more info on the parameters.

Go to Top of Page
   

- Advertisement -