How to Check SQL Server Database Size

Introduction

In this simple article, I would like to share how to check DB size. Sometimes when working in a Database, we may need to know the current space occupied by that particular DB. Based on the size, we need to take action.

There are three easiest ways to check it,

  • Using T-SQL Statement
  • Using SP sp_spaceused
  • Using SSMS

Using T-SQL Statement

Fig. 1 T-SQL Statement to get current spaces of all Databases

When the about T-SQL statement is executed, it will list all the databases with the current disk space occupied.

Fig. 2 Databases and its space

Using Stored Procedure

By using sp_spaceused, we can get the current database’s disk space.

EXEC sp_spaceused   
Fig. 3 Disk Space occupied by the Current Database

database_size column in the first result set provides the disk space occupied by the current database.

Using SSMS

To know size Go to Server Explorer -> Expand it -> Right-click on Database -> Choose Properties -> In popup window choose General tab ->See Size property

Fig. 4 Disk Space using SSMS

Conclusion

In this simple tips and tricks article, we discussed finding the Database size. Hope this article was very useful and we will discuss more tips and tricks in our upcoming articles. Please share your feedback in the comment section.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Built with WordPress.com.

Up ↑

%d bloggers like this: