9.1. CURRENT_CONNECTION
Available in
DSQL, PSQL
Syntax
CURRENT_CONNECTION
Type
INTEGER
Description
CURRENT_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 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.