Thứ Hai, 1 tháng 7, 2019

How To Fix Very Large MSDB Database

The MSDB database houses your maintenance plan information and job histories (amongst a few other things). For the most part this should generally remain well under 1GB in size (normally only a few hundred MB)… but there are certain conditions where the history clean up task can get a bit overwhelmed and start failing, and leave you with an MSDB database that’s starting to grow a bit out of control.
Generally running a clean up history task will resolve this, however in the event that this is failing also, you can try the following scripts to fix the issue.
How to check and fix a large MSDB database – first check what’s using the space;
Chances are it will be the sysmaintplan_logdetail table that’s blown out, so to resolve this;
Then we shrink it down;
… rebuild the indexes to make sure it’s all performing nicely;
and BOOM! MSDB should be back under control, and your scheduled history clean-up task capable of completing successfully again!

Share This!


Không có nhận xét nào:

Đăng nhận xét