Subject | Re: [firebird-support] Database triggers |
---|---|
Author | Alexandre Benson Smith |
Post date | 2009-09-22T20:07:51Z |
Aage Johansen wrote:
Anyway you are asking for information that is not available to firebird
(the user that is logged at the PC)
From the release notes:
Database Triggers
Adriano dos Santos Fernandes
(v.2.1) A database trigger is a PSQL module that is executed when a
connection or transaction event occurs.
The events and the timings of their triggers are as follows.-
CONNECT
• Database connection is established
• A transaction is started
• Triggers are fired; uncaught exceptions roll back the transaction,
disconnect the attachment and are returned
to the client
• The transaction is committed
As you can see the first step is a connection to the database, if you
provide a bad login, no connection would be established.
HTH
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> Is it possible to use the CONNECT event of the database triggers toNever tried that.. but I don't think so.
> catch failed attempts to log in to a database? Maybe only successful
> logins triggers the trigger?
> If a failed attempt is caught, will the trigger operate with SYSDBA privileges?
>
> I would like to log failed login attemps in some way, like inserting
> a row in some table (hmmm, is creating an entry in the server's event
> log possible?) The info I would like to save is some identification
> of the client pc, the user that is logged in at that pc and the
> username that is used with the login attempt (in addition to a timestamp).
>
Anyway you are asking for information that is not available to firebird
(the user that is logged at the PC)
From the release notes:
Database Triggers
Adriano dos Santos Fernandes
(v.2.1) A database trigger is a PSQL module that is executed when a
connection or transaction event occurs.
The events and the timings of their triggers are as follows.-
CONNECT
• Database connection is established
• A transaction is started
• Triggers are fired; uncaught exceptions roll back the transaction,
disconnect the attachment and are returned
to the client
• The transaction is committed
As you can see the first step is a connection to the database, if you
provide a bad login, no connection would be established.
HTH
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br