Library code snippets
Calculate Diskspace Used by a Table or Database
By James Crowley, published on 30 Jan 2005
Ever wondered how much storage space a particular table in your SQL Server database takes up? It's actually *really* easy to find out! Simply do
EXEC sp_spaceused 'tablename'
where tablename is the table you're interested in, and you'll get back something that looks like this:
| names | rows | reserved | data | index_size | unused |
|---|---|---|---|---|---|
| dir_pages |
4308 | 13088 KB | 12928 KB | 88 KB | 72 KB |
If you omit the 'tablename' parameter, then you'll get back two resultsets with information about the entire database:
| database_name | database_size | unallocated space |
|---|---|---|
| devfusion |
11248.69 MB | 18.52 MB |
| reserved | data | index_size | unused |
|---|---|---|---|
| 87856 KB | 81232 KB | 5152 KB | 1472 KB |
Related articles
Related discussion
-
Buy cheap Xanax overnight. Cheap Xanax. Overnight delivery of Xanax in US no prescription needed. Cheapest Xanax.
by asleymar (0 replies)
-
Buy Soma online without a prescription. Soma drug no prescription. How to get Soma prescription. Soma cod accepted.
by asleymar (0 replies)
-
Cheap online order Fioricet. Cheap discount Fioricet. Offshore Fioricet online. How to buy Fioricet online without a prescription.
by asleymar (0 replies)
-
Buy Ambien no visa without prescription. Not expensive Ambien prescriptions. Ambien no rx. Cod delivery Ambien.
by asleymar (0 replies)
-
Tramadol without doctor rx. Buy Tramadol over the counter cod overnight. Cheap Tramadol cod delivery. Buy Tramadol from mexico online.
by asleymar (0 replies)
Related podcasts
-
ADO.NET "Astoria" Data Services with Shawn Wildermuth
Scott chats with Shawn Wildermuth, "the ADO Guy," about ADO.NET Data Services, aka "Project Astoria." It's REST for SQL Server. Should you care? What's REST? How does this relate to WCF or ASP.NET?
usefull info
Thanks james
This thread is for discussions of Calculate Diskspace Used by a Table or Database.