CURRENT_CONNECTION

<< Context variables | FB 2.0 Language Reference | CURRENT_ROLE >>

CURRENT_CONNECTION

Available in: DSQL, PSQL

Added in: 1.5

Description

CURRENT_CONNECTION returns a unique identifier for the current connection.

Type: INTEGER

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 upon restore. Since the engine itself is not interested in this value, it is only incremented if the client reads it during a session. Hence it is only useful as a unique identifier, not as an indicator of the number of connections since the creation or latest restoration of the database. Please note that this will change in Firebird 2.1.

back to top of page
<< Context variables | FB 2.0 Language Reference | CURRENT_ROLE >>