• MattF - Wednesday, February 22, 2017 10:13 AM

    Thanks Sue its good to know the purging by date can be safely scripted. Its disappointing that an issue like this which can severely impact performance around a system database such as MSDB, has been left unaddressed.

    Well, that's not all of what you need to keep an eye on with msdb. Scheduling regular maintenance to address things like backup history, mail history, if you use maintenance plans they have history as well. It's one of those that seems to sneak up and bite everyone eventually. And then you know.
    To get some ideas, check the following article and read the comments as well since those address additional areas to monitor:
    The Importance of Maintenance on MSDB

    It's one of those things that you want to put on your list of things to do if you are responsible for SQL Server. Having scripts for jobs to cleanup msdb is important, especially for the reasons you have noted. In some cases there are stored procedures to help with this - but you still need to schedule them to run regularly. And sometimes, you will need to write your own. 

    Sue