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.
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 helpfulThanks |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-05-30 : 18:25:46
|
Use sp_spaceused stored procedure.Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
|
|
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 UPDATEUSAGEReports 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')GODeepak KumarSQL Server MVP, MCDBAdeepak.kumar@sqlknowledge.comDisclaimer: This post is provided as is with no rights & warranty for accuracy, for the sake of knowledge sharing only. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
scelamko
Constraint Violating Yak Guru
309 Posts |
Posted - 2007-05-31 : 08:19:27
|
Thanks guys that helps a lot |
|
|
|
|
|