September 29, 2007 at 8:21 pm
Comments posted to this topic are about the item Defrag Tables
April 30, 2008 at 12:18 pm
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.
February 17, 2009 at 3:41 pm
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.
Ajay Prakash
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply