October 24, 2015 at 5:31 am
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.
October 24, 2015 at 5:35 am
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
October 24, 2015 at 5:46 am
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
October 24, 2015 at 5:54 am
October 24, 2015 at 6:38 am
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.
October 24, 2015 at 11:12 am
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.
October 24, 2015 at 12:18 pm
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