Rebuilding Indexes In One Database

Standard

I came across a question that we needed to rebuild the indexes only on a particular database.

The script  I created selects all the tables from a certain database and puts them into a cursor. Than the script runs the index command with the table in line.

Leave a Reply