dbTalk Databases Forums  

Where does processing take place when executing a remote package?

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


Discuss Where does processing take place when executing a remote package? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #41  
Old   
Eric Bragas
 
Posts: n/a

Default Re: Where does processing take place when executing a remote package? - 03-11-2008 , 11:47 AM






OK, here's my code that modifies the Job on server 2. There's only
one step in that Job. I am including one global variable in the new
command, "gv_Table".

Dim oConn, strSQL
Set oConn = CreateObject("ADODB.Connection")
oConn.Open "Provider=sqloledb;Server=server2;Initial
Catalog=MSDB;Trusted_Connection=yes"

strSQL = "EXEC sp_update_jobstep "
strSQL = strSQL & "@job_name = 'pkg2', "
strSQL = strSQL & "@step_id = 1, "
strSQL = strSQL & "@command = 'DTSRUN "
strSQL = strSQL & "/S " & chr(34) & "server2" & chr(34) & " "
strSQL = strSQL & "/N " & chr(34) & "pkg2" & chr(34) & " "
strSQL = strSQL & "/A " & chr(34) & "gv_Table" & chr(34) & ":" &
chr(34) & "8" & chr(34) & "=" & chr(34)
strSQL = strSQL & DTSGlobalVariables("gv_Table").Value & chr(34) & "
"
strSQL = strSQL & "/W " & chr(34) & "0" & chr(34) & " "
strSQL = strSQL & "/E'"
' MsgBox strSQL
oConn.Execute strSQL
oConn.Close
Set oConn = Nothing


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.