SQL> SELECT spid, osuser, s.program FROM v$process p, v$session s WHERE p.addr=s.paddr and p.program like '%ARC0%' SPID OSUSER PROGRAM ---------- ----------------- ----------------------- 2616 SYSTEM ORACLE.EXE (ARC0)
将对应的进程/线程kill掉就可以了,oracle会重新启动相应的进程/线程。
*nix平台:
1
# kill -9 processid
windows平台:
1
cmd> orakill sid threadid
sid是oracle实例名
或者更简单粗暴的重新启动oracle实例
alert_sid.log文件中可能会出现错误提示:
1
ORA-16401: archivelog rejected by RFS
sid_arc0_xxxx.trc文件中也会有:
1 2
Error16401 creating standby archive log file at host 'xxx' ORA-16401: archivelog rejected by RFS
Fetching gap sequence in thread 1, gap sequence 19767-19866 Thu May 1209:45:472016 FAL\[client\]: Failed to request gap sequence GAP - thread 1 sequence 19767-19866 DBID 1276927241 branch 874659493 FAL\[client\]: All defined FAL servers have been attempted. ------------------------------------------------------------- Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization parameter is defined to a value that is sufficiently large enough to maintain adequate log switch information to resolve archivelog gaps. -------------------------------------------------------------
Media Recovery Waiting for thread 1 sequence 23943 Fetching gap sequence in thread 1, gap sequence 23943-24042 Sun Jul 2413:02:272016 FAL\[client\]: Failed to request gap sequence GAP - thread 1 sequence 23943-24042 DBID 1276927241 branch 874659493 FAL\[client\]: All defined FAL servers have been attempted. ------------------------------------------------------------- Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization parameter is defined to a value that is sufficiently large enough to maintain adequate log switch information to resolve archivelog gaps. -------------------------------------------------------------
主库有类似如下错误提示:
1 2 3 4
FAL Redo Shipping Client Established Network Login Failed to queue the whole gap GAP - thread 1 sequence 23943-24042 DBID 1276927241 branch 874659493
SQL> ALTER DATABASE RECOVER AUTOMATIC STANDBY DATABASE;
所有可用日志全部恢复完毕后,会有如下提示:
1 2 3 4 5 6 7 8 9 10 11
ALTER DATABASE RECOVER AUTOMATIC STANDBY DATABASE * ERROR at line 1: ORA-00279: change 7255663631 generated at 07/25/201608:51:20 needed for thread 1 ORA-00289: suggestion : D:\\ARCHIVED_LOG\\ARC24380_0874659493.001 ORA-00280: change 7255663631 for thread 1 is in sequence #24380 ORA-00278: log file 'D:\\ARCHIVED_LOG\\ARC24380_0874659493.001' no longer needed forthis recovery ORA-00308: cannot open archived log 'D:\\ARCHIVED_LOG\\ARC24380_0874659493.001' ORA-27041: unable to open file OSD-04002: unable to open file O/S-Error: (OS 2) 系统找不到指定的文件。
这是因为已经没有日志可用于恢复了,此时重新打开实时日志应用就可以开始自动同步了:
1
SQL> alter database recover managed standby database disconnect from session;