question

JazzieG1316 avatar image
JazzieG1316 asked

Restore to a different FileGroup

Is there a way to perform a restore to a different file group? I have a database "DataBase1" whose default primary group is PRIMARY. I created another database "DataBase2" I then created a file group in "Database2" "FileGroup1" I need to restore Database1 to Database2 and the contents of PRIMARY filegroup should then be transfered to "FileGroup1" Is there a way to do this straight forward through restoration? There is a way to transfer all of the objects but it is not straight forward. 1. Restore Database1 on Database2. 2. create "FileGroup1" 3. Create a temporay clustered index on all tables specifying the new filegroup to transfer the contents to the new filegroup. 4. Drop the temporary clustered index Is there a way to restore to a different file group. Opinions and suggestions are most welcome.
sql-serverrestorefilegroup
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
SirSQL avatar image
SirSQL answered
No, unfortunately there is no way to perform a restore to a new (or different) filegroup.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.