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

What is the strategy of SQLA to reuse a connection id?

asked 09 Mar '12, 06:38

Martin's gravatar image

Martin
9.1k130170257
accept rate: 14%


AFAIK unique connection numbers are assigned for all connections to all databases started by one server execution instance, and they can be reused only by a different execution instance. Presumably, they can also be reused if the number wraps.

If you're keeping records: For a given database file, CONNECTION_PROPERTY ( 'Number' ) and CONNECTION_PROPERTY ( 'LoginTime' ) suffice to uniquely idenfify a connection.

permanent link

answered 09 Mar '12, 07:40

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

(02 Mar '15, 03:22) Martin

Just to add a quote from the v9.0.1 (and 8.0.3) "What's new" section:

Connection IDs start at 1 and are incremented for each new connection to the database server

When the database server is started, each connection to the server is assigned a connection ID, starting with 1, and the connection number is incremented with each new connection to the server. The connection IDs are logged in the -z server output and the LogFile connection parameter output. They are also used by the CONNECTION_PROPERTY, NEXT_CONNECTION, NEXT_DATABASE, and DROP CONNECTION functions, and by request logging.

(Internal/temporary connections used by events and the like are treated differently, as you'll know.)

For older versions, the behaviour was different, but I don't remember...

permanent link

answered 09 Mar '12, 08:40

Volker%20Barth's gravatar image

Volker Barth
40.4k363552824
accept rate: 34%

edited 09 Mar '12, 08:42

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×159

question asked: 09 Mar '12, 06:38

question was seen: 2,734 times

last updated: 02 Mar '15, 03:22