none
Database is not configured for database mirroring error. RRS feed

  • Question

  • I want to create mirroring. I follow exact steps described in "Database Mirroring in SQL Server 2005"(http://technet.microsoft.com/en-us/library/cc917680.aspx).
    While command 
    ALTER DATABASE [AdventureWorks] SET PARTNER = N'TCP://B.corp.mycompany.com:5022';

    gives me "Command completed successfuly", the next command 

    ALTER DATABASE [AdventureWorks] SET WITNESS = N'TCP://W.corp.mycompany.com:5022';
    gives me an error "Database [AdventureWorks] is not configured for database mirroring"
    Can anyone tell me what to do to overcome this error.
    Monday, August 10, 2009 2:35 PM

Answers

  • trouble was in restore...forgot choose "WITH NORECOVERY" .. .my mistake :(
    • Proposed as answer by Roman Tihonov Wednesday, August 12, 2009 11:03 AM
    • Marked as answer by Mark Han [MSFT] Tuesday, August 18, 2009 3:11 AM
    Wednesday, August 12, 2009 9:18 AM
  • As it appeared finally, the problem is that you CANNOT set witness server until you set  BOTH partner servers (database and mirror), i.e. before executing the second statement on server A you have to execute stetement

    ALTER DATABASE [AdventureWorks] SET PARTNER = N'TCP://A.corp.mycompany.com:5022';

    on server B.
    • Marked as answer by Alex Mosky Tuesday, August 18, 2009 11:22 AM
    Tuesday, August 18, 2009 11:22 AM

All replies

  • same problem
    Wednesday, August 12, 2009 6:01 AM
  • Can you run the query below in all the 3 instances and make sure you have started mirroring end point in all the three instances. If its not started can you please start it and then give a try.
    SELECT name,protocol_desc,type_desc,state_desc
    FROM sys.database_mirroring_endpoints;
    

    Vidhya Sagar. Mark as Answer if it helps!
    Wednesday, August 12, 2009 7:30 AM
    Moderator
  • trouble was in restore...forgot choose "WITH NORECOVERY" .. .my mistake :(
    • Proposed as answer by Roman Tihonov Wednesday, August 12, 2009 11:03 AM
    • Marked as answer by Mark Han [MSFT] Tuesday, August 18, 2009 3:11 AM
    Wednesday, August 12, 2009 9:18 AM
  • As it appeared finally, the problem is that you CANNOT set witness server until you set  BOTH partner servers (database and mirror), i.e. before executing the second statement on server A you have to execute stetement

    ALTER DATABASE [AdventureWorks] SET PARTNER = N'TCP://A.corp.mycompany.com:5022';

    on server B.
    • Marked as answer by Alex Mosky Tuesday, August 18, 2009 11:22 AM
    Tuesday, August 18, 2009 11:22 AM