SQL Server / SSMS taking up lots of disk space



  • 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.



  • You might want to use https://windirstat.net/ or https://www.jam-software.com/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:

    • Your database is in full recovery and you're not taking log backups, in which case you can https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/view-or-change-the-recovery-model-of-a-database-sql-server?view=sql-server-ver15 so that SQL Server manages the transaction log a bit for you
    • Your data/log files are set to grow by a percent, in which case you can https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options?view=sql-server-ver15 so they don't grow by exponentially larger percentage-based increments

    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.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2