Solved

housekeeping of the MSDB

Posted on 2012-04-10
6
673 Views
Last Modified: 2012-08-17
Dear all,

AS the MSDB keep all the:

1)Backup and restore history,
2)SQL server agent job history.
3)Maintenance plan history.

and if we do not purge that regularily, the backup task will run longer and longer.

Any script to run on how many days of all of the above kept so that we know how many days only history we should keep?

DBA100.
0
Comment
Question by:marrowyung
6 Comments
 
LVL 21

Assisted Solution

by:Jason Yousef, MS
Jason Yousef, MS earned 125 total points
ID: 37829754
0
 
LVL 28

Assisted Solution

by:Ryan McCauley
Ryan McCauley earned 125 total points
ID: 37830077
We do this cleanup as a step in our Maintenance plans, not as a separate job, but there's no reason you couldn't. Also, the amount of data generated is relatively small - while I'm not saying it's a good idea to never maintain it, it's small compared to the logging data generated elsewhere on your server, and I've never seen a case (even on servers that aren't maintained at all) of a large MSDB or out of control agent logs slowing down job execution.

Maybe I'm sheltered, but I wouldn't put too much stress on this - adding a "Maintenance Plan Cleanup" task, as mentioned above, should accomplish what you're looking for, even if you keep a few months worth of logs.
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 125 total points
ID: 37830649
1)  sp_delete_backuphistory
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 42

Accepted Solution

by:
EugeneZ earned 125 total points
ID: 37830786
0
 
LVL 1

Author Comment

by:marrowyung
ID: 37850659
let me check and get back to you all soon.
0
 
LVL 1

Author Closing Comment

by:marrowyung
ID: 38307279
we don't consider this option right now ! it should be the housekeeping job for the rest of the DB instead of the MSDB one.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now