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

Rebuild/Reoganize all indexes of all databases Expand / Collapse
Author
Message
Posted Thursday, April 22, 2010 1:21 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, June 20, 2013 6:53 PM
Points: 3, Visits: 133
Comments posted to this topic are about the item Rebuild/Reoganize all indexes of all databases
Post #908356
Posted Sunday, April 25, 2010 11:38 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 7:49 AM
Points: 212, Visits: 1,117
its English version please? ..... just joking !!

Nice Work
Post #910189
Posted Sunday, April 25, 2010 11:56 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, November 24, 2014 8:40 AM
Points: 3,244, Visits: 5,008
Had to change to run in SQL Server 2005. Just changed the initialization of @Loop ,@Qt and Total.

Nice script. Just want to know Which Language?


----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sometimes, winning is not an issue but trying.

You can check my BLOG here

Post #910194
Posted Monday, April 26, 2010 1:31 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, November 24, 2014 8:40 AM
Points: 3,244, Visits: 5,008
I have written this logic using sp_msforeachdb.

I need to ask Why have you used this condition

p.page_count >= 10

Is this to check if the Index is large enough to Rebuild or reorganize or any other reason?



----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sometimes, winning is not an issue but trying.

You can check my BLOG here

Post #910216
Posted Monday, April 26, 2010 5:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, May 23, 2012 6:40 AM
Points: 7, Visits: 103
Nice article.

I have taken exactly the opposite approch

I start out with finding all the indexes which are fragmented (30+) and then rebuild dynamic sql to actually rebuild or reorganize. These results into two sweet and short SPs + I log everyday what I find about this indexes.

Post #910288
Posted Monday, April 26, 2010 5:22 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: 2 days ago @ 6:23 AM
Points: 9,928, Visits: 11,196
http://sqlfool.com/2010/04/index-defrag-script-v4-0/



Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #910292
Posted Friday, May 21, 2010 9:14 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, September 6, 2013 5:54 AM
Points: 526, Visits: 590
After applying the alter index, out of 10 there are 8 alter statements are same - actually i ran this script twice to check there is no anything missed - so i want to know either alter with rebuild or reorganize both ran multiple times and your script suggest me to those alter statements agian and atain - I want to learn why those are not updated? where is the problem? are the indexes not properly implemented? Please help

Shamshad Ali



Post #926049
Posted Thursday, December 9, 2010 11:13 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 3:56 PM
Points: 5, Visits: 18
Hey guys, the language used is Portuguese (Brazilian Portuguese).
Post #1032612
Posted Saturday, July 28, 2012 9:49 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, November 17, 2014 2:08 PM
Points: 321, Visits: 1,290
HI SQL Kiwi
Just want to know if the script through link runs for Index Defrag so we have to run Update statistics separately or whole script takes care of Update Statistics also?
THanks


Aim to inspire rather than to teach.
SQL Server DBA
Post #1336933
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse