OCP-1Z0-052-V8.02-7题

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:oracle

1: SGA is allocated. app

2: Control file is read. dom

3: Redo log files are read. async

4: Instance recovery is started. ide

5: Background processes are started. this

6: Data files are checked for consistency. spa

7: Server parameter file or the initialization parameter file is read..net

Which option has the correct order in which these steps occur?rest

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

Answer: A
 
答案解析:
 
shutdown abort后,再startup,须要用到smon进行实例恢复。
在nomount阶段,读取初始化参数,分配SGA,后台进程启动
在mount阶段,读取控制文件和联机日志文件,查看须要打开哪些数据文件
在open阶段,根据控制文件内容找到数据文件,并打开,由于是abort关闭的数据库,则在open时须要检查数据库,数据库文件以及数据文件头部的scn号是否一致,若是不一致,SMON进程进行实例恢复。
 
来模拟,并查看alert告警日志
sys@TEST0924> shutdown abort;
ORACLE instance shut down.
sys@TEST0924> startup
ORACLE instance started.
Total System Global Area 2505338880 bytes
Fixed Size 2230952 bytes
Variable Size 620758360 bytes
Database Buffers 1862270976 bytes
Redo Buffers 20078592 bytes
Database mounted.
Database opened.
 
告警日志内容以下:
Thu Oct 03 10:22:13 2013
Shutting down instance (abort)
License high water mark = 17
USER (ospid: 10782): terminating the instance
Instance terminated by USER, pid = 10782
Thu Oct 03 10:22:14 2013
Instance shutdown complete
 
shutdown abort
 
Thu Oct 03 10:22:24 2013
Adjusting the default value of parameter parallel_max_servers
from 320 to 135 due to the value of parameter processes (150)
Starting ORACLE instance (normal)
****************** Large Pages Information *****************
Total Shared Global Region in Large Pages = 0 KB (0%)
Large Pages used by this instance: 0 (0 KB)
Large Pages unused system wide = 0 (0 KB) (alloc incr 16 MB)
Large Pages configured system wide = 0 (0 KB)
Large Page size = 2048 KB
RECOMMENDATION:
Total Shared Global Region size is 2402 MB. For optimal performance,
prior to the next instance restart increase the number
of unused Large Pages by atleast 1201 2048 KB Large Pages (2402 MB)
system wide to get 100% of the Shared
Global Region allocated with Large pages
***********************************************************
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 3
Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =27
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1
System name: Linux
Node name: rtest.localdomain
Release: 2.6.18-308.el5
Version: #1 SMP Fri Jan 27 17:17:51 EST 2012
Machine: x86_64
VM name: VMWare Version: 6
Using parameter settings in server-side spfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfiletest0924.ora
System parameters with non-default values:
processes = 150
shared_pool_size = 496M
sga_target = 2400M
control_files = "/u01/app/oracle/oradata/test0924/control01.ctl"
control_files = "/u01/app/oracle/fast_recovery_area/test0924/control02.ctl"
db_block_size = 8192
db_keep_cache_size = 48M
compatible = "11.2.0.0.0"
db_recovery_file_dest = "/u01/app/oracle/fast_recovery_area"
db_recovery_file_dest_size= 4122M
undo_tablespace = "UNDOTBS2"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
dispatchers = "(PROTOCOL=TCP) (SERVICE=test0924XDB)"
audit_file_dest = "/u01/app/oracle/admin/test0924/adump"
audit_trail = "DB"
db_name = "test0924"
open_cursors = 300
pga_aggregate_target = 798M
sec_max_failed_login_attempts= 2
diagnostic_dest = "/u01/app/oracle"
 
读取初始化参数
 
