http://luckysea.itpub.net/post/5481/331177
重温了一下数据库的启动过程
1、oracle 启动时需要的文件的顺序
spfilesid.ora > spfile.ora > initsid.ora
2、alter database nomount
分配虚拟内存
3、alter database mount
alert.log
ALTER DATABASE MOUNT
Fri Aug 06 13:59:01 2004
Setting recovery target incarnation to 2
Fri Aug 06 13:59:02 2004
Successful mount of redo thread 1, with mount id 421962465
Fri Aug 06 13:59:02 2004
Database mounted in Exclusive Mode
Completed: ALTER DATABASE MOUNT
分配mount id
同时启动heartbeat
PENG(sys)>select cphbt from X$KCCCP;
CPHBT
----------
533466912
0
0
0
0
0
0
0
已选择8行。
3秒钟之后
PENG(sys)>select cphbt from X$KCCCP;
CPHBT
----------
533466913
0
0
0
0
0
0
0
转储控制文件
PENG(sys)>alter session set events 'immediate trace name CONTROLF level 10';
会话已更改。
--跟踪文件
Dump file c:oracleproduct10.2.0adminorcludumporcl_ora_2244.trc
Fri Aug 06 15:16:36 2004
ORACLE V10.2.0.1.0 - Production vsnsta=0
vsnsql=14 vsnxtr=3
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Windows Server 2003 Version V5.2 Service Pack 1
CPU : 1 - type 586, 1 Physical Cores
Process Affinity : 0x00000000
Memory (Avail/Total): Ph:150M/699M, Ph+PgF:561M/1245M, VA:1708M/2047M
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 18
Windows thread id: 2244, image: ORACLE.EXE (SHAD)
*** 2004-08-06 15:16:36.125
*** SERVICE NAME:(peng) 2004-08-06 15:16:36.062
*** SESSION ID:(159.5) 2004-08-06 15:16:36.062
DUMP OF CONTROL FILES, Seq # 1914 = 0x77a
V10 STYLE FILE HEADER:
Compatibility Vsn = 169869568=0xa200100
Db ID=497086482=0x1da0f012, Db Name='PENG'
Activation ID=0=0x0
Control Seq=1914=0x77a, File size=430=0x1ae
File Number=0, Blksiz=16384, File Type=1 CONTROL
Logical block number 1 (header block)
Dump of memory from 0x072D7E00 to 0x072DBE00
72D7E00 0000C215 00000001 00000000 04010000 [................]
72D7E10 00006604 00000000 0A200100 1DA0F012 [.f........ .....]
72D7E20 474E4550 00000000 0000077A 000001AE [PENG....z.......]
72D7E30 00004000 00010000 00000000 00000000 [.@..............]
72D7E40 00000000 00000000 00000000 00000000 [................]
Repeat 1 times
......
......
4、读取口令文件
orapwsid.ora > orapw.ora
5、有时在dbs目录会出现LKsid的文件
说明数据库在锁定状态
6、数据库open阶段
根据控制文件记载的信息,找到数据库文件,进行检查点和完整性检查
(1)检查数据文件头的检查点计数和控制文件的检查点计数是否一致,否则进行数据恢复
(2)检查数据文件头的开始SCN和控制文件中记录的结束SCN是否一致,否则进行数据恢复
(3)打开数据库,锁定数据文件,同时将每个数据文件的SCN设置为无穷大
(4)比对数据库的字符集和控制文件的字符集是否一致,如果不一致,则用数据库的字符集更新控制文件的字符集
Database Characterset is ZHS16GBK