• GSquared (6/29/2016)


    The usual way to do that is to rebuild the clustered index into the new filegroup ("CREATE INDEX WITH DROP_EXISTING" is one way to do that, if I remember correctly).

    The other way is to Select Into. That allows you to change the schema and/or table name, if you want to. But it requires space to support two copies of the data during the operation.

    If you need to move a lot of tables, work out how you're going to do it, then set up a cursor to step through them. You can do things like selecting from sys.tables where the schema_id is the one you want to move, or you can explicitly list the tables in a Table Value Constructor (search that if you aren't familiar with them).

    I'd go with #1.