Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

View ALL job History Expand / Collapse
Author
Message
Posted Wednesday, October 12, 2011 7:54 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, September 30, 2014 7:10 AM
Points: 251, Visits: 225
It seems a while back I had a script that showed me all job history EVER on the server. I know I can view the job history for the amount of time I've specified in the job history log but is there some way to view job history for a job since the job was created?
Post #1189152
Posted Wednesday, October 12, 2011 10:43 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:16 PM
Points: 10,381, Visits: 13,441
SQL Server Agent only stores a limited number of rows of history total and per job. That can be set using SSMS on the History tab of the SQL Server Agent properties or by running:

USE [msdb]
GO
EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=10000,
@jobhistory_max_rows_per_job=1000
GO

The default values are 1000 and 100, so you'll likely have a limited history available to you unless you changed those settings.




Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #1189313
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse