x

How do I clear job history from SQL Agent

My job history appears to be large, how do I clear it? Can I limit it's growth?

more ▼

asked Oct 30, 2009 at 11:03 AM in Default

avatar image

Steve Jones - Editor ♦♦
5.1k 79 93 87

Its quite important to do this. MSDB lacks indexes in may places and keeping the tables small can help improve performance of tools accessing items such as job history.

Oct 30, 2009 at 11:51 AM James Moore
(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Clearing: SQL Server Agent > Jobs > Select the Job > Right mouse click (View History) > Highlight one or more log file summary from the list > Delete

Limiting the growth: SQL Server Agent > Properties > History > Automatically remove agent history older than …

more ▼

answered Oct 30, 2009 at 11:19 AM

avatar image

Mansour Shoari
435 14 17 20

(comments are locked)
10|1200 characters needed characters left

You can also call the stored procedure sp_purge_jobhistory

more ▼

answered Oct 30, 2009 at 11:49 AM

avatar image

Kev Riley ♦♦
64.2k 48 62 81

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x107
x100

asked: Oct 30, 2009 at 11:03 AM

Seen: 4237 times

Last Updated: Oct 30, 2009 at 11:03 AM

Copyright 2016 Redgate Software. Privacy Policy