locked
Cannot mirror one of the databases RRS feed

  • Question

  • Ive got 2 SQL 2005 servers with SP2. I did setup mirroring from server A to server B via the GUI. For most of the databases this does work correctly.
    However one of the databases does not want to be setup, giving the error Database does not exist on the mirror server instance.
    But it does exists on the mirror. I use the same procedure as with the other database and those work.

    Only difference I can find between the databases is that this database consists of several files.

    Does anyone have suggestions for me to resolve this ?

    Thursday, September 17, 2009 5:05 PM

Answers

  • Hi,

    To troubleshooting the issue, try the following steps:
    1. Make sure the name of the mirror database is the same as the name of the principal database.
    2. Check the paths of the mirror database files are identical to the paths of the principal database files. If the paths of the principal and mirror database differ, you need to include the MOVE option in the RESTORE statement when restore the database in the mirror server. 

    RESTORE DATABASE AdventureWorks
       FROM DISK='C:\AdventureWorks.bak'
       WITH NORECOVERY, 
          MOVE 'AdventureWorks_Data' TO 
             'D:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Data\AdventureWorks_Data.mdf', 
          MOVE 'AdventureWorks_Log' TO
             'D:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Data\AdventureWorks_Log.ldf';
          MOVE 'AdventureWorks_ Data2' TO
             'D:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Data\AdventureWorks_ Data2.mdf';
    GO


    If there are any more questions, please let me know.
    Thanks.


    ***Xiao Min Tan***Microsoft Online Community***
    Monday, September 21, 2009 7:21 AM

All replies

  • Did you check the compatibility level , correct spelling () of both the databases?

    Thanks, Leks
    • Proposed as answer by LekssEditor Tuesday, September 22, 2009 4:13 AM
    Thursday, September 17, 2009 9:02 PM
    Answerer
  • Hi,

    To troubleshooting the issue, try the following steps:
    1. Make sure the name of the mirror database is the same as the name of the principal database.
    2. Check the paths of the mirror database files are identical to the paths of the principal database files. If the paths of the principal and mirror database differ, you need to include the MOVE option in the RESTORE statement when restore the database in the mirror server. 

    RESTORE DATABASE AdventureWorks
       FROM DISK='C:\AdventureWorks.bak'
       WITH NORECOVERY, 
          MOVE 'AdventureWorks_Data' TO 
             'D:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Data\AdventureWorks_Data.mdf', 
          MOVE 'AdventureWorks_Log' TO
             'D:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Data\AdventureWorks_Log.ldf';
          MOVE 'AdventureWorks_ Data2' TO
             'D:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Data\AdventureWorks_ Data2.mdf';
    GO


    If there are any more questions, please let me know.
    Thanks.


    ***Xiao Min Tan***Microsoft Online Community***
    Monday, September 21, 2009 7:21 AM
  • Ah. Stupid mistake. Checked it many times but kept overlooking a letter that was missing. a fresh day helped. Database name is long and not very friendly.
    Thanks anyway for the comments.
    Monday, September 21, 2009 11:39 AM