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

Defrag Tables Expand / Collapse
Author
Message
Posted Saturday, September 29, 2007 8:21 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, October 02, 2013 9:26 AM
Points: 265, Visits: 185
Comments posted to this topic are about the item Defrag Tables
Post #404528
Posted Wednesday, April 30, 2008 12:18 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 12, 2009 3:40 PM
Points: 1, Visits: 5
This works great... thanks for posting it. The only difference that I had to make was to add the table_schema to the cursor.

DECLARE PKMS_Tables CURSOR LOCAL FOR
select (table_schema + ''.'' + table_name) as table_name from information_schema.tables
where table_type = ''base table'' order by 1

I have tables that are not dbo.
Post #493176
Posted Tuesday, February 17, 2009 3:41 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, March 31, 2014 9:55 AM
Points: 53, Visits: 224
Good efforts. Adding some rebuild decision criteria eg. Physical fragmentation gone more that 10% or logical fragmentation gone more than 15% might have been better.


Kindest Regards,

Ajay Prakash
Post #658945
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse