RESTORING FILEGROUP

  • Hi Experts,

    I created a new database with the same structure of the old one and tooka file group backup of the old database(for testing) and when i tried to restore to the new database i am getting below error

    Msg 3154, Level 16, State 4, Line 1

    The backup set holds a backup of a database other than the existing 'FILEGROUP' database.

    Msg 3013, Level 16, State 1, Line 1

    RESTORE DATABASE is terminating abnormally.

    Please find the code i used

    RESTORE DATABASE [FILEGROUP] FILE = N'Test_dat', FILE = N'Test1data', FILE = N'TEST_QUAD', FILE = N'TEST_SEC', FILE = N'TEST_TRI' FROM DISK = N'F:\DIFF_FILEGROUP_ALL.BAK' WITH FILE = 1, MOVE N'Test_dat' TO N'F:\FILEGROUP.mdf', MOVE N'Test1data' TO N'F:\FILEDATA.ndf', MOVE N'TEST_QUAD' TO N'F:\SQL SERVER\FILE4.ndf', MOVE N'TEST_SEC' TO N'F:\SQL SERVER\FILE2.ndf', MOVE N'TEST_TRI' TO N'F:\SQL SERVER\FILE3.ndf', MOVE N'Test_log' TO N'F:\FILE_LOG.ldf', NOUNLOAD, REPLACE, STATS = 10

    GO

  • You cannot move filegroups from one database to another. A filegroup can only be restored to the database it was backed up from, or a restore of the database it was backed up from.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks alot Gail..

    Is it possible to restore the same database with a backup of all filegroup and then later with a backup of only one file group taken before the full filegroup backup??

  • I suggest you have a long read through file and filegroup backups and restores in Books Online.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • This link should answer your question

    http://support.microsoft.com/kb/281122

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

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