> i need to access some connection unique identifier from SQL.
>
[quoted text clipped - 44 lines]
>
> Any ideas on any of the above?

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
>> i need to access some connection unique identifier from SQL.
<snipped>
> http://publib.boulder.ibm.com/infocenter/db2luw/v8//topic/com.ibm.db2.udb.doc/ad
min/r0011856.htm
>
> Third function in the list :-) Just in case you are not blessed with DB2 V8.2
> http://www-128.ibm.com/developerworks/db2/library/techarticle/0302stolze/0302sto
lze.html
May I jump in with a question..?
What are the rules for the valid lifetime of this identifier? ie. when would the same ID be
"reused" for a different client? I'm having a hard time grokking the following statement from the
infocenter:
"The value returned by this function is only unique for the period of time during which the client
can use the same value again."
Eric
Knut Stolze - 03 Mar 2006 14:18 GMT
> What are the rules for the valid lifetime of this identifier? ie. when
> would the same ID be
[quoted text clipped - 3 lines]
> "The value returned by this function is only unique for the period of time
> during which the client can use the same value again."
Now that is a truly strange sentence. ;-)
The application ID contains the IP address of the client (or "*LOCAL" for
local connections), the instance name and the timestamp when the connection
was established. The timestamp uses only 2-digit years and no subseconds.
But if two connections from the same client come to the same instance, the
ID is made unique (I don't know exactly how).
So this will give you the amount of "uniqueness" that you get: you might
have recycled IDs after 100 years. Question is if you have to worry about
this or not.

Signature
Knut Stolze
DB2 Information Integration Development
IBM Germany