Menu & Search
Get All Database Sizes in SQL Server

Get All Database Sizes in SQL Server

Measuring databases is important for knowing how much disk space a SQL Server requires today, as well as the future growth of the database files. It takes more than one run of a script to know all your disk provisioning needs. The script below in this post helps give a quick look at the database sizes on a SQL Server instance.

There are many ways to get this information, but personally, I have always preferred to run a script like this to get database sizes in SQL Server throughout my career. You’ll spend a lot of time querying sys.databases and be familiar enough with this as a DBA too.

Script to Show Database Sizes in SQL Server

The script below returns all databases sizes in SQL Server –

Get Database Sizes SQL Server

I often bring up the Shrink File window in SSMS to view the database and log file sizes from there, as shown in the screenshot above. If checking one database this is a good way.

For more information on this topic, have a look at the Measuring Databases Tag.