MSDB cleanup

  • I'm looking at ways to cleanup MSDB database, ex: job history, maintenance plan history, DTS logs, etc...

    I've found SP commands to remove history for jobs and maintenance plans but the SP don't allow date filters (all or nothing). Do you know if anything is already written that I might use or modify for my purpose??

    Also for DTS logs, I've found in BOL the RemoveAllLogs entry but it's not a SP. Any ideas how to use this function?? I'm fairly new to SQL and have had only Administration class for SQL. Any help is appreciated.

    Thanks,

    Curtis

  • Check the script library here. You can delete from teh tables (not recommended). I believe that there are some things that are limited in history, i.e. maintenance plans and clean up after themselves.

    Is there a reason you need to do this?

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/

    http://www.dkranch.net

  • Steve, thanks for the response... Yes to your question... My MSDB db is > 4gb and 1 table (sysdtspackages) has reserved and data size of > 4gb. I wanted to know how to clean up this table.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply