OCP 1Z0 053 49

来源:互联网 发布:英文写作软件 编辑:程序博客网 时间:2024/05/17 00:59
49.Which statement about recovering from the loss of a redo log group is true? 
A. If the lost redo log group is ACTIVE, you should first attempt to clear the log file. 
B. If the lost redo log group is CURRENT, you must clear the log file. 
C. If the lost redo log group is ACTIVE, you must restore, perform cancel-based incomplete recovery, and 
open the database using the RESETLOGS option. 
D. If the lost redo log group is CURRENT, you must restore, perform cancel-based incomplete recovery, 
and open the database using the RESETLOGS option. 
Answer: D

current redo log文件已丢失,这时不能再用clear LOGFILE 的方式。需要先restore,再recover至未丢失的log。


SQL> delete test.standby2;34 rows deleted.SQL> commit;Commit complete.SQL> select * from v$log;    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIME   NEXT_CHANGE# NEXT_TIME---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ------------ ------------ ------------         1          1         90   52428800        512          1 NO  CURRENT                2907312 02-JUL-14      2.8147E+14         2          1         89   52428800        512          1 YES INACTIVE               2886918 02-JUL-14         2907312 02-JUL-14         3          1         87   52428800        512          1 YES INACTIVE               2832341 02-JUL-14         2858579 02-JUL-143 rows selected.SQL> shutdown abort;ORACLE instance shut down.SQL> startup;ORACLE instance started.Total System Global Area  535662592 bytesFixed Size                  1406436 bytesVariable Size             272632348 bytesDatabase Buffers          255852544 bytesRedo Buffers                5771264 bytesDatabase mounted.ORA-00313: open failed for members of log group 1 of thread 1ORA-00312: online log 1 thread 1: 'K:\ORADATA\ORCL\ONLINELOG\O1_MF_1_9V7ZJQXS_.LOG'ORA-27041: unable to open fileOSD-04002: unable to open fileO/S-Error: (OS 2) 系统找不到指定的文件。SQL> shutdown abort;ORACLE instance shut down.SQL> startup mount;ORACLE instance started.Total System Global Area  535662592 bytesFixed Size                  1406436 bytesVariable Size             272632348 bytesDatabase Buffers          255852544 bytesRedo Buffers                5771264 bytesDatabase mounted.SQL> ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 1;ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 1*ERROR at line 1:ORA-01624: log 1 needed for crash recovery of instance orcl (thread 1)ORA-00312: online log 1 thread 1: 'K:\ORADATA\ORCL\ONLINELOG\O1_MF_1_9V7ZJQXS_.LOG'

不是shutdown abort 可以
SQL> select * from v$log;    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIME   NEXT_CHANGE# NEXT_TIME---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ------------ ------------ ------------         1          1          1   52428800        512          1 YES INACTIVE               2907314 02-JUL-14         2928269 02-JUL-14         2          1          2   52428800        512          1 NO  CURRENT                2928269 02-JUL-14      2.8147E+14         3          1          0   52428800        512          1 YES UNUSED                       0                 03 rows selected.SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL> startup mountORACLE instance started.Total System Global Area  535662592 bytesFixed Size                  1406436 bytesVariable Size             272632348 bytesDatabase Buffers          255852544 bytesRedo Buffers                5771264 bytesDatabase mounted.SQL> ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 2;Database altered.SQL> alter database open;Database altered.SQL>



0 0
原创粉丝点击