Subject Re: [firebird-support] Loggin pc-client name and/or client ip address
Author Claudio Romero
Hello check this in Spanish
--Connect
SET TERM ^ ;
create TRIGGER AL_CONECTAR ACTIVE
POSITION 0
AS
declare variable IP_remotO varchar(253);
declare variable proceso_remoto varchar(253);
BEGIN
for select m.MON$REMOTE_ADDRESS,m.MON$REMOTE_PROCESS
from MON$ATTACHMENTS m where m.MON$ATTACHMENT_ID = CURRENT_CONNECTION
into :IP_remotO,:proceso_remoto
do
insert into LOG_INGRESOS_SALIDAS(usuario, fecha, hora,
accion,coneccion,rol,IP_remotO,proceso_remoto)
values(current_user, current_date, current_time,
'I',current_connection,current_role,:IP_remotO,:proceso_remoto);
END^
SET TERM ; ^

--Disconnect
SET TERM ^ ;
create TRIGGER AL_DESCONECTAR ACTIVE
POSITION 0
AS

begin
insert into LOG_INGRESOS_SALIDAS(usuario, fecha, hora,
accion,rol,coneccion)
values(current_user, current_date, current_time,
'S',current_role,current_connection);
END^
SET TERM ; ^

Regards


[Non-text portions of this message have been removed]