SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 size of table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 05/30/2007 :  18:10:14  Show Profile  Reply with Quote
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

USA
36932 Posts

Posted - 05/30/2007 :  18:25:46  Show Profile  Visit tkizer's Homepage  Reply with Quote
Use sp_spaceused stored procedure.

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

deepakontheweb
Starting Member

India
14 Posts

Posted - 05/30/2007 :  23:42:06  Show Profile  Visit deepakontheweb's Homepage  Click to see deepakontheweb's MSN Messenger address  Send deepakontheweb a Yahoo! Message  Reply with Quote
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

India
22755 Posts

Posted - 05/31/2007 :  01:12:33  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
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 - 05/31/2007 :  08:19:27  Show Profile  Reply with Quote
Thanks guys that helps a lot
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000