Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL to start a job and wait until finished

Status
Not open for further replies.

bdiaz

Technical User
Jun 24, 2002
19
0
0
US
I need a Transact-SQL to start a SQL Server Agent job (using "exec sp_start_job @job_name='jjj'")and then wait until the job is finished, avoiding to read system tables directly. (for SQL 2000 and 7.0)
In other words, I'd like to wait until current_execution_status in sp_help_job is different from 1, but I am not able to write this in Transact-SQL statements

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top