ORA-00346,借助_allow_resetlogs_corruption开库
Mon Aug 06 10:15:08 2018
Errors in file /data/app/oracle/diag/rdbms/prod/prod/trace/prod_ora_6831.trc:
ORA-00346: log member marked as STALE and closed
ORA-00312: online log 2 thread 1: '/data/app/oracle/oradata/prod/onlinelog/redo02.log'
ORA-27072: File I/O error
Linux-x86_64 Error: 5: Input/output error
Additional information: 4
Additional information: 512151
Additional information: 4294967295
Mon Aug 06 10:15:08 2018
Slave encountered ORA-10388 exception during crash recovery
SQL> select instance_name,status from v$instance;
此时,数据库已经挂掉。
将库起至mount
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
prod MOUNTED
SQL> col member for a50
SQL> set lines 200
SQL> SELECT V2.GROUP#, MEMBER, V2.STATUS MEMBER_STATUS, V1.STATUS GROUP_STATUS
FROM V$LOG V1, V$LOGFILE V2 WHERE V1.GROUP# = V2.GROUP# AND V2.STATUS = 'STALE';
GROUP# MEMBER MEMBER_ GROUP_STATUS
---------- -------------------------------------------------- ------- ----------------
2 /data/app/oracle/oradata/prod/onlinelog/redo02.log STALE CURRENT
SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;
System altered.
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1.9327E+10 bytes
Fixed Size 5293464 bytes
Variable Size 3556772456 bytes
Database Buffers 1.5703E+10 bytes
Redo Buffers 61812736 bytes
Database mounted.
SQL> recover database using backup controlfile until cancel ;
ORA-00279: change 4523935428 generated at 08/04/2018 22:57:19 needed for thread 1
ORA-00289: suggestion : /data/arch/1_62_979909878.dbf
ORA-00280: change 4523935428 for thread 1 is in sequence #62
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/data/app/oracle/oradata/prod/onlinelog/redo02.log
Log applied.
Media recovery complete.
SQL> alter database open RESETLOGS;
Database altered.
SQL>
新建数据库boston,逻辑导出prod库,导入到新建库boston