Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to see size of each table
Message
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
01474138
Message ID:
01474248
Views:
53
Hi Naomi.
Thanks for that. I'll load it up when I get a minute.
Regards,
Gerard


>>Hi.
>>I am going over the 4 gig limit on SQL Express but am not sure which table(s) is causing this. Is there a way in SSMS to see the sixe of each table ?
>>TIA
>>Gerard
>
>Here is another script I just put up
>
>
>
>--exec sp_MSforeachtable 'print ''?'' exec sp_spaceused ''?'''
>if OBJECT_ID('tempdb..#TablesSizes') IS NOT NULL
>   drop table #TablesSizes
>   
>create table #TablesSizes (TableName sysname, Rows bigint, reserved varchar(100), data varchar(100), index_size varchar(100), unused varchar(100))
>
>declare @sql varchar(max)
>select @sql = coalesce(@sql,'') + '
>insert into #TablesSizes execute sp_spaceused ' + QUOTENAME(Table_Name,'''') from INFORMATION_SCHEMA.TABLES
>
>--print (@SQL)
>execute (@SQL)
>
>select * from #TablesSizes order by TableName
>
>
>using the ideas from http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/how-to-get-information-about-all-databas
Previous
Reply
Map
View

Click here to load this message in the networking platform