Is it possible for the client to connect to the Mirror server after connection is broken between Principal DB and Mirror DB

  • Hi,

    Earlier mirror was configured but due to some reason the connection was broken between principal server and Mirror server, mean there is no mirroring now. The connection string in web config file is

    <Database>

    <Name>XYZ</Name>

    <DataSource>Principal DB(IP);Mirror DB(IP)</DataSource>

    <Database>DBName</Database>

    <UserID>User</UserID>

    <Password>Password</Password>

    </Database>

    My Question is, Is there any chance for the client to connect Mirror DB.

  • Is the database online on the mirror server ? Did it failover? If it hasnt then whats the point of connecting to the mirror, If it has you can simple change the connection string in the application to point to the mirror.

    If future to avoid problems try specifying the failover partner in the connection string.

    https://msdn.microsoft.com/en-us/library/5h52hef8%28v=vs.110%29.aspx

    Jayanth Kurup[/url]

  • Yes Mirror server(Services is running) is online. But mirroring is not configured. In the connection string

    "<DataSource>Principla Server(IP);Mirror Server(IP)</DataSource>" is written

  • What provider are you using , Native SQL , OLEDB ,ADONET?

    Jayanth Kurup[/url]

  • it may be Ado net or Native SQL, but i am not sure which provider is being used. it is not written in config file.

  • at any given point in time mirroring requires that only one instance of the database is available for user connections. If the primary and secondary are up and running and syncing then the primary is where the user will connect.

    If the primary has failed and mirroring has automatically switched to the secondary then based on your connection string users will be redirected to the secondary when the reestablish a connection.

    If Primary failed and failover to secondary has not happened. Then the primary is no longer available and the mirror is not up yet so regardless of the connection string there is no database to connect to on either the primary or the secondary . Hope this helps.

    Here is a link that might help clarify the internals.

    https://msdn.microsoft.com/en-us/library/ms175484.aspx

    Jayanth Kurup[/url]

  • Thanks allot Jayant for your kind information.

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

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