【Vegas原创】ORA-16038解决

2年前 (2022) 程序员胖胖胖虎阿
211 0 0
现象:

SQL> alter database open;

alter database open
*
ERROR at line 1:
ORA-16038: log 3 sequence# 857 cannot be archived
ORA-12154: TNS:could not resolve the connect identifier specified
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/oralin/redo03.log'

解决方案:
1,查一下你是否在DG中;

2,查log_archive_dest_n 除1外,是否还有设置,如果有设置,查log_archive_dest_state_n除1外是否还有enable,如果有enable,则改为defer;(作此原因,要确定是否以前做过DG的实验,且为测试数据库,否则轻易不要修改)

3,以上配置都正确,则清空所有的log group:

SQL> alter database clear unarchived logfile group 1;

Database altered.

SQL> alter database clear logfile group 1;

Database altered.

SQL> alter database clear unarchived logfile group 2;

Database altered.

SQL> alter database clear logfile group 2;

Database altered.

SQL> alter database clear unarchived logfile group 3;

Database altered.

SQL> alter database clear logfile group 3;

Database altered.

SQL> alter database open;

Database altered.


4,如果open后再次切日志,还会出现此问题,则直接recover。

SQL> alter system archive log current;
alter system archive log current
*
ERROR at line 1:
ORA-16038: log 1 sequence# 860 cannot be archived
ORA-12154: TNS:could not resolve the connect identifier specified
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/oralin/redo01.log'

SQL> recover database until cancel;

 

 

版权声明:程序员胖胖胖虎阿 发表于 2022年11月3日 上午2:24。
转载请注明:【Vegas原创】ORA-16038解决 | 胖虎的工具箱-编程导航

相关文章

暂无评论

暂无评论...