|Subject||Re: [firebird-support] How non-SYSDBA user can see connections by other users?|
> SYSDBA users can see other connected users using monitoring tablesYes, you can use database level on connect/on disconnect triggers. E.g.
> but is it possible to implement such feature for non-SYSDBA users? Are
> there event/triggers that act uppon connecting and disconnecting and
> which can insert usual database records. Triggers no MON$ tables are
> not suitable because MON$ tables are populated only during query time.
CREATE TABLE CONNECTED_USERS (
GRANT SELECT ON CONNECTED_USERS TO PUBLIC;
SET TERM ^;
CREATE TRIGGER TR_ON_CONNECT ON CONNECT AS
INSERT INTO CONNECTED_USERS(ID, USERNAME) VALUES (CURRENT_CONNECTION,
CREATE TRIGGER TR_ON_DISCONNECT ON DISCONNECT AS
DELETE FROM CONNECTED_USERS WHERE ID=CURRENT_CONNECTION;
SET TERM ;^