SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Which index need to rebuild / re-organize
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wkm1925
Posting Yak Master

207 Posts

Posted - 07/23/2012 :  10:28:31  Show Profile  Reply with Quote
Hi,

Did anyone have a script to show 'Which index need to rebuild / re-organize'

If yes, hopefully someone can share with me

robvolk
Most Valuable Yak

USA
15558 Posts

Posted - 07/23/2012 :  10:36:00  Show Profile  Visit robvolk's Homepage  Reply with Quote
Check out Ola Hallengren's Index maintenance script: http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html

If you pass 'N' to the @Execute parameter it will generate a list of indexes to be processed based on the other settings you pass. This is the easiest and best procedure to use for index maintenance.
Go to Top of Page

wkm1925
Posting Yak Master

207 Posts

Posted - 07/23/2012 :  10:37:41  Show Profile  Reply with Quote
tq sir
Go to Top of Page

lionofdezert
Aged Yak Warrior

Pakistan
864 Posts

Posted - 07/23/2012 :  14:44:57  Show Profile  Visit lionofdezert's Homepage  Send lionofdezert a Yahoo! Message  Reply with Quote
I personally prefer Tara Kizer stored procedure for this purpose
http://weblogs.sqlteam.com/tarad/archive/2007/04/17/60176.aspx

--------------------------
http://connectsql.blogspot.com/
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
35007 Posts

Posted - 07/23/2012 :  14:56:08  Show Profile  Visit tkizer's Homepage  Reply with Quote
If you're going to use mine, here's the most recent published version: http://weblogs.sqlteam.com/tarad/archive/2009/11/03/DefragmentingRebuilding-Indexes-in-SQL-Server-2005-and-2008Again.aspx

I do have a newer version though, just haven't published it to my blog yet.

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

Subscribe to my blog
Go to Top of Page

lionofdezert
Aged Yak Warrior

Pakistan
864 Posts

Posted - 07/23/2012 :  15:03:15  Show Profile  Visit lionofdezert's Homepage  Send lionofdezert a Yahoo! Message  Reply with Quote
Thanks for correcting me, just updated (newer link) on my blog post http://connectsql.blogspot.com/2011/01/sql-server-simple-method-to-resolve-all.html

Tara please publish latest, if tested and found good to go.

--------------------------
http://connectsql.blogspot.com/
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000