I can't restore anymore...

  • So I have to restore to a test environment a dozen database backups from production. No big deal. The first ten or sop no problem, I moved the backuops to the testserver, chose RESTORE for the databases concerned, CHECKED THE BOX OVERWRITE EXISTING DATABASE and hit OK.

    With the last 2 databases I receive an error:

    The backup database is different than the database to which it is restored....

    I explicitly check the option OVERWRITE the existing database. Why do I get this message> I can't explain this.

    TIA,

    Hans Brouwer

    Greetz,
    Hans Brouwer

  • Are all databases being restored to a server that is the same version as the source?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • I suspect some of the databases probably have different drive or file configurations. You can't just replace these. You'll need to use a MOVE operation.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • to be able to use the replace option and overwrite the existing database to the existing file locations the logical file names and no of files must match.

    Run restore filelistonly through T-SQL, how do the file layouts compare to the target database?

    ---------------------------------------------------------------------

  • Tnx for answering all.

    The number of files are the same for all DB's, 1 .MDF and 1 .LDF.

    The logical names are the same on PROD(source) and TST(target). Location is different, but I checked one of the DB's which gave me no problem, and there file locations where different as well.

    I have not checked options yet, but could a difference there cause this error? Cant imagine that.

    I have changed the location given, which is from the PROD-server, to the location on the TST-server, but I did not have to do this for other backups, which restored without problem.

    I am going to try a restore through script, without the .LDF, don't need that.

    Tnx again,

    Hans Brouwer

    Greetz,
    Hans Brouwer

  • FreeHansje (8/9/2011)


    I am going to try a restore through script, without the .LDF, don't need that.

    Hans Brouwer

    its not possible to omit the log from the restore, What exactly did you mean by that?

    ---------------------------------------------------------------------

  • You are right, I was thinking of an attach-statement, has no truck here.

    Anyways, 2 of the 3 offending databases have been succesfully restored, I will try the 3rd tonight,it's a big DB.

    What I did, after reading some remark on the internet, is to first do a backup restore of the log with truncate only, than make a full database backup and used that to restore the database on the test-server. This worked, don't ask me how. Hopefully this will work as well for the last database.

    Tnx again al for answering.

    Greetz,

    Hans Brouwer

    Greetz,
    Hans Brouwer

  • FreeHansje (8/9/2011)


    You are right, I was thinking of an attach-statement, has no truck here.

    Anyways, 2 of the 3 offending databases have been succesfully restored, I will try the 3rd tonight,it's a big DB.

    What I did, after reading some remark on the internet, is to first do a backup restore of the log with truncate only, than make a full database backup and used that to restore the database on the test-server. This worked, don't ask me how. Hopefully this will work as well for the last database.

    Tnx again al for answering.

    Greetz,

    Hans Brouwer

    Congrats for shooting yourself into the foot. Make sure you keep that backup and <re>start the log backup chain. Make sure you read both of those because you go any further :

    http://www.sqlservercentral.com/articles/64582/

    http://www.sqlservercentral.com/articles/Transaction+Log/72488/

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

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