Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL 2012 Mirroring and Failover help

$
0
0

Ok so i've been experimenting with SQL 2012 & Database Mirroring & i have successfully configured Mirroring of a database with a Witness server below is the info.

1. SQLSRV-PRI

2. SQLSRV-SEC

3. SQLSRV-WIT

Now We use a custom application that relies on database, my question may be a n00b one here as i am new to Mirroring.

In my Custom Application out of the 3 servers which one do i put in the Database connection strings?

I am not sure if I have even configured it correct or not so i need your help.

It only works when i enter the 1st database connection string (SQLSRV-PRI).

Server 2 is at Mirror / synchronized / restoring and does not allow me to connect to the database using SQLSRV-SEC as server.

Server 3 has nothing, no database or anything (except for system databases)

And the failover is automatic so i know that the WItness is doing its job.

So my only option is to enter server 1 and i do that and everything in the application works fine as it should. but when I stop the services on Server 1 thats where it goes wrong.

In SQL management studio i see that the SQLSRV-PRI is off / disconnected & now SQLSRV-SEC is the Principal, Disconnected and witness is .....well empty

which again means that mirroring is functioning, but the application is now no longer functional, gives errors related to databases that i could not connect to sql etc.

I am really not a DBA, I am a windows server guy & i wanted to know that when do Network Load Balancing in Windows with 2 / 3 server it would then give you a common address when you could connect to and it would send you to any of the servers in that load balancing group. Is there something similar that I am missing in the setup here? or is this how Mirroring is supposed to be? how can we connect custom applications to a SQL HA when we have to manaully change the Database server each time the Primary Server disconnects?

Hope you guys can help!


Viewing all articles
Browse latest Browse all 4871

Trending Articles