ITPub博客

首页 > 数据库 > Oracle > Trigger引起的active dataguard 报error ORA-16191

Trigger引起的active dataguard 报error ORA-16191

原创 Oracle 作者:pingdanorcale 时间:2020-08-04 16:51:04 0 删除 编辑

最近在用duplicate target做备库时,在应用日志时报如下错误,

FAL[server, ARC3]: FALarchive failed, see trace file.

ARCH: FAL archive failed.Archiver continuing

ORACLE Instance kgdb -Archival Error. Archiver continuing.

Thu Jul 16 11:12:26 2018

Thread 1 advanced to logsequence 5754 (LGWR switch)

  Current log# 2 seq# 5754 mem# 0:/u01/11g/oradata/erpdb/redo02.log

Thu Jul 16 11:12:26 2018

Archived Log entry 9957 addedfor thread 1 sequence 5753 ID 0xefbf45c1 dest 1:

Thu Jul 16 11:12:27 2018

Error 1017 received loggingon to the standby

------------------------------------------------------------

Check that the primary andstandby are using a password file

and remote_login_passwordfileis set to SHARED or EXCLUSIVE,

and that the SYS password issame in the password files.

      returning error ORA-16191

1)根据报错查看remote_login_passwordfile参数,此参数使用的是默认值,不会引起此问题的产生。

归档进程报如下:

Waiting for NSA2 [pid 2333]to initialize itself

krsu_start_ns: time appearsto have jumped forwards

Initial buffer sizes: read1024K, overflow 832K, change 805K

 

*** 2018-07-11 09:25:35.313

Log read is SYNCHRONOUSthough disk_asynch_io is enabled!

Log read is SYNCHRONOUSthough disk_asynch_io is enabled!

 

*** 2018-07-14 06:28:58.861

Log read is SYNCHRONOUSthough disk_asynch_io is enabled!

 无异常报错。

2)重新重建备库的密码文件:

orapwd file=orapwerpdbpassword=sys ignorecase=y force=y

重新duplicate时同样产生如上错误。

3)重新查看主库的警告信息

 只发现如下一个错误

errorsin file /u01/11g/diag/rdbms/erpdb/erpdb/trace/kgdb_ora_32350.trc:

ORA-00604:error occurred at recursive SQL level 1

ORA-01422:exact fetch returns more than requested number of rows。

 

直觉和trigger有关,没有办法查看所有数据库的trigger并与他们dba确认,发现有一个trigger嫌疑比较大:

TRIGGER SYS.trg_audit_log

AFTER LOGON ON DATABASE

declare

 v_program_name varchar2(200);

 v_username varchar2(100);

 v_ip_address varchar2(18);

 begin

selectusername,program,SYS_CONTEXT('USERENV','IP_ADDRESS')

intov_username,v_program_name,v_ip_address

from v$session where AUDSID =SYS_CONTEXT('USERENV', 'SESSIONID');

);

if  v_program_name = 'plsqldev.exe'  and upper(v_username) in ('')

     then

       RAISE_APPLICATION_ERROR(-20003,'You arenot allowed to connect to the dat

abase');

 

 end if;

根据错误信息,根据经验把triggerdisable

alter  tiggers sys.TRG_A_LOG DISABLE ;

重新执行duplicate,应用日志成功。


 查相关文档,唯一文档如下:

ORA-16191 ORA-01017 and ORA-16000 shipping the logs to Standby database (文档 ID 2129339.1)

 文档解决方案

 

1.Disable the trigger.


2.Set the below parameter in the Standby database and restart:

   _system_trig_enabled=false


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10201716/viewspace-2709151/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-01-02

  • 博文量
    58
  • 访问量
    106547