dbTalk Databases Forums  

xp_cmdshell

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss xp_cmdshell in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
anonymous
 
Posts: n/a

Default xp_cmdshell - 04-13-2005 , 09:20 AM






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
pass /N "DTS_Name" '

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: xp_cmdshell - 04-13-2005 , 01:18 PM






Yes

Look at the /A switch

"anonymous" <anonymous (AT) discussions (DOT) microsoft.com> wrote


Quote:
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
pass /N "DTS_Name" '


Reply With Quote
  #3  
Old   
anonymous
 
Posts: n/a

Default Re: xp_cmdshell - 04-13-2005 , 01:42 PM



If I have 3 variables should I listed like:
/A variable1 /A variable2 /A variable3?
Thanks

Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: xp_cmdshell - 04-13-2005 , 01:57 PM



Not quite.

Have a look at BOL


mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\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.


"anonymous" <anonymous (AT) discussions (DOT) microsoft.com> wrote


Quote:
If I have 3 variables should I listed like:
/A variable1 /A variable2 /A variable3?
Thanks


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.