cancel
Showing results for 
Search instead for 
Did you mean: 

How are connection numbers assigned?

Breck_Carter
Participant
1,754

It sounds impossible, but I just had a sequence of dbping executions that ran the connection number up beyond 400,000 on a SQL Anywhere 16 database. It only takes a few milliseconds for a connect/disconnect so exhausting the INTEGER range is not out of the question.

If the connection number wraps to 1, do new connection numbers step over small assigned values that are still in use?

Do new connection numbers "step over" high-valued connection numbers (events, services, backups, exchanges, etc)?

Accepted Solutions (1)

Accepted Solutions (1)

ian_mchardy
Advisor
Advisor

The range of user connection numbers is from 1 to 999,999,999. If you did have more than a billion connections and disconnections, the connection numbers would start from 1 again, but they would not reuse any connection numbers already in use.

So the ranges for user and temporary connection numbers are never violated, and even if you use more than a billion connection numbers, there can never be two connections with the same number.

Answers (1)

Answers (1)

MCMartin
Participant

See also this question: When will SQLA reuse the connection id