Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Data - SQL Agent Jobs

Author  Topic 

rwlopez
Yak Posting Veteran

80 Posts

Posted - 2007-09-17 : 12:19:44
I am trying to write a query that will show me data about SQL agent jobs that I have scheduled. I would like to create a report that shows the results of SQL Agent jobs. Is there a system table or SP that I can use to get this information?

nathans
Aged Yak Warrior

938 Posts

Posted - 2007-09-17 : 13:41:17
You can learn all about these in BOL... start with the SQL Server Agent tables:

http://msdn2.microsoft.com/en-us/library/ms181367.aspx

Nathan Skerl
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-09-17 : 14:14:27
select * from msdb..sysjobhistory

only job that is finished is stored here, not pending nor current.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

rwlopez
Yak Posting Veteran

80 Posts

Posted - 2007-09-17 : 14:31:43
Thanks, This exactly is what I was looking for.
Go to Top of Page
   

- Advertisement -