以启动DB12为例子
$ sqlplus '/as sysdba'SQL*Plus: Release 12.1.0.2.0 Production on Sun Nov 1 15:48:15 2015Copyright (c) 1982, 2014, Oracle. All rights reserved.Connected to an idle instance.
1.nomount阶段
SQL> startup nomount; ORACLE instance started.Total System Global Area 1174405120 bytesFixed Size 2923680 bytesVariable Size 436208480 bytesDatabase Buffers 721420288 bytesRedo Buffers 13852672 bytesSQL> select name,open_mode from v$pdbs;no rows selected
2.mount阶段:打开控制文件,Root和pdbs都被mount起来
SQL> alter database db12 mount; Database altered.SQL> select name,open_mode from v$pdbs;NAME OPEN_MODE------------------------------ ----------PDB$SEED MOUNTEDPDB1 MOUNTEDPDB2 MOUNTED
3.open阶段:root被打开,pdbs仍然是mounted状态,seed pdb处于只读状态
SQL> alter database db12 open;Database altered.SQL> select name,open_mode from v$pdbs;NAME OPEN_MODE------------------------------ ----------PDB$SEED READ ONLYPDB1 MOUNTEDPDB2 MOUNTED
4.打开PDB
SQL> connect sys@pdb1 as sysdbaEnter password: Connected.SQL> alter pluggable database pdb1 open;Pluggable database altered.SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE------------------------------ ----------PDB1 READ WRITESQL>