Firebird 2.5 Language Reference → Firebird 2.5 Language Reference → Monitoring Tables → MON$ATTACHMENTS |
Table of Contents
MON$ATTACHMENTS displays information about active attachments to the database.
Column Name | Data Type | Description | ||
---|---|---|---|---|
MON$ATTACHMENT_ID | INTEGER | Connection identifier | ||
MON$SERVER_PID | INTEGER | Server process identifier | ||
MON$STATE | SMALLINT | Connection state:
|
||
MON$ATTACHMENT_NAME | VARCHAR(255) | Connection string—the file name and full path to the primary database file | ||
MON$USER | CHAR(31) | The name of the user who is using this connection | ||
MON$ROLE | CHAR(31) | The role name specified when the connection was established. If no role was specified when the connection was established, the field contains the text NONE | ||
MON$REMOTE_PROTOCOL | VARCHAR(10) | Remote protocol name | ||
MON$REMOTE_ADDRESS | VARCHAR(255) | Remote address (address and server name) | ||
MON$REMOTE_PID | INTEGER | Remote client process identifier | ||
MON$CHARACTER_SET_ID | SMALLINT | Connection character set identifier (see RDB$CHARACTER_SET in system table RDB$TYPES) | ||
MON$TIMESTAMP | TIMESTAMP | The date and time when the connection was started | ||
MON$GARBAGE_COLLECTION | SMALLINT | Garbage collection flag (as specified in the attachment's DPB): 1=allowed, 0=not allowed | ||
MON$REMOTE_PROCESS | VARCHAR(255) | The full file name and path to the executable file that established this connection | ||
MON$STAT_ID | INTEGER | Statistics identifier |
Monitoring tables are read-only. However, the server has a built-in mechanism for deleting (and only deleting) records in the MON$ATTACHMENTS table, which makes it possible to close a connection to the database.
Notes | |
---|---|
|
Example: Closing all connections except for your own (current):
DELETE FROM MON$ATTACHMENTS WHERE MON$ATTACHMENT_ID <> CURRENT_CONNECTION
Firebird 2.5 Language Reference → Firebird 2.5 Language Reference → Monitoring Tables → MON$ATTACHMENTS |