March 9, 2010 at 6:46 am
i have a job job1 in server1 which should get executed only if job2 in server2 finishes. to do this
i should add a step in job1 server1 which should check job2 server2 is running or not ..if it is running it should wait and should check after 1 hr untill the job2 in server2 finishes.
once the job2 in server 2 finishes then job1 in server1 should start
note.:i cannot add steps in job2 server2 what ever i have to do is with job1 server1
need sql scrit .......................
can any one help me??????????
thanks
March 9, 2010 at 6:56 am
The easy way to do this is write a script that checks if a particular job on your current server is still running. If that is the case, then you would wait, and loop back after the time expires to check again.
Then you have two choices for how to point this at the other server
1. Use a linked server
2. use SQLCMD as an OS command step type to execute this against the remote server. This is more complicated and needs a return value
March 9, 2010 at 8:00 am
can any one plzz provide me the script ....
i think the script sholuld use linked server and chk it in another server if the job is still running it should wait for 1 hr(waiting time can be done by retry attempts and retry intervels in advanced tab of job step properties.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply