Subject db trgiggers problem
Author nazim.oner
hi

i have two db trigger .

client connect/disconnect firebird memory increasing 16k
--------------
CREATE OR ALTER trigger db_giris
active on connect position 0
as
declare variable Adr varchar(100);
declare variable PRg varchar(100);
declare variable Prc integer;

begin



SELECT MON$REMOTE_ADDRESS Adres, mon$remote_process Program ,
mon$server_pid Process_id
FROM MON$ATTACHMENTS D
WHERE mon$ATTACHMENT_ID = current_connection into :adr, :prg, :prc;


insert into z_userlog ( id ,cnt_id , giris , adres , PRogram ,server_id )
values ( gen_id( z_userlog_id_gen,1 ) , current_connection,current_timestamp, :adr,:prg ,:prc);


when any do exit;

end
----------------------------
CREATE OR ALTER trigger db_cikis
active on disconnect position 0
as

begin

update z_userlog z set z.cikis = current_timestamp where z.cnt_id = current_connection
and giris > current_date -5 ;

when any do exit;


end