all groups > sql server dts > april 2005 >
You're in the

sql server dts

group:

xp_cmdshell


xp_cmdshell anonymous
4/13/2005 7:20:00 AM
sql server dts:
I was able to run DTS using xp_cmdshell. In my dts I have
3 global variables which I would like to pass. Can I pass
a variable values using xp_cmdshell?
xp_cmdshell 'DTSRUN /S ServerName /U user/P
Re: xp_cmdshell anonymous
4/13/2005 11:42:58 AM
If I have 3 variables should I listed like:
/A variable1 /A variable2 /A variable3?
Re: xp_cmdshell Allan Mitchell
4/13/2005 6:18:38 PM
Yes

Look at the /A switch

[quoted text, click to view]
Re: xp_cmdshell Allan Mitchell
4/13/2005 6:57:24 PM
Not quite.

Have a look at BOL


mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\coprompt.chm::/cp_dtsrun_95kp.htm


/A global_variable_name:typeid=value

Specifies a package global variable, where typeid = type identifier for
the data type of the global variable. The entire argument string can be
quoted. This argument can be repeated to specify multiple global
variables. See the Remarks section for the different available type
identifiers available with global variables.

To set global variables with this command switch, you must have either
Owner permission for the package or the package must have been saved
without DTS password protection enabled. If you do not have Owner
permission, you can specify global variables, but the values used will
be those set in the package, not those specified with the /A command
switch.


[quoted text, click to view]
AddThis Social Bookmark Button