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)
 size of table

Author  Topic 

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2007-05-30 : 18:10:14
Guys,

Is there any system tables from which I can query and find the size of the table.

I tried using sysobjects and information_schema tables but could not find any column which spits out the size of the table.

Any suggestions and inputs would be helpful

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-05-30 : 18:25:46
Use sp_spaceused stored procedure.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

deepakontheweb
Starting Member

14 Posts

Posted - 2007-05-30 : 23:42:06
Just to add little more here... run dbcc updateusage for the table before running sp_spaceused to get accurate informations.


DBCC UPDATEUSAGE
Reports and corrects inaccuracies in the sysindexes table, which may result in incorrect space usage reports by the sp_spaceused system stored procedure.


This example reports information about the authors table.

DBCC UPDATEUSAGE ('pubs','authors')
GO



Deepak Kumar
SQL Server MVP, MCDBA
deepak.kumar@sqlknowledge.com

Disclaimer: This post is provided as is with no rights & warranty for accuracy, for the sake of knowledge sharing only.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-05-31 : 01:12:33
Also refer
http://sqlteam.com/forums/topic.asp?TOPIC_ID=53843
http://sqlteam.com/forums/topic.asp?TOPIC_ID=61762

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2007-05-31 : 08:19:27
Thanks guys that helps a lot
Go to Top of Page
   

- Advertisement -