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.
Author |
Topic |
kappa02
Yak Posting Veteran
65 Posts |
Posted - 2009-02-06 : 14:26:01
|
How can I shrink msdb below its current specified size. It's seems that DBCC shrink database/ file won't let you go below the original size but I would like to because its current size is too large and is not using anywhere close or half of its capacity. |
|
georger
Starting Member
1 Post |
Posted - 2009-02-06 : 15:07:39
|
I had a similar problem in which I could not shrink the MSDB DB. I found out there was a maint. job running every hour (re-indexing the DB) which was logged to the MSDB database. I ran the following two commands (jobhistory specifically)to delete these logs which went back over 2 years. I would shrink the TempDB transaction logs and shrink the DB to free up space. I moved the date about 15 days ahead each day. It sounds crazy but I did this process for close to month. I gained about 25% of free space on a 60 GIG drive.There may have been a better method but I never found it.EXEC msdb.dbo.sp_purge_jobhistory @oldest_date='11/19/2008 06:46:17' EXECUTE msdb..sp_maintplan_delete_log null,null,'2007-06-19T11:59:56' george rome |
 |
|
kappa02
Yak Posting Veteran
65 Posts |
Posted - 2009-02-06 : 15:46:02
|
I tried that and no rows were deleted. I believe msdb should be 17GB, 8GB at most is good enough. |
 |
|
|
|
|