|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Friday, May 11, 2012 3:58 AM
Points: 265,
Visits: 184
|
|
|
|
|
|
Forum 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.
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 2:43 AM
Points: 53,
Visits: 178
|
|
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
|
|
|
|