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 |