New topics: Your Pet, IOU, Baby IQ, The Poisons, Birther II, Games, Future Power

SQL Server Errors on Restoring a Database Backup

Skip to end of sidebar
Go to start of sidebar
Skip to end of metadata
Go to start of metadata
What am I trying to do?
Have a SQL Server 2005 database on one machine, 'Some', stored at e:\SomeDB\Some.mdf and e:\SomeDB\Some_log.ldf.

Created a backup (Right click database, backup) named latest.some.sql.bak.

I am trying to restore this on a second machine with differently lettered drives.

I moved this backup file to the second machine at C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup

Restore Failed For Server - cannot find the path

Restore failed for Server

System.Data.SqlClient.SqlError: Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL\data\MyDB_Data.MDF" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Smo)

Google: "restore failed for server" "directory lookup" http://forums.asp.net/thread/1287897.aspx

Holds a backup of a database other than the existing

On second machine, tried creating database called 'Some', with files stored at c:\SomeDB_From_First_20070419\Some.mdf and c:\SomeDB_From_First_20070419\Some_log.ldf. I see the files there.

I then right click the new database in *Microsoft SQL Server Management Studio", and select the restore database task. I select the backup the file.

Equivalent SQL command:
RESTORE DATABASE [some] FROM  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\latest.some.sql.bak' 
   WITH  FILE = 1,  NOUNLOAD,  STATS = 10
GO
Msg 3154, Level 16, State 4, Line 1
The backup set holds a backup of a database other than the existing 'Confluence' database.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

When I try from the dialog it, I get "Restore Failed for Server 'Second\SQLServer': System.Data.SqlClient.SqlError: The backup set holds a back of a database other than the existing 'Some' database (Microsoft.SqlServer.Smo)

Help for the database other than existing: LinkID 20476. Click there gets "We're sorry
There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base databases at this time. You can use the links in the Support area to determine whether any additional information might be available elsewhere." Thanks Microsoft...

Google: "restore failed for server" "backup set holds a backup of a database"

So I go to the options tab for the restore dialog, and click "Overwrite the existing database." Then click Script to new query window and I get:

RESTORE DATABASE [some] FROM  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\latest.some.sql.bak' 
    WITH  FILE = 1,  NOUNLOAD,  REPLACE,  STATS = 10
Msg 3257, Level 16, State 1, Line 1
There is insufficient free space on disk volume 'C:\' to create the database. The database requires 39,032,127,488 additional free bytes, while only 8,287,948,800 bytes are available.
Msg 3119, Level 16, State 4, Line 1
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

This error makes it seem like I am on track... I didn't realize my original database was so big. Whoops it is, 1.5GB for the .mdf, and 36.6GB for the log.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. May 24, 2009

    Hi all,

    I had a similar problem while restoring a SQL Server database to another SQL Server instance.

    I had solved the problem by the method I had described at "backup set holds a backup of a database other than the existing database" by choosing the overwrite option and identifying the database files manually.

  2. Aug 02, 2010

    Anonymous

    tkssssssss

  3. Oct 26, 2010

    Anonymous

    Thanks! It worked...

  4. Nov 16, 2010

    Anonymous

    Gra888 Job. Thanks

Add Comment