We help IT Professionals succeed at work.

Clear out MSDB file in sql server

yadavdep
yadavdep asked
on
183 Views
Last Modified: 2018-03-21
I just joined a project which is live for the last 4 - 5 years.
This project is using SQL SERVER 2012 and on the server it has around 1500 databases.

I am noticing that SQL Server is consuming all the assigned memory (which is around 40GB).
Many time Transactions or query are getting timeout by SQL Server these days.

I checked and found that msdb file has grown to 68 GB in size. I am not sure that this is causing all these slow ness.

I tried to run the maintenance plan to clear out msdb but it just did not get ended. I tried it to run for two full days but then also it did not finished.

What I need to know is how can I clear this MSDB and is it one of the reason of this memory consumption by SQL Server
Comment
Watch Question

Vitor Montalv√£oIT Engineer
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
This project is using SQL SERVER 2012 and on the server it has around 1500 databases.
In a single SQL Server instance? What's the average database size and how large is the biggest one?

I am noticing that SQL Server is consuming all the assigned memory (which is around 40GB).
That's the expected behavior even a minimum of 8GB should be reserved for the operating system.

Many time Transactions or query are getting timeout by SQL Server these days.
You might need to add more memory or a better solution is to build a 2nd SQL Server box and migrate some of the databases there.

I checked and found that msdb file has grown to 68 GB in size. I am not sure that this is causing all these slow ness.
Is not. How much of those 68GB is data and how much is transaction log?

I tried to run the maintenance plan to clear out msdb but it just did not get ended.
Which maintenance plan are you running? What you should do is to configure the SQL Agent to keep a shorter period of jobs history since having 1500 databases it should produce a lot of lines for each maintenance task, for sure. And not counting with each database specific job from their respective applications.
Database Analyst
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions