SQL Server / SSMS taking up lots of disk space

The question:

I installed SQL Server + SSMS for my univ class and ever since then my disk space is going missing (every so often, approx. 3 gb of space goes missing). I strongly suspect SQL Server and/or SSMS to be at fault (since it only happened after I installed them), however I have no idea how to track down that missing space. Is it doing massive amounts of logging? Backups? No idea.

Where might I find that disk space and/or check if it is SQL Server’s and/or SSMS’ shenanigans?

Thank you for your time.

Note: I am using SSMS 18.9.1 and SQL Server 2019 Developer Edition. I might be able to update but any problems that arise will be my fault for deviating from the officially provided versions.

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

You might want to use WinDirStat or TreeSize Free to see which files are actually taking up space. It may not even be what you think.

SQL Server doesn’t take backups on its own, so it’s unlikely those are the culprit unless you set them up via a maintenance plan or other script.

More likely is that:

If the goal is to reclaim disk space, feel free to search for any number of scripts or GUI walkthroughs out there to accomplish that task.

Method 2

It’s a bit more work to set up, but even for laptop instances of SQL Server, I always make sure to create a new drive and set that as my default database file location. Since you’ve already installed SQL Server, you’d want to follow guidance for changing the default database location.

If you’ve got databases already deployed that you cannot lose, then you may want to move the database files to a new drive once you have it set up.

Note this will not stop SQL Server from filling the drive, but it will contain the damage to that drive and protect you from a full C: drive.

As an aside, this actually saved me a pretty big headache on a laptop lab very recently where I misconfigured the Polybase setup and filled up the dedicated SQL Server drive in a matter of days.

Method 3

As you can see in the documentation SQL Server 2019: Hardware and software requirements SQL server is using some space on disk. The exact space depends on the option & features you installed but the space you are missing is in line with the requirements.

Take a look at the folders “C:Program FilesMicrosoft SQL Server” and “C:Program Files (x86)Microsoft SQL Server” for 32 bit components like SSMS.

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment