Restoring file group error

  • I have created the file group for my database.First i took backup of individual file group(mdf and ndf) then I tried to restore primary file group but i got error as

    File 'testnvt2' was not backed up in file 1 on device 'D:vtprimary.bak'. The file cannot be restored from this backup set.

    RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3144)

    then i tried to restore only secondary file group, but again i got the error as

    File 'regSQL_dat' was not backed up in file 1 on device 'D:vtndf.bak'. The file cannot be restored from this backup set.

    RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3144)

    So why this error comes? How exactly to backup and restore only a single group or restore file groups?

  • Looks like the restore statements were specifying the wrong files. Post the restore statements you used.

    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
  • I used the SSMS gui option to restore the file group.

  • Script the restore that you used. Post the script.

    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
  • I found that while i restore primary file group in ssms by using only primary file group file backup file i used following script

    RESTORE DATABASE [test] FILE = N'test', FILE = N'test_ndf' FROM DISK = N'D:\test1.bak' WITH FILE = 1, NOUNLOAD, STATS = 10

    GO

    When i created script using ssms i found that i was restoring all file groups using only primary file group backup.But in options page of restore i was not able to remove other file group selections.

    Then from this automated script i changed something as

    RESTORE DATABASE [test] FILE = N'test' FROM DISK = N'D:\test1.bak' WITH Recovery;

    GO

    So here i am restoring only primary file group,the restore was successful but database could not be brought to online message came ,following is the message

    Processed 168 pages for database 'test', file 'test' on file 1.

    Processed 6 pages for database 'test', file 'test_log' on file 1.

    The roll forward start point is now at log sequence number (LSN) 37000000024300001. Additional roll forward past LSN 37000000028900001 is required to complete the restore sequence.

    This RESTORE statement successfully performed some actions, but the database could not be brought online because one or more RESTORE steps are needed. Previous messages indicate reasons why recovery cannot occur at this point.

    RESTORE DATABASE ... FILE=<name> successfully processed 174 pages in 0.283 seconds (4.786 MB/sec).

    So how can i restore only primary file group? And why above message has come?

  • Enterprise Edition? Or Standard?

    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
  • Microsoft SQL Server Management Studio version is 10.50.1600.1

    And server is sql server 2008 r2 express

  • Only Enterprise edition allows piecemeal restores (a database restored and online with only some of its filegroups). Since you're not running Enterprise edition, you'll need to restore the other filegroups, then restore log backups to bring the DB 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
  • thank u for replying.

    I have a doubt. All my database have recovery model full. If i do file group backup separately for primary file group regularly and secondary file group when only required then can i restore the backup in such a way that first i restore the latest primary file group backup and then old secondary file group backup. Is that possible in my sql environment?

  • You'd have to restore the primary filegroup backup, the the secondary, then all the log backups since the oldest of those 2 backups to bring the DB to a consistent point

    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
  • Hi Gail,

    Can partial restores be done with the Dev Version?

    Cheers

    Jamie

    We are the pilgrims, master.
    We shall go always, a little further.
  • Developer edition is exactly the same as Enterprise, just with restricted licensing.

    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

Viewing 12 posts - 1 through 11 (of 11 total)

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