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
 General SQL Server Forums
 New to SQL Server Programming
 system tables sysjobs and sysjobhistory

Author  Topic 

ConnieXujuan
Starting Member

48 Posts

Posted - 2012-01-10 : 23:44:33
Hi Folks,

I was just wondering what jobs would appear in system table [sysjobs] but not in table [sysjobhistory]?

Thanks a lot!

Connie

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-11 : 01:33:00
yep...if jobs have never run there wont be any history

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

ConnieXujuan
Starting Member

48 Posts

Posted - 2012-01-11 : 16:34:57
what if they are run; is it possible that a job has been run but the execution details did not go into table [sysjobhistory]?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-01-11 : 16:51:41
The data can be purged. We have a job that runs daily or weekly that purges out msdb history that is older than our retention period.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ConnieXujuan
Starting Member

48 Posts

Posted - 2012-01-11 : 17:55:46
So if it is purged, there must be a job that is purging the data right?

Thanks!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-01-11 : 18:04:52
Not necessarily. Someone could have manually done it or run the cleanup code.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ConnieXujuan
Starting Member

48 Posts

Posted - 2012-01-11 : 18:56:16
Thanks Tara!
Go to Top of Page
   

- Advertisement -