2

I've googled a great deal, and can't come up with an answer to this.

In SQL Server 2008R2 will currently deployed applications (Asp.Net, .Net Smart Client) still work (with a connection string pointing to a single DB server) if I turn on Mirroring without redeploying the apps?

The original apps are deployed and only expecting one server.

I understand the client apps without the "Failover Partner" section of the connection string won't know to use failover partner in the event of a primary failover event, however I don't want to break currently deployed apps. Rolling out new apps that are failover-aware will happen at one point, but would rather know the implications of setting up mirroring first.

Apologies if this should be on ServerFault as it pertains to .Net Application Access. Would ask in the Meta if my deadline allowed me the time.

1
  • My guess is that leaving "Failover Partner" out of the connection string (previously deployed apps) will just work like there is only one database server... but I'd prefer to not work of guesses!
    – Kenny
    Commented Dec 19, 2011 at 17:55

2 Answers 2

3

Yes, it'll be just fine and you'll fail over just fine, provided that the server that was the single server is online. If that server is totally down then without the connection string change the apps won't know how to find the other instance.

In short yes it'll work fine until you can get the connection strings updated.

3
  • Great, many thanks. I don't need the failover for existing apps, I just don't want to break what's already working.
    – Kenny
    Commented Dec 19, 2011 at 22:20
  • If you don't need the failover then don't setup mirroring for those databases. Mirroring is a database by database configuration so only configure it on the databases which actually need it.
    – mrdenny
    Commented Dec 19, 2011 at 22:22
  • I do need the failover for the next release of the same applications over the next few hours - I didn't expect it would actually work without changing the deployed connection strings, so that's great if it does. But the next releases will use the new connection strings, to the same databases. The main thing I wanted to avoid, was putting in place the mirroring, and then any client which doesn't use a special mirroring-aware connection string will not be able to connect any more.
    – Kenny
    Commented Dec 20, 2011 at 13:53
2

Yes, the client finds out the Partner name from the primary

See "Client-side Redirect" section in this MSDN whitepaper. My bold

You must specify the initial principal server and database in the connection string, and optionally the failover partner server.

...

The great advantage of using the database mirroring support built into ADO.NET and the SQL Native Client driver is that you do not need to recode the application, or place special code in the application, to handle a database mirroring failover.

However, it's always good to test of course in your particular setup...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.