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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running jobs 1

Status
Not open for further replies.

Skittle

ISP
Sep 10, 2002
1,528
US
Is there a way of listing all jobs currently running on SQL server? For example I have scheduled jobs running all the time but it would be handy to get a list up on screen showing those currently executing.
 
I believe this may do the trick!


SELECT Job_ID = j.Job_ID,
Job_Status = h.Run_Status,
Run_Date = h.Run_Date,
Run_Time = h.Run_Time,
Job_Name = convert(char(80),j.Name),
Step_Name = h.Step_Name
FROM MSDB.dbo.SysJobHistory AS h
INNER JOIN MSDB.dbo.SysJobs AS j ON (h.Job_ID = j.Job_ID)
INNER JOIN MSDB.dbo.SysCategories AS c ON (j.Category_ID = c.Category_ID)
WHERE h.Run_Status = 4


Thanks

J. Kusch
 
Thats cool.

Thanks. I'm surprised there isn't an option to list jobs running and you have to build your own command though.

Regards

 
Just to point out, if you view the job list thru Ent Mgr then it shows you the current status and you can see the ones which are running. I take it you've seen that?

--James
 
James,

no I havn't seen it.
How do I get to it?

 
In Ent Mgr, expand:

-server
--management
---sql server agent
----jobs

--James
 
I've been away for a while so left this thread hanging a bit. I can't find an 'event manager' on my SQL server setup. I have Enterprise Manager and SQL Service Manager but thats it. I am running version 8.0 of Enterprise manager.

Is the event manager within enterprise manager or is it a seperate program run from
Start---Programs--Microsoft SQL Server
from the start button of windows?

Feeling ignorant but the only way to solve it is to ask you guys.
 
Who said anything about "event manager"?!

"Ent Mgr" = Enterprise Manager. ;-)

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top