sp_databases in SQL Server

Today’s post will introduce a new system procedure sp_databases that helps If you want to know the databases and its sizes in your db server. Its a very handy procedure that helps at times.


  1. If you want to know the size of log and data separately, this procedure cannot be helpful. You may refer “https://sqlzealots.com/2015/01/29/find-the-database-size-logrowtotal-in-sql-server-using-t-sql/” for the same.
  2. If any of databases is having more than 2.15 TB size, then sp_databases may not provide the database_size value as this column is defined as a INT datatype which can hold value upto : 2,147,483,647

If you enjoyed this blog post, please feel free to share it with your friends!

One thought on “sp_databases in SQL Server”

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 )

Facebook photo

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

Connecting to %s