June 23, 2008 at 4:23 pm
When I run the following stmt I get a list that includes some databases that no longer exist and had been deleted at some point.
select database_name, count(*)
from msdb.dbo.backupset
group by database_name
order by database_name
What's the best way to clean this up? There are enough "orphaned" records that I would think it would be effecting performance.
Should I just ignore this?
June 24, 2008 at 9:31 am
No worries if msdb database size is under control. I think somebody didn't check the deleting backup and history option while dropping
database from enterprise manager.
Manu Jaidka
June 24, 2008 at 3:04 pm
Great, that does sound reasonable. I did see some advice on another post about using SP_DELETE_BACKUPHISTORY to remove old records so I'm going to investigate doing that. I'm definately being overly concerned for this particular instance, but I'm going to look at it as a learning experince too.
...thanks again
June 25, 2008 at 7:48 am
June 26, 2008 at 11:36 am
Just in case someone else reads this, I found a system sp to do what I'm trying to do.
exec msdb..sp_delete_database_backuphistory 'dbname'
This works best for me as I'm trying to remove all the history for a particular DB.
...thanks again for the help.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply