none
Restoring Database error!!!!!!The backup set holds a backup of a database other than the existing 'my_database' database

    Question

  • Hi!
    I am using sql server 2005 toi make ma database.the problem i am facing is that i have a local server where i have made my database.....now i want to take the same database to my actual server....the problem i am facing is that whenever i backup my database and tried to restore it on the server, i get the following error:


    TITLE: Microsoft SQL Server Management Studio ------------------------------ Restore failed for Server 'abc_SERVER'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'my_database' database. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&LinkId=20476 ------------------------------ BUTTONS: OK -----


    Plz help me in this regards

    BR
    OMar_Aa
    Thursday, September 25, 2008 3:07 AM

All replies

  • Look up RESTORE FILELISTONLY in books online.  It will let you see what is in the file.  There is a restore parameter for the number of the file.

     

    If this doesnt help, post the results of RESTORE FILELISTONLY and the RESTORE COMMAND you are using (use the scripting capabilities in management studio to script the command that you are running.

    Thursday, September 25, 2008 3:13 AM
    Moderator
  • currently i m using the following script

     

    RESTORE DATABASE abc
        FROM DISK = 'C:\location\DB BAckup\xyz.bak'
                WITH REPLACE

     

    and can u plz guide me how can i use filelistonly??

    BR

    Thursday, September 25, 2008 3:17 AM
  • RESTORE DATABASE abc
        FROM DISK = 'C:\location\DB BAckup\xyz.bak'

     

    I think that will work.

    Thursday, September 25, 2008 3:20 AM
    Moderator
  •  

    i have tried ur suggested solution.......but i get the following error on it:

     

    Msg 3154, Level 16, State 4, Line 1
    The backup set holds a backup of a database other than the existing 'my_database' database.
    Msg 3013, Level 16, State 1, Line 1
    RESTORE DATABASE is terminating abnormally.

     

     

    what shud i do now??

    BR

    Thursday, September 25, 2008 3:38 AM
  •  omar_aa wrote:

     

    i have tried ur suggested solution.......but i get the following error on it:

     

    Msg 3154, Level 16, State 4, Line 1
    The backup set holds a backup of a database other than the existing 'my_database' database.
    Msg 3013, Level 16, State 1, Line 1
    RESTORE DATABASE is terminating abnormally.

     

     

    what shud i do now??

    BR

     

    Hi:

    Please:

    http://blog.sqlauthority.com/2007/09/27/sql-server-fix-error-3154-the-backup-set-holds-a-backup-of-a-database-other-than-the-existing-database/

     

    Hope this helps.

    Thursday, September 25, 2008 4:50 AM
    Moderator