Viewing cached connection details

When a user disconnects from a pool that has connection caching enabled, the query currently running on the connection is canceled, and the outgoing connection to the Adaptive Server is stored in an internal list. These connections are not associated with any particular thread, and therefore, cannot be queried through sp_who.

To establish how many cached connections there are for a server, particular user, application, or host, execute rp_who. See rp_who for syntax, instructions, and examples.

To determine how long a connection has been cached, execute rp_dump registered procedure, where all connections show up with a state of “CACHE.” For example:

<Cache thread: state=CACHE coord=<NONE>>
 server mask=0x0, busy time='04/30/04 21:52:57',
 transtate=CS_TRAN_UNDEFINED,
 app='isql', user='sa', host='oswaix1', db='master',
 conn=0x3114e368, current='monsoon_ASE1',  next='monsoon_ASE1', pool='POOL1',
 proc=0x0, cap set=CS_FALSE, next cursor=0, reason  code=0,
 reason text='', function=''
(return status = 0)

See rp_dump for more information.