ODBC Connection to SQL Server Database

I am opening a database connection to SQL Server 2008 mirrored principal database with ODBC from Java program. Can we specify mirrored node with connection string or use any other driver in Java in order to automatic failover of connection in case the database fails over.
more ▼

asked Jan 26, 2012 at 12:13 PM in Default

inder gravatar image

211 18 19 22

@Inder are you using ODBC or JDBC?
Jan 26, 2012 at 09:15 PM Usman Butt
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

I believe that the name is Failover_Partner, i.e.

Driver={SQL Server Native Client 10.0}; 
/*creds go here or Trusted_Connection=yes is specified */
more ▼

answered Jan 26, 2012 at 12:50 PM

Oleg gravatar image

15.9k 2 4 24

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Jan 26, 2012 at 12:13 PM

Seen: 670 times

Last Updated: Jan 26, 2012 at 12:13 PM