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

How to increase in TSQL the value for "Maximum job history rows per job" and "Maximum job history log size" Expand / Collapse
Author
Message
Posted Thursday, August 7, 2008 6:12 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 8:06 AM
Points: 36, Visits: 210
Hello,
I'm looking for the way to change default values for those two option in SQL Server Agent Properties :
Maximum job history log size : default to 1000
Maximum job history row per job : default to 100
And because I want to script those values I don't want to change it in EM but by using QA
I don't find any SP to change it and I don't know WHERE these default values are stored (which table ?).
Di someone could help me ??
Many thanks
Philippe
Post #548212
Posted Thursday, August 7, 2008 6:31 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 26, 2012 5:26 AM
Points: 1,367, Visits: 1,585
Le Rhun Philippe (8/7/2008)
Hello,
I'm looking for the way to change default values for those two option in SQL Server Agent Properties :
Maximum job history log size : default to 1000
Maximum job history row per job : default to 100
And because I want to script those values I don't want to change it in EM but by using QA
I don't find any SP to change it and I don't know WHERE these default values are stored (which table ?).
Di someone could help me ??
Many thanks
Philippe


USE [msdb]
GO
EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=2000,
@jobhistory_max_rows_per_job=200
GO


Regards,
Andras





Andras Belokosztolszki, MCPD, PhD
GoldenGate Software
Post #548234
Posted Thursday, August 7, 2008 7:35 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 8:06 AM
Points: 36, Visits: 210
Many thanks Andras,
I haven't seen this SP in BOL. The next time I'll search more in msdb to find an answers.
Regards
Post #548285
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse