Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Total Database Information At Your Fingertips Part - II Expand / Collapse
Author
Message
Posted Wednesday, November 23, 2011 9:57 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 11, 2013 3:27 PM
Points: 127, Visits: 132
Comments posted to this topic are about the item Total Database Information At Your Fingertips Part - II

Rahul
Post #1211434
Posted Wednesday, November 23, 2011 9:57 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 6:54 AM
Points: 1,032, Visits: 1,295
Thanks for sharing.

Thanks
Post #1211435
Posted Thursday, November 24, 2011 2:17 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, January 3, 2014 8:53 AM
Points: 62, Visits: 51
There is faster way how to determine total number of rows in table, then in all tables as well. If you have primary key on your table (so it doesn't works that simply for heap tables) you can just simply select rowcnt column on sysindexes where id = objectid('yourtable') and indid = 1.

This gives you number of rows in your primary key, which is the number of rows in your table. Subsequently if all tables in your database has a PK, just simply sum all rowcnt columns in sysindexes table.

Jan
Post #1211497
Posted Friday, November 25, 2011 6:49 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 8:41 AM
Points: 14, Visits: 398
Hi,

See if this is something along your lines of DBA information/metadata also.
You may be able to use/share the code.

Oliver


  Post Attachments 
uksql.zip (6 views, 241.57 KB)
Post #1211966
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse