Testing seems to indicated that a unique connection number is assigned to each connection established on each instance of any database started on one instance of a SQL Anywhere server. In other words, connections on two different databases started on the same server instance will get different connection numbers. If one of the databases is stopped and started, new connections to that database will get different connection numbers. Is that true? asked 31 Dec '13, 17:14 Breck Carter |
Correct. Connection numbers are monotonically increasing numbers and are guaranteed to be unique across the entire server instance (and are independent of the database). Note that once the max connection number is reached (which is some number less than 2^32) the 'base number' (of the sequence) wraps back to 1 but the server will still guarantee that the number is unique when it assigns a number to a new connection (i.e. it verifies that a connection with the number does not already exist). HTH answered 31 Dec '13, 17:24 Mark Culp Just to be pedantic... the uniqueness property you describe also applies to the large-valued internal, service and web connection numbers as well, correct?
(01 Jan '14, 09:19)
Breck Carter
Replies hidden
1
FWIW, the uniqueness is documented in the docs:
AFAIK, that particular numbering scheme has been introduced in 8.0.3/9.0.1 - before that, the IDs did not start with 1 after a database server start.
(02 Jan '14, 04:08)
Volker Barth
Replies hidden
Volker is correct. These unique connection IDs were introduced in 8.0.3 and 9.0.1.
(02 Jan '14, 11:15)
Ian McHardy
|