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
 SQL Server Development (2000)
 Starting a DTS Package using Stored Procedures

Author  Topic 

kbrady
Starting Member

5 Posts

Posted - 2002-04-03 : 19:26:04
Is there a way to start a DTS package by using a Stored Procedure???

KSB

yakoo
Constraint Violating Yak Guru

312 Posts

Posted - 2002-04-03 : 21:37:03
There is a command line utility called DTSRun that will be able to run you DTS packages. For informaiton about DTSRun take a look in BOL.

You can than execute DTSRun in a stored procedure by issuing the following command


EXEC master..xp_cmdshell 'dtsrun /Sserver_name /Npackage_name /Uuser_name /Ppassword'


Hope this helps






Go to Top of Page

empire
Starting Member

40 Posts

Posted - 2002-04-03 : 23:06:23
One way to get the dtsrun command line is to use Enterprise Manager. Right click your DTS package and click 'Schedule Package' click ok on the date/time dialog. Go to SQL Server Agent/Jobs and dbl click the job you just created. Go to steps and the dtsrun for your package will be there, with the encrypted param.

Then you can use it in the xp_cmdshell call, and check BOL for additional param defs.

PS dont forget to delete the job you just scheduled.

Programmers are simple devices, put caffeine in, and get code out.
Go to Top of Page
   

- Advertisement -