Wednesday, March 21, 2012

Query for current executing jobs

I have looked in several views in MSDB, trying to find a field that would
indicate a job is currently executing, but to no avail.
Can you tell me how I might query a server using T-SQL to determine if a job
is currently executing?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200709/1Try this one if you are on SQL Server 2000:-
msdb.dbo.sp_get_composite_job_info NULL, NULL, NULL, NULL, NULL, NULL, 1,
NULL, NULL
It might work on SQL 2K5 but I am not sure.
Hope this helps.
Manu
"cbrichards via SQLMonster.com" wrote:
> I have looked in several views in MSDB, trying to find a field that would
> indicate a job is currently executing, but to no avail.
> Can you tell me how I might query a server using T-SQL to determine if a job
> is currently executing?
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200709/1
>sql

No comments:

Post a Comment