Restore of database failed

  • Hello,

    I am trying to restore a db to SQL 2012 but get an error instead.

    Restore of database 'Databasename' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)

    Additional Information:

    An exception occurred while executing a Transact-SQL statement or batch

    (MicrosoftSqlServer.SmoExtended)

    FILESTREAM failed to find the garbage collection table. (Microsoft SQL server, Error:5570)

    All my research turns up someone trying to restore a Master DB which I am not trying to do. I have restarted the service. Looked for hotfixes, ran windows updates, ran a check disk and quite a few other things. I am a SQL newbie and I'm not sure how file stream and garbage collection work.

    Any help is greatly appreciated.

  • Would you please post the command you are doing for the restore? Also, you say you are restoring to SS2012, what version is the current database - is it also SS2012?

    -SQLBill

  • I am restoring an 08 db SQL server 2012. I'm using SQL management studio to restore the .bak. Just using the right click restore database.

  • It's going to be difficult to tell what might be going wrong then. It could be a compatibility issue with moving a SS2008 database to SS2012. Have you tried doing the backup again in case the file got corrupted?

    I always suggest using code and not the GUI to do backup and restores. You might want to try this:

    RESTORE DATABASE databasename

    FROM DISK = 'path to backup file'

    GO

    -SQLBill

  • If you have a filestream container in this database, you might need to look at using a WITH MOVE here. I don't have a 2008 instance, but you potentially must first enable Filestream in the Configuration Manager, then do the restore and be sure the Filestream filegroup has a valid path.

  • Sorry about the late response. I did try restoring the DB through SQLCMD with no luck. It didn't error out, but it did show that it did the upgrade. I also noticed that in the MMSQL Data folder the .mdf and .ldf are named tempdb.mdf and tempdb.ldf. I did go to SQL configuration manager and enabled FILE STREAM, that didn't help either. One weird thing I noticed when restoring the db, the logical file name is master. This makes me think that at one point it was a master db and then was restored to a different db name.

  • I also ran SQLCMD restore database with recovery and it did error out. I added the error below.

    Processed 3672 pages for database 'DATABASENAME', file 'master' on file 1.

    Processed 8 pages for database 'DATABASENAME', file 'mastlog' on file 1.

    Msg 3013, Level 16, State 1, Server OWNER-PC\Computer2, Line 1

    RESTORE DATABASE is terminating abnormally.

    Msg 5570, Level 23, State 3, Server OWNER-PC\Computer2, Line 1

    FILESTREAM Failed to find the garbage collection table.

    Converting database 'DATABASENAME' from version 661 to the current version 706.

    Database 'DATABASENAME' running the upgrade step from version 661 to version 668.

    Database 'DATABASENAME' running the upgrade step from version 668 to version 669.

    Database 'DATABASENAME' running the upgrade step from version 669 to version 670.

    Database 'DATABASENAME' running the upgrade step from version 670 to version 671.

    Database 'DATABASENAME' running the upgrade step from version 671 to version 672.

    Database 'DATABASENAME' running the upgrade step from version 672 to version 673.

    Database 'DATABASENAME' running the upgrade step from version 673 to version 674.

    Database 'DATABASENAME' running the upgrade step from version 674 to version 675.

    Database 'DATABASENAME' running the upgrade step from version 675 to version 676.

    Database 'DATABASENAME' running the upgrade step from version 676 to version 677.

    Database 'DATABASENAME' running the upgrade step from version 677 to version 679.

  • Are you using the FILESTREAM_WITH option on the restore command? The documentation is not too specific, but I would assume it moves the Filestream data to a new directory.

    https://msdn.microsoft.com/en-us/library/ms186858%28v=sql.110%29.aspx

Viewing 8 posts - 1 through 7 (of 7 total)

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