Hi,
Is it possible to find out the current status of a job (sql 2000 sql job),
i.e. whether it is idle/running/failed, etc
Thanks in advance!!Try giving select privilages to msdb..sysjobhistory and msdb..sysjobs
tables.
select name,run_status from msdb..sysjobhistory a,sysjobs b
where a.job_id=b.job_id
and name='name of the job'
explanation for run_status:- You could write a case statement with
run_status with below description.
0 = Failed
1 = Succeeded
2 = Retry
3 = Canceled
4 = In progress
Thanks
Hari
"AppleDopod" <hk_007@.hotmail.com> wrote in message
news:%23NlymnYUHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Hi,
> Is it possible to find out the current status of a job (sql 2000 sql job),
> i.e. whether it is idle/running/failed, etc
> Thanks in advance!!
>|||Please have a look at this script:
http://www.replicationanswers.com/D...unningJobs.txt. You can
use -- 1 = Executing, 2 = Waiting For Thread, 3 = Between Retries, 4 = Idle,
5 = Suspended, 6 = [obsolete], 7 = PerformingCompletionActions to modify
it
as you like.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
Showing posts with label etcthanks. Show all posts
Showing posts with label etcthanks. Show all posts
Wednesday, March 28, 2012
job status
Hi,
Is it possible to find out the current status of a job (sql 2000 sql job),
i.e. whether it is idle/running/failed, etc
Thanks in advance!!
Try giving select privilages to msdb..sysjobhistory and msdb..sysjobs
tables.
select name,run_status from msdb..sysjobhistory a,sysjobs b
where a.job_id=b.job_id
and name='name of the job'
explanation for run_status:- You could write a case statement with
run_status with below description.
0 = Failed
1 = Succeeded
2 = Retry
3 = Canceled
4 = In progress
Thanks
Hari
"AppleDopod" <hk_007@.hotmail.com> wrote in message
news:%23NlymnYUHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Hi,
> Is it possible to find out the current status of a job (sql 2000 sql job),
> i.e. whether it is idle/running/failed, etc
> Thanks in advance!!
>
|||Please have a look at this script:
http://www.replicationanswers.com/Downloads/KillRunningJobs.txt. You can
use -- 1 = Executing, 2 = Waiting For Thread, 3 = Between Retries, 4 = Idle,
5 = Suspended, 6 = [obsolete], 7 = PerformingCompletionActions to modify it
as you like.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
Is it possible to find out the current status of a job (sql 2000 sql job),
i.e. whether it is idle/running/failed, etc
Thanks in advance!!
Try giving select privilages to msdb..sysjobhistory and msdb..sysjobs
tables.
select name,run_status from msdb..sysjobhistory a,sysjobs b
where a.job_id=b.job_id
and name='name of the job'
explanation for run_status:- You could write a case statement with
run_status with below description.
0 = Failed
1 = Succeeded
2 = Retry
3 = Canceled
4 = In progress
Thanks
Hari
"AppleDopod" <hk_007@.hotmail.com> wrote in message
news:%23NlymnYUHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Hi,
> Is it possible to find out the current status of a job (sql 2000 sql job),
> i.e. whether it is idle/running/failed, etc
> Thanks in advance!!
>
|||Please have a look at this script:
http://www.replicationanswers.com/Downloads/KillRunningJobs.txt. You can
use -- 1 = Executing, 2 = Waiting For Thread, 3 = Between Retries, 4 = Idle,
5 = Suspended, 6 = [obsolete], 7 = PerformingCompletionActions to modify it
as you like.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
Subscribe to:
Posts (Atom)