SQL> select group#,sequence#,status,first_time,next_change# from v$log; GROUP# SEQUENCE# STATUS FIRST_TIM NEXT_CHANGE# ---------- ---------- ---------------- --------- ------------ 1 4252 CURRENT 06-MAR-18 2.8147E+14 3 4251 INACTIVE 06-MAR-18 4.9009E+12 2 4250 INACTIVE 06-MAR-18 4.9009E+12
当前日志组组号为1,再通过v$logfile查看组号为1的redo日志的文件位置
1 2 3 4 5 6 7
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER ---------- ------- ------- ------------------------------ 1 ONLINE /home/wonders/app/wonders/oradata/orcl/redo01.log 3 ONLINE /home/wonders/app/wonders/oradata/orcl/redo03.log 2 ONLINE /home/wonders/app/wonders/oradata/orcl/redo02.log
指定redo1.log恢复数据库
1 2 3 4 5 6 7 8 9 10 11 12 13
SQL> recover database until cancel using backup controlfile; ORA-00279: change 4900911271334 generated at 03/06/2018 05:46:29 needed for thread 1 ORA-00289: suggestion : /home/wonders/app/wonders/flash_recovery_area/ORCL/archivelog/2018_03_12/o1_mf_1 _4252_%u_.arc ORA-00280: change 4900911271334 for thread 1 is in sequence #4252
Specify log: {<RET>=suggested | filename | AUTO | CANCEL} /home/wonders/app/wonders/oradata/orcl/redo01.log Log applied. Media recovery complete.