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

本文详细解析了Oracle数据库从nomount到mount再到open状态的全过程,包括各阶段的主要操作及数据库文件的处理方式,并通过一个具体例子展示了在open状态下数据库的行为特征。
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应该也是对的
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值