oracle12C 随CDB启动PDB数据库

阅读更多
1.确保oracle已经启动
SQL> startup
ORA-01081: 无法启动已在运行的 ORACLE - 请先将其关闭
或者
ORACLE 例程已经启动。

Total System Global Area  805306368 bytes
Fixed Size                  3050800 bytes
Variable Size             394265296 bytes
Database Buffers          297795584 bytes
Redo Buffers                5337088 bytes
In-Memory Area            104857600 bytes
数据库装载完毕。
数据库已经打开。
2.查询dba_pdb_saved_states无记录
SQL> select con_name, state from dba_pdb_saved_states;
未选定行
3.在数据库mount状态下save state
show pdbs;
  CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDBORCL                        MOUNTED
4.查询dba_pdb_saved_states无记录
SQL> select con_name, state from dba_pdb_saved_states;

未选定行
5.在数据库mount状态下save state
ALTER PLUGGABLE DATABASE PDBORCL save state;
插接式数据库已变更。
select con_name, state from dba_pdb_saved_states;

未选定行
pdb为mount状态下,执行save state无记录,证明save state不成功

6在数据库open状态下save state—-设置pdb随cdb启动

SQL> ALTER PLUGGABLE DATABASE PDBORCL save state;

插接式数据库已变更。

SQL> select con_name, state from dba_pdb_saved_states;

CON_NAME
---------------------------------------------------------------

STATE
--------------
PDBORCL
OPEN
pdb为open状态下,执save state成功.
需要注意save state需要在pdb open情况下执行才能够生效.

3.重启数据库测试pdb随cdb启动

你可能感兴趣的:(oracle12C 随CDB启动PDB数据库)