Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Shrinking MSDB

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-18 : 09:23:05
bill writes "We dump our databases hourly. Because of this, the msdb database is growing quite rapidly. Can we reduce its size? For example, is there a way to delete all trans-log dump related records from msdb that are older than 1 month?

Bill Salkin

Question to Editor: How am I to know in which forum this question (hopefully with an answer) will be placed?"

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2002-06-18 : 11:02:35
You can remove old backup and restore records from the MSDB database by running the sp_delete_backuphistory stored procedure, like this

USE msdb
EXEC sp_delete_backuphistory [ @oldest_date = ] 'oldest_date'

If you have lots of entries, you should sent the @oldest_date appropriately and run in batches, as this will take a while to complete.
Go to Top of Page
   

- Advertisement -