The forum will be unavailable for maintenance at some point from Friday, April 13 at 19:00 EDT until Sunday, April 15 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

I'm using SQL ANywhere 12.

I have set up a mirror DB and I would like to access it by using the server name (primaries) on both Mobilink and Tomcat (jcon 3). I can access the DB by server name no problem when the firewalls are disabled. however as soon as I turn on the firewalls (I already have exclusions for the server/mobilink ports 2638/2439), I can only access my mirror DB by specifying full URLs:

For example, with Firewalls off, I can use: - Tomcat: url="jdbc:sybase:Tds:asdf?ALTERNATE_SERVER_NAME=primaries - Mobilink (ODBC): I just enter user/pass and server name (primaries)

However, if I enabled Firewalls, I have to speficy both DB servers URLs to connect: - Tomcat: url="jdbc:sybase:Tds:DB1_URL:2638,DB2_URL:2638" - Mobilink (ODBC): I have to enter user/pass, host (DB1_URL:2638,DB2_URL:2638)

Generally, I don't mind, however, in the case of Tomcat, I find that if both DBs are up and DB_1 is the mirror, then Tomcat will always connect to it, and since DB_1 is mirror, access is read-only causing issues when I try to do DB updates. Thus, I would like to know why when my firewalls are up, the use of the 'server name' does not work (I presume it is because I'm missing extra ports I have to open).


asked 18 Dec '17, 13:19

fieldworker's gravatar image

accept rate: 0%

Do you need to use jConnect or would the SQL Anywhere JDBC driver do, as well? I guess the latter is easier to configure for HA setups as it can use the common SQL Anywhere connection parameters, i.e. those used in the HA samples.

(18 Dec '17, 15:39) Volker Barth
Replies hidden

Hi Volker, I would like to keep using the jconn3 driver if possible to minimize changes on my current setup

(19 Dec '17, 10:21) fieldworker

I do not use jConnect myself, but if you use the alternate server name (which is of course very reasonable in a HA setup!) , AFAIK host and port info is ignored, and an UDP broadcast is needed to locate the according server. I guess your firewall does block that broadcast...

Note, that is just wild guessing...

(19 Dec '17, 10:55) Volker Barth

Sorry for the late reply. Got sidetracked with other project stuff, So Volker, by chance, do you know which UDP port this is?

(19 Jan, 10:53) fieldworker
Replies hidden

AFAIK it uses the same ports for UDP as for TCP, by default 2638. On Windows, you can check via netstat -a -b -p UDP and look for the dbsrv12.exe.

Still I think using the SA JDBC driver would prevent the need to use broadcasts...

(19 Jan, 11:50) Volker Barth
Be the first one to answer this question!
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: 18 Dec '17, 13:19

question was seen: 229 times

last updated: 19 Jan, 11:50