环境:两节点的RAC在线搭建DG,处理报错
现象:RFS[8]: No standby redo logfiles created for thread 2 ,thread2 没有建立redo
Tue Aug 24 09:51:58 2021
Primary database is in MAXIMUM PERFORMANCE mode
RFS[8]: Assigned to RFS process 4994
RFS[8]: No standby redo logfiles created for thread 2
RFS[8]: Opened log for thread 2 sequence 54 dbid 1608598914 branch 1080818180
当前备库redo文件V$STANDBY_LOG视图:
SQL> select group#,thread#,sequence#,bytes/1024/1024 mb,archived,status from V$STANDBY_LOG;
GROUP# THREAD# SEQUENCE# MB ARC STATUS
11 1 73 50 YES ACTIVE
12 1 0 50 YES UNASSIGNED
13 1 0 50 YES UNASSIGNED
14 1 0 50 YES UNASSIGNED
15 1 0 50 YES UNASSIGNED
v$log视图:
SQL> select group#,thread#,bytes/1024/1024,archived,status,members from v$log;
GROUP# THREAD# BYTES/1024/1024 ARC STATUS MEMBERS
1 1 50 YES CURRENT 1
2 1 50 YES CLEARING 1
3 2 50 YES CLEARING 1
4 2 50 YES CURRENT 1
当前mrp进程状态:
SQL> select process, status, thread#,sequence#, block#, blocks from v$managed_standby;
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
ARCH CLOSING 1 72 1 708
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CLOSING 1 71 2048 1272
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 1 73 3037 1
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 2 54 5408 1
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
MRP0 WAIT_FOR_LOG 2 54 0 0
12 rows selected.
取消实时应用:
SQL> alter database recover managed standby database cancel;
Database altered.
重建redo:
SQL> alter database drop logfile group 11;
alter database drop logfile group 12;
alter database drop logfile group 13;
alter database drop logfile group 14;
alter database drop logfile group 15;alter database drop logfile group 11
*
ERROR at line 1:
ORA-00261: log 11 of thread 1 is being archived or modified
ORA-00312: online log 11 thread 1:
'/u1/db/oracle/product/11.2.0/db_1/dbs/std_redo11.log'
SQL>
Database altered.
SQL>
Database altered.
SQL>
Database altered.
SQL>
Database altered.
SQL> alter database add standby logfile thread 1 group 11 '/u1/db/oracle/product/11.2.0/db_1/dbs/std_redo11.log' size 50M;
alter database add standby logfile thread 1 group 16 '/u1/db/oracle/product/11.2.0/db_1/dbs/std_redo16.log' size 50M;
alter database add standby logfile thread 1 group 17 '/u1/db/oracle/product/11.2.0/db_1/dbs/std_redo17.log' size 50M;
alter database add standby logfile thread 2 group 18 '/u1/db/oracle/product/11.2.0/db_1/dbs/std_redo18.log' size 50M;
alter database add standby logfile thread 2 group 19 '/u1/db/oracle/product/11.2.0/db_1/dbs/std_redo19.log' size 50M;alter database add standby logfile thread 1 group 11 '/u1/db/oracle/product/11.2.0/db_1/dbs/std_redo11.log' size 50M
*
ERROR at line 1:
ORA-01184: logfile group 11 already exists
SQL>
Database altered.
SQL>
Database altered.
SQL>
Database altered.
SQL>
Database altered.
主库切换归档:
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +CRSDG
Oldest online log sequence 73
Next log sequence to archive 74
Current log sequence 74
SQL>
SQL>
SQL>
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
备库mrp状态,可以正常APPLYING_LOG
SQL> r
1* select process, status, thread#,sequence#, block#, blocks from v$managed_standby
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
ARCH CLOSING 1 74 1 50
ARCH CLOSING 1 75 1 5
ARCH CONNECTED 0 0 0 0
ARCH CLOSING 1 76 1 1
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 1 77 1293 1
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 2 55 526 1
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
MRP0 APPLYING_LOG 2 55 526 102400
12 rows selected.
备库standby alert日志,可以正常应用
RFS[8]: Selected log 18 for thread 2 sequence 55 dbid 1608598914 branch 1080818180
Tue Aug 24 10:04:10 2021
Media Recovery Log /arch/2_54_1080818180.dbf
Media Recovery Log /arch/1_73_1080818180.dbf
Media Recovery Log /arch/1_74_1080818180.dbf
Media Recovery Log /arch/1_75_1080818180.dbf
Media Recovery Log /arch/1_76_1080818180.dbf
Media Recovery Waiting for thread 1 sequence 77 (in transit)
Recovery of Online Redo Log: Thread 1 Group 11 Seq 77 Reading mem 0
Mem# 0: /u1/db/oracle/product/11.2.0/db_1/dbs/std_redo11.log
Media Recovery Waiting for thread 2 sequence 55 (in transit)
Recovery of Online Redo Log: Thread 2 Group 18 Seq 55 Reading mem 0
Mem# 0: /u1/db/oracle/product/11.2.0/db_1/dbs/std_redo18.log
Tue Aug 24 10:10:05 2021
Successfully added datafile 7 to media recovery
Datafile #7: '/u1/db/oracle/product/11.2.0/db_1/dbs/ORCL_STB/datafile/o1_mf_smart_jl8o7x0o_.dbf'
手机扫一扫
移动阅读更方便
你可能感兴趣的文章