sql server - SQL move all indexes for a table to a file group -


Is there a TSQL method for a table group to move all the indexes one group one by one without having to move one by one? It looks like a dynamic SQL scenario.

You can use Object Explorer details (Management Studio), then browse through the table, its In the indexed folder. Then highlight all the scripts - & gt; Create in - & gt; New Query Window

This will create all your scripts. Turn on DROP_EXISTING = OFF DROP_EXISTING = and change [primary] what is the name of your new file group.

This requires some manual steps, but gives good control, especially if you want to select only the index (not all of them).

Comments