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)
 exec DTS from a storedProc

Author  Topic 

Hommer
Aged Yak Warrior

808 Posts

Posted - 2007-02-09 : 14:09:01
Hi,

Does any body know an example of executing a DTS apckage from within a custom stored procedure?

There is no input parameter.

I think I have to use xp_cmdshell to call DTSRUN, but I would like to see an example.

Thanks!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-09 : 14:41:49
EXEC master.dbo.xp_cmdshell 'dtsrun -NpackageName -SserverName -E'

Run dtsrun /? from a cmd window to see its options.

Tara Kizer
Go to Top of Page

Hommer
Aged Yak Warrior

808 Posts

Posted - 2007-02-09 : 16:56:31
Great, thanks!
Go to Top of Page

Hommer
Aged Yak Warrior

808 Posts

Posted - 2007-02-12 : 14:58:50
Well, I lied.
There may be an output parameter of it is possible.

I want to retrieve a result status of the DTS (Seccess/Fail) in the stored Proc then send it out to the calling program either as scalar value or output param.

I am sure this is possible. BOL even has this in the DTSRun.

[/W NT_event_log_completion_status]

Again, I am looking for an example of how to do it. Thanks!
Go to Top of Page
   

- Advertisement -