延伸阅读
Application Seed
Application seed与CDB中的PDB$SEED类似,在使用Application seed做为Application PDBs的创建模板时,你可以快速且容易的创建一个满足要求的Application PDB,Application Container中最多只能创建一个Application seed,当然也可不包含Application seed。
我们可以在Application root中使用CREATE PLUGGABLE DATABASE带有AS SEED子句来创建Application seed,创建时,Application seed可以有如下几种来源,比如CDB seed、克隆现有的PDB或non-CDB以及插入已拔出的PDB,在使用AS SEED子句创建Application seed时,不要需要为其指定名称,固定的命名规则为application_container_name$SEED,例如在Application Container:qdatacon1中创建的Application seed将被命名为qdatacon1$SEED。
(Application Container特性架构图)
如下为使用不同来源创建Application seed的步骤:
1. Creating an Application Seed From the CDB Seed
CREATE PLUGGABLE DATABASE AS SEED ADMIN USER qdadm IDENTIFIED BY password;
ALTER PLUGGABLE DATABASE qdatacon1$SEED OPEN;
ALTER SESSION SET CONTAINER=qdatacon1$SEED;
ALTER PLUGGABLE DATABASE APPLICATION ALL SYNC;
ALTER PLUGGABLE DATABASE CLOSE IMMEDIATE;
ALTER PLUGGABLE DATABASE OPEN READ ONLY;
2. Creating an Application Seed From an Application PDB
CREATE PLUGGABLE DATABASE AS SEED FROM qdcpdb1;
ALTER PLUGGABLE DATABASE qdatacon1$SEED OPEN;
ALTER PLUGGABLE DATABASE CLOSE IMMEDIATE;
ALTER PLUGGABLE DATABASE OPEN READ ONLY;
3. Creating an Application Seed From an Application Root
CREATE PLUGGABLE DATABASE AS SEED FROM qdatacon1;
ALTER PLUGGABLE DATABASE qdatacon1$SEED OPEN;
ALTER SESSION SET CONTAINER=qdatacon1$SEED;
@$ORACLE_HOME/rdbms/admin/pdb_to_apppdb.sql
ALTER PLUGGABLE DATABASE CLOSE IMMEDIATE;