Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

housekeeping of the MSDB

Posted on 2012-04-10
6
Medium Priority
?
701 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 21

Assisted Solution

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

Assisted Solution

by:Ryan McCauley
Ryan McCauley earned 500 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 500 total points
ID: 37830649
1)  sp_delete_backuphistory
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 43

Accepted Solution

by:
Eugene Z earned 500 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

609 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