客户通过监控发现,主库dest_id=2(主库往dg库传输)归档错误,归档无法从主库传到dg库。
登录主库,查询dest_id=2的error,报错提示主库两个节点都无法登录到备库。
以前也遇到过这种情况,一般从主库复制密码文件更换一下备库密码文件,或者orapwd一下备库密码文件,基本就能解决。
这次我主备库两个密码文件都复制过,也orapwd过备库密码文件,都不行,主库两节点一直提示无法登录备库。
第一次查看备库日志的时候发现一下报错:
Errors in file /u01/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl ora 12208.trc:
ORA-00604: error occurred at recursive SOL level 1
ORA-16000:database open for read-only accessORA-06512: at line 2
查看对应的trc文件内容如下:
[oracle@cyhisdg trace]$ cat /u01/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_ora_12186.trc
Trace file /u01/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_ora_12186.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1
System name: Linux
Node name: cyhisdg
Release: 3.10.0-957.el7.x86_64
Version: #1 SMP Thu Nov 8 23:39:32 UTC 2018
Machine: x86_64
VM name: VMWare Version: 6
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 19
Unix process pid: 12186, image: oracle@cyhisdg (TNS V1-V3)
*** 2023-06-26 16:26:52.466
*** SESSION ID:(1701.5) 2023-06-26 16:26:52.466
*** CLIENT ID:() 2023-06-26 16:26:52.466
*** SERVICE NAME:(SYS$USERS) 2023-06-26 16:26:52.466
*** MODULE NAME:(sqlplus@cyhisdg (TNS V1-V3)) 2023-06-26 16:26:52.466
*** ACTION NAME:() 2023-06-26 16:26:52.466
**Error in executing triggers on connect internal**
*** 2023-06-26 16:26:52.466
dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x0, level=0, mask=0x0)
----- Error Stack Dump -----
ORA-00604: error occurred at recursive SQL level 1
ORA-16000: database open for read-only access
ORA-06512: at line 2
解决方法:
备库执行:
alter system set "system trig enabled”=false;
然后重启数据库,到只读模式即可。
注意:主库千万不可用该参数