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.
Author |
Topic |
petek
Posting Yak Master
192 Posts |
Posted - 2008-07-25 : 07:20:50
|
Hi All, I have not come across yet and it may be a easy question for you, but how do i call a DTS package from a stored procedure.Kind RegardsPete. |
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2008-07-25 : 12:21:51
|
You can use xp_cmdshell to call the DTSRUN ... check out books online for DTSRUN..Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-07-26 : 18:47:08
|
Another way is create a sql job for the package and run it with msdb..sp_start_job in sp. |
|
|
petek
Posting Yak Master
192 Posts |
Posted - 2008-07-28 : 09:25:32
|
thankyou that was great.Kind RegardsPete. |
|
|
petek
Posting Yak Master
192 Posts |
Posted - 2008-08-06 : 07:18:35
|
Hi all,i am trying to run:declare@cmd nvarchar(1000),@servername nvarchar(20)set @servername=@@servername set @cmd='dtsrun /S'+@servername+' /GrandfatherRights_ExportDataFromHoldingTable /EMicrosoft OLE DB Provider for SQL Server'exec master..xp-cmdshell @cmd, no_outputbut get the following error:Server: Msg 170, Level 15, State 1, Line 8Line 8: Incorrect syntax near 'cmdshell'.Kind RegardsPete. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-06 : 08:18:26
|
xp-cmdshell should be xp_cmdshellMadhivananFailing to plan is Planning to fail |
|
|
|
|
|