on 2011 Dec 01 1:57 PM
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
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
52 | |
6 | |
5 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.