Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 reindex/rebuilt online script needed.....

Author  Topic 

espanolanthony
Starting Member

9 Posts

Posted - 2009-11-11 : 14:11:33
Hello friends,
I am looking for a script that will rebuild/reorganise SQL Server's indexes if they have fragmentation above certain percentage and the main thing is that a script that rebuild/reorganise indexes online. since our database is very big in size its impossible to rebuild/reorganise after hours because if we run after hours it will take more than 24 hours to run. so i am looking for rebuild/reorganise script with online option.

and one more thing i am looking for is, i heard that the online rebuild/reorganise operation will not rebuild/reorganise certain indexes which cannot be rebiult online. so does someone also have script that will find those indexes that will not be rebuilt with onlin option.
Any help in this matter is appreciated.

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2009-11-11 : 14:39:31
Look at the stored procedure script on the link below.

Defragmenting/Rebuilding Indexes in SQL Server 2005 and 2008
http://weblogs.sqlteam.com/tarad/archive/2009/11/03/DefragmentingRebuilding-Indexes-in-SQL-Server-2005-and-2008Again.aspx

CODO ERGO SUM
Go to Top of Page

espanolanthony
Starting Member

9 Posts

Posted - 2009-11-11 : 14:43:55
so is this an online operation?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2009-11-11 : 19:23:01
quote:
Originally posted by espanolanthony

so is this an online operation?



Did you even read that blog entry?





CODO ERGO SUM
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-11 : 22:54:32
Yes that script does it online where possible. Not all index can be done online though, so it reverts to offline in those cases. Check ALTER INDEX in BOL for details on what has to be done offline.

I'm the author of the script, so feel free to ask any questions.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -