It is not possible to save the connection information in the ON CONNECT
trigger, if the connection is created by the gbak
-------------------------------------------------------------------------------------------------------------------------
Key: CORE-4928
URL: http://tracker.firebirdsql.org/browse/CORE-4928
Project: Firebird Core
Issue Type: Bug
Components: Engine, SVCMGR
Affects Versions: 3.0 Beta 2
Environment: WI-V3.0.0.32022
Reporter: Simonov Denis
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
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel