You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set term ^;
create or alter trigger trg_connect active on connect as
begin
in autonomous transaction do
insert into att_log(att_id, att_name, att_user, att_addr, att_prot, att_auth)
select
mon$attachment_id
,mon$attachment_name
,mon$user
,mon$remote_address
,mon$remote_protocol
,mon$auth_method
from mon$attachments
--where mon$attachment_id = current_connection
;
end
^
set term ;^
commit;
gbak: ERROR:INSERT operation is not allowed for system table ATT_LOG
gbak: ERROR: At trigger 'TRG_CONNECT' line: 4, col: 3
gbak:Exiting before completion due to errors
Submitted by: @sim1984
recreate table att_log (att_id int, att_name varchar(50), att_user varchar(31), att_addr varchar(25), att_prot varchar(15), att_auth varchar(15), att_dts timestamp default 'now');
commit;
set term ^;
create or alter trigger trg_connect active on connect as
begin
in autonomous transaction do
insert into att_log(att_id, att_name, att_user, att_addr, att_prot, att_auth)
select
mon$attachment_id
,mon$attachment_name
,mon$user
,mon$remote_address
,mon$remote_protocol
,mon$auth_method
from mon$attachments
--where mon$attachment_id = current_connection
;
end
^
set term ;^
commit;
quit;
If you try to make a backup
gbak -b localhost/3333:C:\FBTESTING\qa\fbt-repo\tmp\E30.fdb C:\FBTESTING\qa\fbt-repo\tmp\E30.fbk
gbak: ERROR:INSERT operation is not allowed for system table ATT_LOG
gbak: ERROR: At trigger 'TRG_CONNECT' line: 4, col: 3
gbak:Exiting before completion due to errors
or
fbsvcmgr localhost:service_mgr action_backup dbname C:\FBTESTING\qa\fbt-repo\tmp\E30.fdb bkp_file C:\FBTESTING\qa\fbt-repo\tmp\E30.fbk
INSERT operation is not allowed for system table ATT_LOG
-At trigger 'TRG_CONNECT' line: 4, col: 3
-Exiting before completion due to errors
Commits: 2a1d6e2 10d3c38 FirebirdSQL/fbt-repository@e9fa8e5 FirebirdSQL/fbt-repository@5710a08
The text was updated successfully, but these errors were encountered: