121.After performing a clean shut down of the database instance for maintenance, you mount the datab

来源:互联网 发布:js confirm 重写 编辑:程序博客网 时间:2024/06/05 05:32
121.After performing a clean shut down of the database instance for maintenance, you mount the
database and then execute a command to open the database:
SQL> ALTER DATABASE OPEN;
Which two statements are true? (Choose two.)
A.The online redo log files and online data files are opened.
B.All the online data file headers are checked for consistency.
C.Instance recovery is performed before opening the database.
D.The path and existence of all the log file members are checked.
答案:AB
解析:
开机分为3个状态
nomount
只有在创建数据库时,或者重建控制文件期间使用,只启动实例不打开任何数据库中文件,他会进行如下操作
    1.分配 sga
    2.启动所需的全部后台进程
    3.打开报警文件(alertSID.log)和追踪文件(trace)
mount
  主要是维护的时候使用,比如对系统表空间进行恢复,修改数据文件名,移动数据文件
  1.oracle启动实例并且打开控制文件
  2.利用初始化参数文件中的说明锁定并打开控制文件
  3.读取控制文件获取重做日志文件和数据文件的名字和状态,但是并不检查他们是否存在
open
  1.打开所有联机数据文件
  2.打开所有联集重做日志文件
关机分为3个状态
close
dismount
shutdown
A:open
B:open
C:因为说明是正常关系,所以不需要恢复
D:这里应该是在open的时候验证的
select member from v$logfile;
member
-------------
/u01/oracle/oradata/wahaha3/redo03.log
/u01/oracle/oradata/wahaha3/redo02.log
/u01/oracle/oradata/wahaha3/redo01.log
/u01/oracle/oradata/wahaha3/redo04.log
/u01/oracle/oradata/wahaha3/redo05a.log
/u01/oracle/oradata/wahaha3/redo06.log
[oracle@wahaha3 oradata]$ mv wahaha3 wahaha4
[oracle@wahaha3 oradata]$ sqlplus / as sysdba
SQL> startup nomount;
ORACLE instance started.
Total System Global Area  830930944 bytes
Fixed Size                  2232920 bytes
Variable Size             629149096 bytes
Database Buffers          197132288 bytes
Redo Buffers                2416640 bytes
SQL> alter database mount;
Database altered.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u01/oracle/oradata/wahaha3/system01.dbf'
--这里说明D应该也是对的
0 0
原创粉丝点击