none
error mirroring 2016 (sp2) sql server and got the success message for mirroring configuration RRS feed

  • Question

  • hi

    I tired configuring the mirroring 2016 sql server  and got the success message for mirroring configuration but when I start the mirroring my primary database shows Primary/Synchronized where as my secondary server shows in Recovery.


    ajitkumar

    Thursday, October 3, 2019 10:14 AM

All replies

  • Hi ajit kumar1991,

     

    First check the sql server error log, whether there is an error message related to the mirror, show it to us.

     

    You can the following steps to fix your issue:

     

    1.ALTER DATABASE <datbasename>  SET PARTNER OFF;

       RESTORE DATABASE  <datbasename>  WITH RECOVERY; 

       ALTER DATABASE <datbasename>  SET PARTNER RESUME;

     

    2.View the status of endpoints on the principal and mirror servers

    SELECT state_desc FROM sys.database_mirroring_endpoints  //View the status of endpoints

     

    ALTER ENDPOINT Endpoint_Mirroring

    STATE = STARTED

    AS TCP (LISTENER_PORT = <port_number>)

    FOR database_mirroring (ROLE = ALL);

    GO                                                                                                       //start endpoint  , if it is stopped.

     

    3.Restart the db mirroring end point:

    ALTER ENDPOINT<Endpoint Name> STATE=STOPPED            //To stop

    ALTER ENDPOINT<Endpoint Name> STATE=STARTED           //To start

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Friday, October 4, 2019 3:17 AM
  • I had got another issue when I have configure mirror server --handshake error got it.. principle server-- The target machine is refused it


    ajitkumar

    Friday, October 4, 2019 12:27 PM
  • I saw that you have opened another thread, and the people on the forum will help you in that thread.

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, October 7, 2019 1:21 AM
  •                         

    hi

    I tired configuring the mirroring 2016 sql server  and got the success message for mirroring configuration but when I start the mirroring my primary database shows Primary/Synchronized where as my secondary server shows in Recovery.


    ajitkumar

    Monday, October 7, 2019 7:05 AM
  • where as my secondary server shows in Recovery
    Sure it do, that's how mirroring works. The secondary stays in recovery mode to restore the log files.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Tuesday, October 8, 2019 6:38 AM
  • hi Olaf,

    still got same error , mirror database In recovery mode. Please understand my pain to resolve my issue.

    port is already open both server  5022 & 5023.


    ajitkumar

    Friday, October 11, 2019 6:54 AM