Firebird Documentation Index → Firebird 2.1 Language Ref. Update → Context variables → CURRENT_CONNECTION |
Find a more recent version at Firebird 5.0 Language Reference: CURRENT_CONNECTION
Available in: DSQL, PSQL
Added in: 1.5
Changed in: 2.1
Description: CURRENT_CONNECTION
contains the unique identifier of the current
connection.
Type: INTEGER
Examples:
select current_connection from rdb$databaseexecute procedure P_Login(current_connection)
The value of CURRENT_CONNECTION
is stored on the database header page
and reset to 0 upon restore. Since version 2.1, it is incremented upon every new connection.
(In previous versions, it was only incremented if the client read it during a session.) As a
result, CURRENT_CONNECTION
now indicates the number of connections since
the creation – or most recent restoration – of the database.
Firebird Documentation Index → Firebird 2.1 Language Ref. Update → Context variables → CURRENT_CONNECTION |