以启动DB12为例子
$ sqlplus '/as sysdba' SQL*Plus: Release 12.1.0.2.0 Production on Sun Nov 1 15:48:15 2015 Copyright (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 bytes Fixed Size 2923680 bytes Variable Size 436208480 bytes Database Buffers 721420288 bytes Redo Buffers 13852672 bytes SQL> 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 MOUNTED PDB1 MOUNTED PDB2 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 ONLY PDB1 MOUNTED PDB2 MOUNTED
4.打开PDB
SQL> connect sys@pdb1 as sysdba Enter password: Connected. SQL> alter pluggable database pdb1 open; Pluggable database altered. SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ---------- PDB1 READ WRITE SQL>