Thu Oct 03 10:22:24 2013
PMON started with pid=2, OS id=10920
Thu Oct 03 10:22:24 2013
PSP0 started with pid=3, OS id=10922
Thu Oct 03 10:22:25 2013
VKTM started with pid=4, OS id=10924 at elevated priority
VKTM running at (1)millisec precision with DBRM quantum (100)ms
Thu Oct 03 10:22:25 2013
GEN0 started with pid=5, OS id=10928
Thu Oct 03 10:22:25 2013
DIAG started with pid=6, OS id=10930
Thu Oct 03 10:22:25 2013
DBRM started with pid=7, OS id=10932
Thu Oct 03 10:22:25 2013
DIA0 started with pid=8, OS id=10934
Thu Oct 03 10:22:25 2013
MMAN started with pid=9, OS id=10936
Thu Oct 03 10:22:26 2013
DBW0 started with pid=10, OS id=10938
Thu Oct 03 10:22:26 2013
LGWR started with pid=11, OS id=10940
Thu Oct 03 10:22:26 2013
CKPT started with pid=12, OS id=10942
Thu Oct 03 10:22:26 2013
SMON started with pid=13, OS id=10944
Thu Oct 03 10:22:26 2013
RECO started with pid=14, OS id=10946
Thu Oct 03 10:22:26 2013
MMON started with pid=15, OS id=10948
Thu Oct 03 10:22:26 2013
MMNL started with pid=16, OS id=10950
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
ORACLE_BASE from environment = /u01/app/oracle
 
后台进程
 
Thu Oct 03 10:22:26 2013
ALTER DATABASE MOUNT
Successful mount of redo thread 1, with mount id 2721742178
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE MOUNT
Thu Oct 03 10:22:30 2013
ALTER DATABASE OPEN
Beginning crash recovery of 1 threads
parallel recovery started with 7 processes
Started redo scan
Completed redo scan
read 244 KB redo, 79 data blocks need recovery
Started redo application at
Thread 1: logseq 62, block 2039
Recovery of Online Redo Log: Thread 1 Group 2 Seq 62 Reading mem 0
Mem# 0: /u01/app/oracle/oradata/test0924/redo02.log
Completed redo application of 0.07MB
Completed crash recovery at
Thread 1: logseq 62, block 2527, scn 2111766
79 data blocks read, 79 data blocks written, 244 redo k-bytes read
LGWR: STARTING ARCH PROCESSES
Thu Oct 03 10:22:32 2013
ARC0 started with pid=27, OS id=10980
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Thu Oct 03 10:22:33 2013
ARC1 started with pid=28, OS id=10982
Thu Oct 03 10:22:33 2013
ARC2 started with pid=29, OS id=10984
Thu Oct 03 10:22:33 2013
ARC3 started with pid=30, OS id=10986
ARC1: Archival started
ARC2: Archival started
ARC2: Becoming the 'no FAL' ARCH
ARC2: Becoming the 'no SRL' ARCH
ARC1: Becoming the heartbeat ARCH
Thread 1 advanced to log sequence 63 (thread open)
Thread 1 opened at log sequence 63
Current log# 3 seq# 63 mem# 0: /u01/app/oracle/oradata/test0924/redo03.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
SMON: enabling cache recovery
[10963] Successfully onlined Undo Tablespace 5.
Undo initialization finished serial:0 start:691237074 end:691237134 diff:60 (0 seconds)
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Database Characterset is AL32UTF8
Archived Log entry 55 added for thread 1 sequence 62 ID 0xa22d4156 dest 1:
No Resource Manager plan active
Starting background process FBDA
Thu Oct 03 10:22:34 2013
FBDA started with pid=31, OS id=10992
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Thu Oct 03 10:22:34 2013
QMNC started with pid=32, OS id=10994
Completed: ALTER DATABASE OPEN
Thu Oct 03 10:22:34 2013
db_recovery_file_dest_size of 4122 MB is 53.03% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Thu Oct 03 10:22:34 2013
Starting background process CJQ0
Thu Oct 03 10:22:34 2013
CJQ0 started with pid=34, OS id=11008