OCP-1Z0-053-V12.02-178题

来源:互联网 发布:网络安全工程师书籍 编辑:程序博客网 时间:2024/04/20 09:26

178.If a log file becomes corrupted, it may cause the database to stall. How would you correct such a situation?

A. Recover the online redo log from backup.

B. Delete and re-create the log file.

C. Use the alter database clear logfile command to clear the log file.

D. Shut down the database and restart it.

E. Shut down the database and then mount it. Clear the log file with the alter database clear logfile

command and then restart the database with alter database open resetlogs.

Answer: C 
答案解析:
参考:http://blog.csdn.net/rlhua/article/details/14226571
http://blog.csdn.net/rlhua/article/details/12343983

sys@TEST1107> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE#
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- -------------
FIRST_TIME         NEXT_CHANGE# NEXT_TIME
------------------ ------------ ------------------
         1          1          0   52428800        512          2 YES UNUSED                 1387129
07-NOV-13               1387224 07-NOV-13

         2          1         26   52428800        512          2 YES INACTIVE               1387224
07-NOV-13               1387262 07-NOV-13

         3          1         27   52428800        512          2 NO  CURRENT                1387262
07-NOV-13            2.8147E+14

[oracle@rtest ~]$ rm -f /u01/app/oracle/oradata/test1107/redo02.log

sys@TEST1107> alter database clear logfile group 2;

Database altered.


----如果没有执行上面这个语句,在再次启动数据库时 被删掉的日志会变成INVALID状态。执行alter database clear logfile group 2,再次启动数据库时,日志都是正常的。
所以可以直接在线清除日志信息,E答案不用resetlogs打开数据库,错误。
D答案,再次启动,日志会变成INVALID状态。
B答案,需要关闭再起库到mount状态。
A答案,直接清除就可以,不需要恢复。

以下关闭再启库,只是测试日志是否正常。

sys@TEST1107> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@TEST1107> startup
ORACLE instance started.

Total System Global Area 1269366784 bytes
Fixed Size                  2227984 bytes
Variable Size             872415472 bytes
Database Buffers          385875968 bytes
Redo Buffers                8847360 bytes
Database mounted.
Database opened.
sys@TEST1107> select * from v$logfile;

    GROUP# STATUS  TYPE    MEMBER                                             IS_
---------- ------- ------- -------------------------------------------------- ---
         3         ONLINE  /u01/app/oracle/oradata/test1107/redo03.log        NO
         2         ONLINE  /u01/app/oracle/oradata/test1107/redo02.log        NO
         1         ONLINE  /u01/app/oracle/oradata/test1107/redo01.log        NO
         1         ONLINE  /u01/app/oracle/oradata/test1107/redo01a.log       NO
         2         ONLINE  /u01/app/oracle/oradata/test1107/redo02a.log       NO
         3         ONLINE  /u01/app/oracle/oradata/test1107/redo03a.log       NO

6 rows selected.

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 下的视频没声音怎么办 ipad很卡反应慢怎么办 微信视频声音卡怎么办 苹果6s没有声音怎么办 靠上班工资太低怎么办 楼上太吵怎么办能报警 转页风扇有噪音怎么办 住的地方太吵怎么办 租的房子太吵怎么办 苹果手机音量键坏了怎么办 xp系统声音没了怎么办 柿子烂到窗台上怎么办 小窗户厨房太暗怎么办 抬东西把腰闪了怎么办 搬重东西后腰疼怎么办 闪了腰怎么办一动就疼 窗户的把手断了怎么办 窗户寸漏不了水怎么办 窗户打开关不上怎么办 新装修的房子有甲醛怎么办 橄榄核上油花了怎么办 虫子飞到耳朵里怎么办 手被虫子咬肿了怎么办 梦见牙掉出血该怎么办 黑户急需5万块钱怎么办 家里欠了好多钱怎么办 欠好多网贷我该怎么办 外面欠了很多钱怎么办 欠了好多网贷怎么办 欠那么多钱我该怎么办 急用钱怎么办谁给指条路 晚上睡不着觉怎么办白天又醒不来 胃疼了好几天怎么办 手机移动卡怎么办副卡 大学我好累我怎么办 感觉婚姻很累了怎么办 一个人的心累了怎么办 头被凉水激着了怎么办 人一但懒惰了怎么办 太懒了怎么办都不想活 和老公和不来该怎么办