Another question about database mirroring: are clients redirected?

Another question I'm afraid.

I've just been reading some information about SQL database mirroring.  It lists the following 'features' of mirroring:

1. Full database redundancy
2. Near instantaneous failover within 3 seconds
3. Failover can be performed manually or automatically.
4. No special hardware requirements.
5. Ease of manageability as it is easy to set up and can be configured to be self monitoring for automatic failover.
6. Transparent client redirection

My question is about the 6th option.  I didn't know the clients were redirected if the database fails over to the mirror.  I thought you'd need SQL clustering for that.

If I have an application writing data to a database on Server1 and it fails over to Server2, will the application start writing the information to the (now principle) database on Server2?
LVL 10
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

digital_thoughtsConnect With a Mentor Commented:
It depends on how you are connecting to your database, but take a look at
brejkConnect With a Mentor Commented:
If this application uses SQL Native Client OLEDB you can use FailoverPartner keyword in your connection string to cause transparent redirection.
SvenTech Lead Web-DevelopmentCommented:
When using ADO.NET or the SQL Native Client and using a third sql server as witness, you can have automatic redirecting on failover.

If you are using classic ADO or another connection to sql server you have to write a script for the redirecting yourself.
Basically if the witness and server 2 agree that server 1 has gone down then yes the writing will then commence on server 2 as the primary then when server 1 comes back online it will be synchronised by server 2 and then become the redundant back up
sorry should be clear when server 1 comes back and is then synchronised again with server 2, server 1 will then be the back up
All Courses

From novice to tech pro — start learning today.