INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

SQL Server Administration

Determining Table sizes (in KB) by BigTeeJay
Posted: 27 Sep 02 (Edited 7 Dec 04)

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

Back to Microsoft SQL Server: Programming FAQ Index
Back to Microsoft SQL Server: Programming Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close