January 7, 2004 at 8:35 am
Hi
Is it possible to start a sql agent job on another server from the command line? e.g.
Or, is there a better way of doing this?
Thanks
Andy
January 7, 2004 at 9:01 am
If you have a link server entry, you can try something like...
LinkedServer.Master.dbo.sp_ExecuteSQL N'Exec SyJobExecute_sp ''JobName'', 0'
Once you understand the BITs, all the pieces come together
January 8, 2004 at 2:10 am
Thanks Thomas, I couldn't find syjobexecute, but I succesfully used:
linkedserver.Master.dbo.sp_ExecuteSQL N'EXEC msdb.dbo.sp_start_job @job_name = "Test Job"'
Andy
January 8, 2004 at 7:32 am
Yeh, sorry, that's my own build in SP, does some intermediate logging work etc.
Glad the "jist" of the idea worked for you.
Once you understand the BITs, all the pieces come together
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply