November 6, 2008 at 11:07 am
Is there any scripts out there where i can check a db and find which indexes are to be rebuilt and after cehcking it has to select those indexes and rebuild them.
November 6, 2008 at 11:40 am
Check the scripts library here, there are lots and lots of variations floating around
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 6, 2008 at 12:21 pm
I looked out but didnt find any which suits my criteria.
just as we get gragmentation report from SSMS when right click on DB, I need something like that which reports indexes to be rebuild and select only those indexes and rebuild them.
I just want to setup this as a job and run it when ever i need.
November 6, 2008 at 1:54 pm
These two should give you a good place to start. You may have to tweak an existing script if you can't find one that does exactly what you want.
http://www.sqlservercentral.com/scripts/Index+Management/63649/
http://www.sqlservercentral.com/scripts/SQL+Server+2005/61278/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 7, 2008 at 1:09 pm
Hi there! Here's a link to my blog post with the script I use: Index Defrag Script. This is executed nightly on some fairly large databases with great success. Let me know if you have any questions. 🙂
HTH!
Regards,
Michelle Ufford
SQLFool.com - Adventures in SQL Tuning
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply