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
 General SQL Server Forums
 New to SQL Server Programming
 C part running out of room, large MDF, LDF files

Author  Topic 

nicolo
Starting Member

20 Posts

Posted - 2005-09-20 : 17:16:31
Hi my data files sit in the default directories and I think they are causing my partition to run out of space. I mainly use one db that I created but don't use the others (ie master, model, tempdb, etc). Yet I see their MDF and LDF files are growing. What can I do to shrink them down or perhaps move them off to a larger partition after shrinking?

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-09-20 : 23:35:36
What does etc mean? The only other system database is msdb. The model database should never grow. The master database should grow very slowly. The tempdb database should grow only if you use tempdb a lot. The msdb database will grow if you are using SQL Server jobs or the backup and log shipping features that come with SQL Server (to be generic). You can shrink the msdb database by purging your history on the jobs and backups. You can shrink the tempdb database by using the shrink commands or restarting the SQL Server service.

What worries me is that you say you "think" they are causing your partition to run out of space. How much space is each .mdf and .ldf taking up??? Is it one db or all that are causing the issue? How big is the C: partition? What other partitions do you have available? Are they on the same disk?

Here is an article to help you move databases:

http://support.microsoft.com/default.aspx?scid=kb;en-us;224071

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-09-21 : 00:15:03
distribution?

224071 is a key KB article that everyone should have readily available.



-ec
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-09-21 : 00:27:08
you should relocate your user data files to another drive other than default, more room to work with if something happens to your default drive, atleast user data files can still be salvaged



--------------------
keeping it simple...
Go to Top of Page

nicolo
Starting Member

20 Posts

Posted - 2005-09-22 : 17:25:16
Hi thanks for the hints and tips...apparently it's the tempdb.mdf that's been inflating and deflating. At one point it was up to 2GBs! I made a few adjustments, namely reducing the db backups to just msdb and my own db as well as the frequency.
My C partition is 7GBs. Should I move the tempdb or just leave this as is? Right now I back to having 2.18GBs of space.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-09-22 : 17:53:44
You say you don't use the other database, but your queries are using tempdb. You don't need to backup this database. If the tempdb database grows again, you'll need to figure out which query is using so much tempdb space and see if it can be optimized. If you need help with the optimization, post the query.

Tara
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-09-22 : 22:58:34
You will always need to leave some room for tempdb, regardless of where you put it. So, if you have a lot more room on another partition, I would move it.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -