Ever wanted to find out the amount of space a table
is taking up (in Kilobytes, not record size... although
you will be able to get the record size too this way).
Microsoft has a very convoluted method of doing this
(a 10 step process that can be found in the latest
"SQL Books online", go to the index and look under the
heading "tables-SQL Server" and then "calculating size",
then choose "Estimating the Size of a Table"). Which
I guess, if you dont have access to Enterprise Manager
you would have to do this.
But, if you do have Enterprise Manager, just select
your Database in the left-hand pane. Then goto the
View menu (in the Console Root, not in the MMC main
window, where you sometimes get a View menu)...
Choose "Taskpad", then go to the "Table Info" tab in
the right-hand pane, and you will be presented with
the number of records, as well as Total table size and
the size for each index associated with a table, all in
Kilobytes.
Hope this helps someone (sure beats the method I was
going to have to try to get the same info).
Tj
12/7/04: User, Kaz999 pointed out an easy way to get this kind of information via TSQL...
Code:
exec sp_spaceused <tablename>
...gives you...
Code:
name rows reserved data index_size unused
<name> 17991232 12636448 KB 11051664 KB 1583816 KB 968 KB