How to know SQL server database size?

Posted by SheoNarayan under Sql Server category on | Views : 27359
To know the Sql Server database size, following stored procedure can be executed.

-- This will give you the complete database size including log file
exec sp_spaceused

-- This will give you the number of rows in the table and space used for this table
exec sp_spaceused "MyTable"

Here "reserved" column gives you the complete size of this table.

You can also see the actual size of the database file and log file separately by executing following command.

select * from sysfiles

Comments or Responses

Login to post response