Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

With odbc driver of I have the situation, that the database server is not found, if I use DoBroadcast=direct in the connection string. Using the same string without the DoBroadcast works.

Reason seems to be that 2 DB servers are running on the attempted machine one on default port 2638 and one on alternate port 49157. The DB server I am looking for is running on the alternate port.

Is this a bug or have I misunderstood the concept of DoBroadcast=Direct

asked 29 May '12, 08:01

Martin's gravatar image

accept rate: 14%

Does the connect work if you specify the server's port number in the connection string, such as

CommLinks=tcpip(DOBROADCAST=DIRECT;HOST=silver;PORT=49157) demo


(29 May '12, 08:14) Volker Barth

When you use the DoBroadcast=Direct connection property you must specify the host and port number that the server is listening on. Another way of thinking of it is that the 'direct' options says 'I know what I am doing; do not do any redirection'. Since you did not specify a port in your connection string the client defaulted to 2638.

As Volker suggested in his comment, if you add the port to the connection string you should be able to connect.

permanent link

answered 29 May '12, 08:59

Mark%20Culp's gravatar image

Mark Culp
accept rate: 41%

Why do you have to specify the port with DOBROADCAST=DIRECT? I thought you just had to specify the host, and SQL Anywhere would do a broadcast to that host.

(however, I only use NONE which does require both host and port, so my actual DIRECT experience is non-existent :)

(29 May '12, 09:12) Breck Carter

@Mark: Thanks for clarifying this. With your explanation I would suggest to add that to the documentation, currently it gives a different impression:

"With DoBroadcast=DIRECT, no broadcast is performed to the local subnet to search for a database server. Broadcast packets are sent only to the hosts listed in the HOST (IP) protocol option. If you specify DoBroadcast=DIRECT, the HOST (IP) protocol option is required."

(29 May '12, 13:54) Martin

To add to Mark's answer:

I guess the PORT is only needed if the server is not using the default port (2638) - that's a guess, I share @Breck's DIRECT experience:) - From the v11.0.1 docs on SERVERPORT:

If the database server's TCP/IP port number is not 2638, then the server listens to the same UDP port as the TCP/IP port.

In case the client sends a broadcast only to UDP port 2638 by default (which I don't know), it would explain why a server running on a different port would not get that broadcast...

permanent link

answered 29 May '12, 09:23

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

edited 29 May '12, 10:31

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: 29 May '12, 08:01

question was seen: 3,599 times

last updated: 29 May '12, 13:54