INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

HANDLE


PASSWORD
Remember Me
Forgot Password?

Come Join Us!

  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • Turn Off Ad Banners
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

E-mail*
Handle

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

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Member Feedback

"...I have tons of books, have book marked tons of tutorials, which have helped, but this forum has answered those "impossible to find" solutions. I am thrilled with this site..."

Geography

Where in the world do Tek-Tips members come from?

Microsoft SQL Server: Programming FAQ

SQL Server Administration

Determining Table sizes (in KB)
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 FAQ Archive
Email This FAQ To A Friend

My Archive