Restoring just a single filegroup for support purposes

  • We have a large (ish) production database in our data centre which causes a problem when we need to restore a copy for support purposes.

    Currently we have to take a backup, restore it in the data centre. Drop some large tables. Back it up again and then copy it locally.

    As this approach isn't ideal (!) I was wondering if we could improve things with the use of filegroups. I could add an additional filegroup to the database and then move the large tables onto the new filegroup. For our support team they could just backup the original filegroup and restore it locally.

    The only problem I can see is that we might need to create the missing tables in order for our application to function. (ie. we need the tables but not the data).

    I've done some tests and I can't seem to recreate the table/ drop the old table / drop the old file / drop the old filegroup as the filegroup is offline.

    For example

    "Cannot drop the table 'dbo.LargeTable' because at least part of the table resides on an offline filegroup."

    I tried restoring the database with and without the PARTIAL keyword. I've also tried attaching and detaching the restore database without success.

    I've attached a script used for my tests

    Any advice?

    thanks in advance

    David

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply