Can anybody know how to remove all the indexes from database ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using this query will create you a list of DROP statements which you can then execute:
That should be pretty fast and take care of dropping all indices 🙂
Marc
PS: ah, sorry, I just noticed this will only work in SQL Server 2005 and up. For SQL Server 2000, you’ll need to use the “sysindexes” view instead… I updated my statement accordingly