Chapter 9. Context Variables

9.1 CURRENT_CONNECTION

Available inDSQL, PSQL

Syntax

CURRENT_CONNECTION

TypeINTEGER

DescriptionCURRENT_CONNECTION contains the unique identifier of the current connection.

Examples

select current_connection from rdb$database
 
execute procedure P_Login(current_connection)

The value of CURRENT_CONNECTION is a unique identifier of the current connection. Its value is derived from a counter on the database header page, which is incremented for each new connection. When a database is restored, this counter is reset to zero.