Starting in Oracle Database 18c, the parent copy can be a PDB rather than a storage volume. The split mirror clone PDB resides on the same media as the parent. The principal use case is to rapidly provision test and development PDBs in an Oracle ASM environment.
SQL> show con_name
CON_NAME
——————————
CDB$ROOT
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
SQL> alter session set container=PDB1;
Session altered.
执行以下语句,提示要修改磁盘组的compatible.rdbms属性为18.0.0.0.0或更高
SQL> ALTER PLUGGABLE DATABASE PREPARE MIRROR COPY PDB1_COPY;
ALTER PLUGGABLE DATABASE PREPARE MIRROR COPY PDB1_COPY
*
ERROR at line 1:
ORA-15283: ASM operation requires compatible.rdbms of 18.0.0.0.0 or higher
使用asmca进行了修改
修改完成后再执行以下语句创建
SQL> ALTER PLUGGABLE DATABASE PREPARE MIRROR COPY PDB1_COPY;
Pluggable database altered.
SQL> SHOW CON_NAME
CON_NAME
——————————
PDB1
SQL> alter session set container=CDB$ROOT;
Session altered.
SQL> show con_name
CON_NAME
——————————
CDB$ROOT
Splitting the Mirrored Copy and Creating the Database Clone
SQL> CREATE PLUGGABLE DATABASE newpdb1 FROM pdb1 USING MIRROR COPY pdb1_copy;
Pluggable database created.
查看V$ASM_DBCOLNE_INFO和V$ASM_FILEGROUP视图中的信息
[grid@db18adm01 ~]$ sqlplus / as sysasm
SQL*Plus: Release 18.0.0.0.0 Production on Fri Mar 16 00:01:54 2018
Version 18.1.0.0.0
Copyright (c) 1982, 2017, Oracle. All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 – Production