SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Rebuild/Reoganize all indexes of all databases


Rebuild/Reoganize all indexes of all databases

Author
Message
adeilsonrbrito
adeilsonrbrito
Valued Member
Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)

Group: General Forum Members
Points: 51 Visits: 133
Comments posted to this topic are about the item Rebuild/Reoganize all indexes of all databases
Abrar Ahmad_
Abrar Ahmad_
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1358 Visits: 1310
its English version please? ..... just joking !! :-D

Nice Work

Atif-ullah Sheikh
Atif-ullah Sheikh
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6392 Visits: 5209
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


Atif-ullah Sheikh
Atif-ullah Sheikh
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6392 Visits: 5209
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


sdesai
sdesai
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 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.
Paul White
Paul White
SSC Guru
SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)

Group: General Forum Members
Points: 54756 Visits: 11392
http://sqlfool.com/2010/04/index-defrag-script-v4-0/



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
Shamshad Ali
Shamshad Ali
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2044 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



slash.ricardo
slash.ricardo
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 20
Hey guys, the language used is Portuguese (Brazilian Portuguese).
logicinside22
logicinside22
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3683 Visits: 1449
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
SQL-DBA-01
SQL-DBA-01
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13395 Visits: 3712
Hi

Can you please share the script???

Thanks.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search