Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Global variable

Status
Not open for further replies.

fmt

Programmer
Aug 5, 2005
53
US
Hello,
I have a stotred procedure which grabs the parameter value from a table in a loop. I need to execute dts package and pass this parameter to it. I created a global variable and used the following sql statement

declare @run_me varchar(1000)
set @run_me = 'dtsrun /S devsql2k /U doctracking /P logjam /N agingreporttest /A "processingcenter:8=riverview1"'

EXEC devsql2k.master..xp_cmdshell @run_me


What am I doing wrong. How does DTS assign the parameter value to its global variable?

I am using SQL 2000.

Thanks
 
You may have your 'dtsrun....' syntax wrong. Try using the dtsrunui.exe utility. From the Run menu type in dtsrunui and generate your string that way.

Also try with quotes:

set @run_me = 'dtsrun /S "devsql2k" /U "doctracking" /P "logjam" /N "agingreporttest" /A "processingcenter":"8"="riverview1"'

Journeyman -- The Order of the Seekers of Truth and Penitence
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top