Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 table space

Author  Topic 

priyaram
Yak Posting Veteran

82 Posts

Posted - 2005-06-29 : 13:45:03
is there any way to know how much is the space occupied by
a table and it's records.???

thanks in advance

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-06-29 : 14:25:31
Check out sp_spaceused in SQL Server Books Online.

Tara
Go to Top of Page

Thrasymachus
Constraint Violating Yak Guru

483 Posts

Posted - 2005-06-29 : 14:46:23
but do not forget to use DBCC UPDATEUSAGE first.

Sean Roussy

Please backup all of your databases including master, msdb and model on a regular basis. I am tired of telling people they are screwed. The job you save may be your own.

I am available for consulting work. Just email me though the forum.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-06-29 : 14:49:01
Just do it in one command:

For specific table:
sp_spaceused @objname = 'TableName', @updateusage = 'TRUE'

For entire database:
sp_spaceused @updateusage = 'TRUE'

Tara
Go to Top of Page
   

- Advertisement -