Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

I know you can set the connection parameter (CON=...) and SQLAnywhere will show it in connection_property('name'). But if you don't set it at connection time, SQLAnywhere shows something like SQL_DBC_16544f00.

Is it safe to say that SQLAnywhere creates a complete random and unique name for each connection? Even in two different databases?

I would like to know how SQLA creates this random name. Best

asked 01 Dec '11, 13:57

MarcosCunhaLima's gravatar image

accept rate: 0%

It is just a hex representation of a pointer to an object allocated for the connection inside dblib. It is not guaranteed to be very random. In fact, two identical apps are very likely to get the same connection name. No two connections that are open at the same time and established from a single process will have the same connection name; however, the name can be reused if the app disconnects and reconnects.

permanent link

answered 01 Dec '11, 14:02

John%20Smirnios's gravatar image

John Smirnios
accept rate: 37%

edited 01 Dec '11, 14:08


Based on your answer No two connections that are open at the same time and established from a single process will have the same connection name, can two connections in the same database have identical connection names?

(01 Dec '11, 14:25) MarcosCunhaLima
Replies hidden

Yes, they can have the same connection names. Two connections from different apps can have the same name at the same time and, as noted in my first response, for two identical client apps it is even likely that they will have the same name.

(01 Dec '11, 14:33) John Smirnios
Comment Text Removed
Comment Text Removed

To clarify, it is the SA client library that generates the name for the connection (if one is not specified) and therefore it is possible for two client applications to generate the same name.

(01 Dec '11, 15:17) Mark Culp
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: 01 Dec '11, 13:57

question was seen: 2,103 times

last updated: 01 Dec '11, 15:17