October 4, 2010 at 9:32 am
Hi!
I hope you can help me out on this one.
We have identified several indexes on the same columns on several of our tables.
How should i write a script that lists and/or drops each duplicate index sorted by the index column( or combination of columns)?
The idea is to create a script to run on production servers at customer sites.
The way i picture it in my head, the script could automatically drop the first ( of each index combination found) duplicate.
Is it possible/advisable to create such a script?
I have played around with some system views, but haven't been able to write the wanted queries yet.
Please help.
October 4, 2010 at 9:35 am
there's a large number of scripts in the contribution section for this;
I've used "The Ultimate Duplicate Index Finder" myself;
take a look here:
http://www.sqlservercentral.com/search/?q=duplicate+indexes&t=s
Lowell
October 4, 2010 at 12:58 pm
Hi,
Thanks for the quick reply!
And thank you once again for your politely telling me to use the search functions of this site:-)
I think I most likely will find what I'm looking for in one of these scripts.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply