Multiple filegroups and backups / restores

  • Hi,

    Been trying to do this for a few days but with no joy so hopefully somebody can help me out.

    As a test I have taken a very large database in production and put all the data and indexes in a second filegroup.

    The reason is I would like to be able to just restore the primary file group (schema etc) into development as I don't want all the production data but still maintain the subset of data in development in it's secondary filegroup.

    The problem is the secondary filegroup is showing as being in a 'RESTORING' state and is inaccessible every time I try it.

    Steps followed are:-

    1. Backup the production primary file group (a).

    2. Backup the production transaction log (b).

    3. Backup the secondary file group in development (c).

    4. Backup the development transaction log (NORECOVERY).

    5. Restore (a) over the top of the development primary file group (NORECOVERY).

    6. Restore (b) over the top of the development transaction log (RECOVERY).

    Plus a couple of different combinations.

    Is there a way around this or is it just not possible.

    Thanks,

    Jason

  • Try this:

    RESTORE DATABASE <DBNAME> WITH RECOVERY

  • Not very funny.

  • Have you tried to restore Secondary Filegroup ? I am not sure, but I think its required to restore "All" filegroups.

    Jack

Viewing 4 posts - 1 through 3 (of 3 total)

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