7.You have issued a SHUTDOWN ABORT command to bring down your database instance. Considerthe steps t
来源:互联网 发布:数据分析统计表 编辑:程序博客网 时间:2024/06/05 13:30
7.You have issued a SHUTDOWN ABORT command to bring down your database instance. Consider
the steps that will be performed later when you open the database:
1: SGA is allocated.
2: Control file is read.
3: Redo log files are read.
4: Instance recovery is started.
5: Background processes are started.
6: Data files are checked for consistency.
7: Server parameter file or the initialization parameter file is read.
Which option has the correct order in which these steps occur?
A.7, 1, 5, 2, 3, 6, 4
B.1, 2, 3,7, 5, 6, 4
C.7, 1, 4, 5, 2, 3, 6
D.1, 7, 5, 4, 2, 3, 6
答案:A
解析:
一、启动过程
1.实例启动也就是nomount状态
首先要读取spfile或者pfile,然后分配内存结构也就是SGA,然后启动后台进程并且打开报警文件和trace文件
2.数据库启动也就是mount状态
读取参数文件中控制文件的位置,锁定并且读取控制文件,找到对应的数据文件,redo文件,但是不检查他们是否存在
3.实例与数据库关联(open)
打开联机数据文件和redo
二、验证过程如下
1.验证是否读取过spfile
SQL> ! ls -l --time=atime spfilewahaha3.ora
-rw-r-----. 1 oracle oinstall 2560 Jul 12 22:00 spfilewahaha3.ora
SQL> ! date
Tue Jul 12 22:07:41 CST 2016
SQL> startup nomount;
SQL> ! ls -l --time=atime spfilewahaha3.ora
-rw-r-----. 1 oracle oinstall 2560 Jul 12 22:07 spfilewahaha3.ora
SQL> !date
Tue Jul 12 22:09:00 CST 2016
SQL> alter database mount;
SQL> ! ls -l --time=atime spfilewahaha3.ora
-rw-r-----. 1 oracle oinstall 2560 Jul 12 22:09 spfilewahaha3.ora
SQL> alter database open;
SQL> ! ls -l --time=atime spfilewahaha3.ora
-rw-r-----. 1 oracle oinstall 2560 Jul 12 22:09 spfilewahaha3.ora
--nomount和mount都读取过
2.查看后台进程在什么时候启动的
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 830930944 bytes
Fixed Size 2232920 bytes
Variable Size 562040232 bytes
Database Buffers 264241152 bytes
Redo Buffers 2416640 bytes
SQL> ! ps -ef | grep ora_
oracle 6077 1 0 22:35 ? 00:00:00 ora_pmon_wahaha3
oracle 6079 1 0 22:35 ? 00:00:00 ora_psp0_wahaha3
oracle 6081 1 2 22:35 ? 00:00:00 ora_vktm_wahaha3
oracle 6085 1 0 22:35 ? 00:00:00 ora_gen0_wahaha3
oracle 6087 1 0 22:35 ? 00:00:00 ora_diag_wahaha3
oracle 6089 1 0 22:35 ? 00:00:00 ora_dbrm_wahaha3
oracle 6091 1 0 22:35 ? 00:00:00 ora_dia0_wahaha3
oracle 6093 1 1 22:35 ? 00:00:00 ora_mman_wahaha3
oracle 6095 1 0 22:35 ? 00:00:00 ora_dbw0_wahaha3
oracle 6097 1 0 22:35 ? 00:00:00 ora_lgwr_wahaha3
oracle 6099 1 0 22:35 ? 00:00:00 ora_ckpt_wahaha3
oracle 6101 1 0 22:35 ? 00:00:00 ora_smon_wahaha3
oracle 6103 1 0 22:35 ? 00:00:00 ora_reco_wahaha3
oracle 6105 1 0 22:35 ? 00:00:00 ora_mmon_wahaha3
oracle 6107 1 0 22:35 ? 00:00:00 ora_mmnl_wahaha3
oracle 6109 1 0 22:35 ? 00:00:00 ora_d000_wahaha3
oracle 6111 1 0 22:35 ? 00:00:00 ora_s000_wahaha3
--说明后台进程nomount就启动了
3.验证sga分配情况
SQL> select COMPONENT,current_size from v$sga_dynamic_components;
COMPONENT CURRENT_SIZE
---------------------------------------------------------------- ------------
shared pool 209715200
large pool 4194304
java pool 4194304
streams pool 8388608
DEFAULT buffer cache 264241152
KEEP buffer cache 0
RECYCLE buffer cache 0
DEFAULT 2K buffer cache 0
DEFAULT 4K buffer cache 0
DEFAULT 8K buffer cache 0
DEFAULT 16K buffer cache 0
COMPONENT CURRENT_SIZE
---------------------------------------------------------------- ------------
DEFAULT 32K buffer cache 0
Shared IO Pool 0
ASM Buffer Cache 0
--说明nomount就分配了
4.查看控制文件读取
SQL> ! ls -l --time=atime /home/oracle/control01.ctl1
-rw-r-----. 1 oracle oinstall 9912320 Jul 12 22:34 /home/oracle/control01.ctl1
SQL> startup nomount;
SQL> ! ls -l --time=atime /home/oracle/control01.ctl1
-rw-r-----. 1 oracle oinstall 9912320 Jul 12 22:34 /home/oracle/control01.ctl1
SQL> alter database mount;
SQL> ! ls -l --time=atime /home/oracle/control01.ctl1
-rw-r-----. 1 oracle oinstall 9912320 Jul 12 22:41 /home/oracle/control01.ctl1
--说明在mount阶段读取了控制文件
5.查看redo文件在哪个阶段
SQL> !ls -l --time=atime /u01/oracle/oradata/wahaha3/redo*log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo05a.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo06.log
SQL> !date
Tue Jul 12 22:45:35 CST 2016
SQL> startup nomount;
SQL> !ls -l --time=atime /u01/oracle/oradata/wahaha3/redo*log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo05a.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo06.log
SQL> alter database mount;
SQL> !ls -l --time=atime /u01/oracle/oradata/wahaha3/redo*log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo05a.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo06.log
SQL> alter database open;
SQL> !ls -l --time=atime /u01/oracle/oradata/wahaha3/redo*log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo05a.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo06.log
--说明:在open阶段读取了redo
6.查看redo文件和数据文件在mount的时候会不会检查
[oracle@wahaha3 wahaha3]$ mkdir www --将数据文件和redo文件全部挪走
[oracle@wahaha3 wahaha3]$ mv *.* www
[oracle@wahaha3 wahaha3]$ sqlplus / as sysdba
SQL> startup nomount;
SQL> alter database mount;
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'
--说明,monut阶段是不会进行校验文件的
7.由于使用了shutdown abort关闭数据库,所以很可能需要恢复数据
恢复使用的时smon进程
the steps that will be performed later when you open the database:
1: SGA is allocated.
2: Control file is read.
3: Redo log files are read.
4: Instance recovery is started.
5: Background processes are started.
6: Data files are checked for consistency.
7: Server parameter file or the initialization parameter file is read.
Which option has the correct order in which these steps occur?
A.7, 1, 5, 2, 3, 6, 4
B.1, 2, 3,7, 5, 6, 4
C.7, 1, 4, 5, 2, 3, 6
D.1, 7, 5, 4, 2, 3, 6
答案:A
解析:
一、启动过程
1.实例启动也就是nomount状态
首先要读取spfile或者pfile,然后分配内存结构也就是SGA,然后启动后台进程并且打开报警文件和trace文件
2.数据库启动也就是mount状态
读取参数文件中控制文件的位置,锁定并且读取控制文件,找到对应的数据文件,redo文件,但是不检查他们是否存在
3.实例与数据库关联(open)
打开联机数据文件和redo
二、验证过程如下
1.验证是否读取过spfile
SQL> ! ls -l --time=atime spfilewahaha3.ora
-rw-r-----. 1 oracle oinstall 2560 Jul 12 22:00 spfilewahaha3.ora
SQL> ! date
Tue Jul 12 22:07:41 CST 2016
SQL> startup nomount;
SQL> ! ls -l --time=atime spfilewahaha3.ora
-rw-r-----. 1 oracle oinstall 2560 Jul 12 22:07 spfilewahaha3.ora
SQL> !date
Tue Jul 12 22:09:00 CST 2016
SQL> alter database mount;
SQL> ! ls -l --time=atime spfilewahaha3.ora
-rw-r-----. 1 oracle oinstall 2560 Jul 12 22:09 spfilewahaha3.ora
SQL> alter database open;
SQL> ! ls -l --time=atime spfilewahaha3.ora
-rw-r-----. 1 oracle oinstall 2560 Jul 12 22:09 spfilewahaha3.ora
--nomount和mount都读取过
2.查看后台进程在什么时候启动的
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 830930944 bytes
Fixed Size 2232920 bytes
Variable Size 562040232 bytes
Database Buffers 264241152 bytes
Redo Buffers 2416640 bytes
SQL> ! ps -ef | grep ora_
oracle 6077 1 0 22:35 ? 00:00:00 ora_pmon_wahaha3
oracle 6079 1 0 22:35 ? 00:00:00 ora_psp0_wahaha3
oracle 6081 1 2 22:35 ? 00:00:00 ora_vktm_wahaha3
oracle 6085 1 0 22:35 ? 00:00:00 ora_gen0_wahaha3
oracle 6087 1 0 22:35 ? 00:00:00 ora_diag_wahaha3
oracle 6089 1 0 22:35 ? 00:00:00 ora_dbrm_wahaha3
oracle 6091 1 0 22:35 ? 00:00:00 ora_dia0_wahaha3
oracle 6093 1 1 22:35 ? 00:00:00 ora_mman_wahaha3
oracle 6095 1 0 22:35 ? 00:00:00 ora_dbw0_wahaha3
oracle 6097 1 0 22:35 ? 00:00:00 ora_lgwr_wahaha3
oracle 6099 1 0 22:35 ? 00:00:00 ora_ckpt_wahaha3
oracle 6101 1 0 22:35 ? 00:00:00 ora_smon_wahaha3
oracle 6103 1 0 22:35 ? 00:00:00 ora_reco_wahaha3
oracle 6105 1 0 22:35 ? 00:00:00 ora_mmon_wahaha3
oracle 6107 1 0 22:35 ? 00:00:00 ora_mmnl_wahaha3
oracle 6109 1 0 22:35 ? 00:00:00 ora_d000_wahaha3
oracle 6111 1 0 22:35 ? 00:00:00 ora_s000_wahaha3
--说明后台进程nomount就启动了
3.验证sga分配情况
SQL> select COMPONENT,current_size from v$sga_dynamic_components;
COMPONENT CURRENT_SIZE
---------------------------------------------------------------- ------------
shared pool 209715200
large pool 4194304
java pool 4194304
streams pool 8388608
DEFAULT buffer cache 264241152
KEEP buffer cache 0
RECYCLE buffer cache 0
DEFAULT 2K buffer cache 0
DEFAULT 4K buffer cache 0
DEFAULT 8K buffer cache 0
DEFAULT 16K buffer cache 0
COMPONENT CURRENT_SIZE
---------------------------------------------------------------- ------------
DEFAULT 32K buffer cache 0
Shared IO Pool 0
ASM Buffer Cache 0
--说明nomount就分配了
4.查看控制文件读取
SQL> ! ls -l --time=atime /home/oracle/control01.ctl1
-rw-r-----. 1 oracle oinstall 9912320 Jul 12 22:34 /home/oracle/control01.ctl1
SQL> startup nomount;
SQL> ! ls -l --time=atime /home/oracle/control01.ctl1
-rw-r-----. 1 oracle oinstall 9912320 Jul 12 22:34 /home/oracle/control01.ctl1
SQL> alter database mount;
SQL> ! ls -l --time=atime /home/oracle/control01.ctl1
-rw-r-----. 1 oracle oinstall 9912320 Jul 12 22:41 /home/oracle/control01.ctl1
--说明在mount阶段读取了控制文件
5.查看redo文件在哪个阶段
SQL> !ls -l --time=atime /u01/oracle/oradata/wahaha3/redo*log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo05a.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo06.log
SQL> !date
Tue Jul 12 22:45:35 CST 2016
SQL> startup nomount;
SQL> !ls -l --time=atime /u01/oracle/oradata/wahaha3/redo*log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo05a.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo06.log
SQL> alter database mount;
SQL> !ls -l --time=atime /u01/oracle/oradata/wahaha3/redo*log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:34 /u01/oracle/oradata/wahaha3/redo05a.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:22 /u01/oracle/oradata/wahaha3/redo06.log
SQL> alter database open;
SQL> !ls -l --time=atime /u01/oracle/oradata/wahaha3/redo*log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo05a.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 12 22:46 /u01/oracle/oradata/wahaha3/redo06.log
--说明:在open阶段读取了redo
6.查看redo文件和数据文件在mount的时候会不会检查
[oracle@wahaha3 wahaha3]$ mkdir www --将数据文件和redo文件全部挪走
[oracle@wahaha3 wahaha3]$ mv *.* www
[oracle@wahaha3 wahaha3]$ sqlplus / as sysdba
SQL> startup nomount;
SQL> alter database mount;
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'
--说明,monut阶段是不会进行校验文件的
7.由于使用了shutdown abort关闭数据库,所以很可能需要恢复数据
恢复使用的时smon进程
0 0
- 7.You have issued a SHUTDOWN ABORT command to bring down your database instance. Considerthe steps t
- 123.You used the IMMEDIATE option to shut down your database instance. Consider the steps that may o
- Your database instance is running with full workload after database creation. You have decided to us
- 32.Your database instance is running with full workload after database creation. You have decided to
- Linux Host "Abort command issued"
- Query whether you have the access to a specific database
- 138 Your database instance is running. You are not able to access Oracle Enterprise Manager Database
- QUESTION 56 Automatic Shared Memory Management is disabled for your database instance. You realize t
- 116.Your database instance is started using the server parameter file (SPFILE). You executed a comma
- 13.You have executed this command to change the size of the database buffer cache:
- 143.You execute a command to resize a data file, sales.dbf, of size 200 MB in your database: ALTER D
- 121.After performing a clean shut down of the database instance for maintenance, you mount the datab
- Security error. You probably don't have enough permissions to upload. Please check your server
- 51 You have not configured Oracle Managed Files (OMF) in your database. You do not want to scan the
- 41.You have recently collected statistics on certain objects of a schema in your database. But you o
- 37.You issued the following command to drop the PRODUCTS table:
- 1Z0-051 37. You issued the following command to drop the PRODUCTS table:
- 67 You are maintaining the SALES database. You have added a new disk to a disk group. Automatic Stor
- c# 结构中的变量作用域
- Unknown type name 'class'; did you mean 'Class'? 解决方案
- Kerberos and SPNEGO
- 怎样压缩pdf 减少pdf文件的大小
- HDU1227 Fast Food(DP)
- 7.You have issued a SHUTDOWN ABORT command to bring down your database instance. Considerthe steps t
- ehcacge.xml
- git使用本地
- JAVA学习笔记 NO.1 环境配置
- 如何使用MediaPlayer播发res/raw下的音频文件
- C++ 海康 YV12转RGB32,YV420转RGB32
- SSM整合配置文件(Springmvc+Spring+Mybatis)
- hdu4302(模拟+STL)
- HDFS 权限问题:Permission denied