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 |
|
squab
Starting Member
15 Posts |
Posted - 2004-07-29 : 05:31:04
|
| Hi allIs it possible to execute a DTS package (save as a VB script) from a stored procedure ?I have a constraint : my stored proc send parameters to the DTS script (that is the reason why I have choosen to use a VB script).Any ideas ?Thanks in advance,Best regards,SqUaB |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-07-29 : 06:07:57
|
| >> my stored proc send parameters to the DTS script Not sure what you mean. You can load the package, set the values (in fact configure anything in the package) then run it.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
squab
Starting Member
15 Posts |
Posted - 2004-07-30 : 04:50:04
|
| Hi nr,I will try to explain my pb (sorry for my bad english)I have this stored proc :PROCEDURE sp_Patrol_TransactionDetails @LastTransactionID integer, @ResultFile varchar(255)[...]In this SP, I need to script an export of a SQL request to a file (csv) but this export depends of the SP's parameters : the ResultFile is the full path for the exported file.Do you mean what I want ? So How I can make my script ? Do you have an example or a template ?Thanks a lotBest Regards,SqUaB |
 |
|
|
Hyukevain
Yak Posting Veteran
66 Posts |
Posted - 2004-07-30 : 05:06:48
|
| You can, use master..xp_CmdShell 'DTSRun .......'See your SQL Server documentation for DTSRun if you want to use Global Variables, etc. |
 |
|
|
c000001
Starting Member
2 Posts |
Posted - 2004-08-04 : 02:04:50
|
| Hi,master..xp_CmdShell 'DTSRun ......., the way I do it now, except for xp_CmdShell, requires System Admin Rights for the user to execute, any way around it?RegardsDave |
 |
|
|
|
|
|
|
|