No free space on C drive

  • The only thing we keep in the C drive are the program files for the various SQL Server applications (so our only SQL Server content is in Program Files\Microsoft SQL Server\...etc). All of our data files and instances are installed in other paths. Is there any impact to SQL Server if the C drive runs out of space? We're at 0 free space right now on C and SQL Server is up and running fine, however we occassionally see issues with other Windows applications like RDP. Would SQL Server hit any issues? My biggest concern right now is if the instance goes down and needed to restart. Thanks.

  • This could be a potential problem. If I am not mistaken , you have the OS too installed in the same Drive. This could cause the OS to crash.

    -Roy

  • Too true you'll have problems. Sadly I can understand this situation - check for what's using the space - the rubbish bin sometimes hold files even after the bin has been emtied - usual suspects are also IIS logs and tmp files, not foretting overblown page file and vsp files left by backup routines, make sure you show hifdden and o/s files when you examine the drive. Youi need to fix this now before your server dies.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Thanks for the replies. I think the root cause of the issue is that our C drive was 9 GB to begin with when we started with SQL 2000 and we did not anticipate the signifcant space requirements for the 2005 upgrade.

  • aha - been there too. I'd sometimes like to shoot the sytem folks who set silly o/s partitions - unless you fix your environment variables you'll find a profiler trace will quickly run your C: drive out of disk space too.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Sounds like your hands are tied a little here. However, Windows Operating Systems absolutely hate running out of hard-drive space, especially on the system drive. You will have continuous, unexpected problems unless you free up a lot of space.

    Note that you won't be able to defrag the system drive until you have at least 1GB of free space (preferably at least 20% free, so really you want 2GB free). When a drive gets 100% full, bits of files are stored all over the place (to cram them in) so general performance plummets.

    I suggest you carefully clean out/move all the files you can. There is loads of advice on the web to help. Have you, for example, moved the Swap Files to another partition? Deleted all the $NTUninstall folders (note, you won't be able to uninstall a Microsoft patch once you have done this)? Searched for DMP files? As mentioned above, look for TXT and LOG files, and TMP files. How about CHM files?

    Normally, if you are careful, it is easy to reclaim a surprising amount of space.

    Andy

  • I just want to check that when you say all your data files are stored on other disks, that you are including system databases, such as TempDb. These are stored in the SQL Server Program Files folders by default (this also can apply to .BAK files as well). If you haven't done so already, these files can be moved off of C: to clear up some space.

    Here's a link to an article describing how to move TempDB:

    http://www.sqlservercentral.com/articles/Administration/63568/

    Other ways to free up room on C: are to remove the C: drive's pagefile.sys (note: doing so can affect your ability to debug OS issues):

    http://support.microsoft.com/kb/307886

    Also, if your ReCycler folder is large (you have to show Hidden and Protected Files to see it) that indicates that some user(s) on that box has a large Recylce Bin that has not been emptied; you can try to delete the contents of this folder (note: user will not be able to recover any of the current contents of their Recylce Bin once you do this):

    http://support.microsoft.com/kb/229041

    Hope this helps.

  • I said in my initial post we only have the binaries in C:, the stuff that goes to C:\Program Files. No data files in C.

  • As a previous poster briefly mentioned, check the Windows Environment Variables. By default it's set to the docs and settings folder. If anyone logs on to run a query from management studio on the system or temp space is needed during an install, it will use the TEMP and TMP paths to store those files.

    Right click my computer > Properties > Advanced > Environment Variables, and change the paths of those two variables, TEMP and TMP to D:\TEMP and D:\TMP provided your D:\ drive is one of your large drives on the system.

    I would also check the location of the page files:

    Right click my computer > Properties > Advanced > Performance..Settings > Advanced > Virtual Memory..Change and get any page files off of the C:\ drive.

    These are two main issues that we used to come across in my environment until we were able to have the OS team at my company change the OS image and builds.

    Best of luck,

    Steve

  • You might also want to check out one of the more useful but less well-known Microsoft utilities called LinkD, which is part of the Windows Server resource kit downloads. Basically, it's a utility for doing on a Windows file system the same as linking directories within UNIX, so you could find a few large, fairly static folders on your C:\ drive, move them to another drive where there's an excess of space and then link the new directory back to its original location so the OS sees no difference except for more space. Obvious candidates might be log directories (c:\windows\system32\logfiles for instance) and directories containing binaries of applications you can turn off whilst you're doing this work.

    This is obviously not a preferred solution, since in the long term it's difficult to make sure the server admins don't forget this amendment was done. However, I'd say you're past the point of preferred solutions and this one'll get you out of the mire fairly easily.

    One specific we found on more than one of our servers was Trend Antivirus using incredible amounts of disc space for masses of pattern updates, and I've little doubt several other AV products'll have the same issue. If you find this is the case, these might easily be candidates for "linkd'ing" too....

    Good luck

    Semper in excretia, suus solum profundum variat

  • There can be lots of rubbish stored on ther system drive that can be deleted. As a start, look in:

    Windows /Temp folder

    Each user's /Temp folder (in their user profile)

    Each user's /My Documents folder

    Each user's Internet file cache

    Ensure the Recycle bin is empty

    Ensure obsolete system checkpoints are deleted

    Even if your server cannot connect to the internet, the internet cache may get large. I once had a problem with an internal-only server running Crystal Reports that had accumulated many GB in the internet cache as it built reports.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara

  • I know you have said that the data files are on other partitions, however if any of your databases use Full Text Searching then the catalogues are stored in \Program Files\Microsoft SQL Server\MSSQL\FTDATA by default.

    They can be created in another location; however I’m not too sure if they can be moved once populated.

    Regards,

    Phil

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply