The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

Hello, I have one question for DB Mirror connection

How do I make a connection through ODBC to a mirror DB? In isql, I have been able to setup the two machines, and I was able to succesfully connect, but I do not know how to configure the OBDC for mirrored DBs (even if I know how to do it for a single one) I am using odbc for asa9 and asa12.

Thanks in advance.

asked 07 Jun '12, 10:01

Gizeh333's gravatar image

accept rate: 0%

edited 12 Jun '12, 06:10

Justin%20Willey's gravatar image

Justin Willey

Have you worked through the High Availability Tutorial in the documentation yet? If so, how far did you get in this tutorial? Did you get to step 13? If you received any errors during this tutorial, what were they? What commands did you already try?

(07 Jun '12, 10:16) Jeff Albion
Replies hidden

I have the higth Avalability finished and I not recived any error. I can connect to isql, and sybase Central correctly but I don't Know how configure the ODBC for my aplication connection.


(07 Jun '12, 10:46) Gizeh333

Okay, so that should mean that you made it successfully through Step 13, which was connecting to the HA system by specifying the 'alternative name' for the server (which in version 12.0.x is set up as part of the CREATE MIRROR SERVER statement):

  • Start Interactive SQL and connect to the primary server using the alternative server name for the primary server by running the following command:

dbisql -c "UID=DBA;PWD=sql;SERVER=mirror_demo_primary;HOST=localhost:6871,localhost:6872"

The "-c" is the Connection Parameter information that can also go into an ODBC DSN. You can use the dbdsn utility to specify the exact same "-c" connection information to create your ODBC DSN if you do not want to translate the values in the Microsoft ODBC Manager GUI.

If you are working with 32-bit applications versus 64-bit applications on a 64-bit Microsoft Windows operating system, be aware of which bitness of the ODBC driver you are trying to access. (See: for more details).

(07 Jun '12, 11:45) Jeff Albion

Thanks for you answer, but I already have tried that. Here is my ODBC Contiguration:

USer ID:dba Password:xxxx

Action: connect to a runing database on another computer

Host: pc1:6871;pc2:6872


Server_name= primary_server

With this configuration, I am having this error

"Connection Failed: Connection error: The HOST and LINKS options cannot both be specified"

Thanks in advance.

(08 Jun '12, 06:35) Gizeh333
Replies hidden

What's the full connection string?

It seems that besides the given parameter, there is also a setting for LINKS=...

(08 Jun '12, 07:17) Volker Barth
Comment Text Removed

Best thing is to use dbdsn -gu or -gs (for user or system dsn) followed by your ODBC dsn and then post what you see.

e.g., DBDSN -gs "my dsn"

As Volker said, there is likely going to be a LINKS= parameter in there.

(08 Jun '12, 10:50) JBSchueler

Sorry, I can pass you the information of the command, as the error I get when I try to save the settings. But a I see no option to configure the links, you can only configure the host.

Please, tell me as you can configure the ODBC connection for a system scaled and replicated.(DB mirror) Thanks

(11 Jun '12, 03:45) Gizeh333
Replies hidden

As you seem to use the GUI dialog to connect to the database, have a look at the "Network" tab. The "TCP/IP options" there are those that are used for the "LINKS" connection parameter. It seems there are some values set, otherwise you should not get the connection error "The HOST and LINKS options cannot both be specified".

(11 Jun '12, 03:54) Volker Barth

You were right.I have corrected.

Now the full connection string is: UID=dba;PWD=xxx;ServerName=server_s1;INT=NO;ENC=NONE; Host='host0:6871;host1:6872'

Now the error I get when doing a test connection is "Connection Failed: Connection error:Error in TCPIP port options"


(11 Jun '12, 04:46) Gizeh333



i.e. no quotes, and separate the hosts by a comma - cf. the docs.

(11 Jun '12, 05:05) Volker Barth

thanks!! So much trouble for a comma!!

(11 Jun '12, 05:50) Gizeh333
More comments hidden
showing 4 of 11 show all flat view

(That's just an attempt to answer the underlying question - see the flow of comments beneath the question:)

In a v12 HA setup, the clients will usually have to specify two host names in the HOST connection parameter. To do so, use a comma-separated list of host names (and ports, if necessaray). Cf. the sample connection string from the tutorial:

dbisql -c "UID=DBA;PWD=sql;SERVER=mirror_demo_primary;HOST=localhost:6871,localhost:6872"

permanent link

answered 11 Jun '12, 06:07

Volker%20Barth's gravatar image

Volker Barth
accept rate: 33%

@Gizeh333 - if this solved your problem - can you accept Volkers' answer (by clicking on the tick under the thumbs down symbol on the left) - that way future users with the same problem will know what to do! Thanks

(12 Jun '12, 06:10) Justin Willey
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 07 Jun '12, 10:01

question was seen: 2,851 times

last updated: 12 Jun '12, 06:10