I know that the database can be of certain size X, but some of that file is empty, log data etc
How can I find out how much real data in B/KB/MB is in the database?
|
I know that the database can be of certain size X, but some of that file is empty, log data etc How can I find out how much real data in B/KB/MB is in the database? |
|||
|
|
Check out sp_spaceused.
|
|||||||||||
|
|
In SQL Server Management Studio you can right click on your database -> Reports -> Disk usage. |
|||
|
|
|
If I understand correctly, you want to know how much of the database is pure data and how much is there to manage this data. I cannot help but wonder why you'd even want to know this, but okay... Randolph has the right answer: sp_spaceused I just added the link with additional information. That way, you can check how to use it, since it can also provide information about tables and other objects. |
|||||
|
|
If you're using uncompressed native backups, do a full backup to disk and check its file size - backups don't contain the free space within a database file. |
|||
|
|