最近准备考OCA/OCP, 做练习题时,发现一个关于control file 的问题。
原题如下:
19. Your database is configured in NOARCHIVELOG mode. All the control files have been lost due to a hard
disk failure but the data files are not lost. You have the closed whole database backup available to you. Which
two statements are true in this scenario? (Choose two.)
A) The instance aborts.
B) The database cannot be recovered.
C) The database can be recovered by restoring the control files from the backup.
D) The database remains opened and you have to shut it down with the ABORT option.
E) The database can be restored till the point of the last closed whole database backup.
参考答案选 A,E。
我有点不太明白,为什么control file丢失了,数据库instance就立马 aborts了。我开始觉得至少应该有一个写control file的事件来触发吧。
于是我在自己机器上做了一个实验。我把数据库正常启动到 open状态,然后把所有(我机器上是2个)control file 都move 到其他文件夹下面。(我用的Linux,用mv命令)
做完这个操作之后,发现之前建立的session并没有异常信息抛出,还照样可以select ,甚至 update commit 都可以做。
令我不解的是,我一直以为checkpoint 会写 control file. 但此时运行 alter system checkpoint; 居然也可以成功!我白思不得其解啊。这是为什么呢?
另外还有一道类似的题:
77. Your database is having two control files, three redo log file groups with two members in each group.
Failure of which file would cause an instance to shut down?
A) any control file
B) any archive log file
C) one of the redo log members
D) loss of the initialization parameter file
E) any data file belonging to the default permanent tablespace
参考答案是 A。但我实验出来完全不是这个结果阿....
还请高人指点迷津!谢谢!