I need a script to sort all the user tables | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

I need a script to sort all the user tables

Folks, I need a script to sort all user tables based on the row count and storage size? thank you so much, SQL 2K5 EE ——————
Bug explorer/finder/seeker/locator
——————
Check the following url for script from vyas…it is written for sql 2000 but it should work in 2005 (not tested)… http://vyaskn.tripod.com/code/sp_show_huge_tables.txt
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.


See if this is also helpful select object_name(i.id),i.rows from sysindexes i inner join sysobjects o on i.id=o.id
where i.indid<2 and o.xtype=’u’
order by rows
Madhivanan Failing to plan is Planning to fail
You can make use of SP_SPACEUSED onto a temp table and sort it or the above links. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
]]>