240 pts.
 Database Mirror connection string in sql 2008
Hi All, I have three databases which i have configured mirror on sql server 2008 for all the databases. Manual Failover with one principal and mirror. (Witness planning in the future) Using Windows authentication (Since same login and pass, neither new endpoints are created and not certificate created) This is working smoothly. I have 7 .net applications which uses these three databases. All the 7 applications uses the same three databases. 1)I need how to provide the connection strings for these applications to get connected. 2)In case if failover is applied on only one databes, then how does it work? Because in some joins I have to connect two different databases and retrive the data. What will be the syntax for the connection strings in this case. What are the steps to be taken care to run the applications smoothly.? Thanks for any inputs.

Software/Hardware used:
ASKED: February 11, 2009  7:30 PM
UPDATED: February 13, 2009  9:37 PM

Answer Wiki:
You should just need to add "Failover Partner=myMirrorServerAddress;" to the connection String. If you are using cross database joins then both databases will need to be active on the same server for the joins to work, otherwise you will get an error saying that the database isn't available.
Last Wiki Answer Submitted:  February 11, 2009  10:50 pm  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Thanks for your reply.

In case if i need to failover a single db, then i have to failover all the other db’s on the server.

 240 pts.

 

Thanks MRDenny
Also, will i have any performance gains if i use different ports for each individual db on the server, as i have three db’s to configure mirror.

 240 pts.

 

No you won’t. I’m not sure if you even can. I think you can only have one Mirroring Endpoint per instance.

 64,520 pts.