Orcle 12c 新特性---创建PDB支持指定默认表空间

1 说明

When you create the PDB from the CDB seed or an application seed and specify the DEFAULT TABLESPACE clause, Oracle Database creates a smallfile tablespace and sets it as the default tablespace for the PDB. When you create the PDB using a method other than the using the CDB seed or application seed, such as cloning a PDB or plugging in an unplugged PDB, the default tablespace must be a tablespace that already exists in the source PDB.

在12.1中,只支持通过种子PDB来创建新的PDB时,才可以指定默认表空间。12.2中,通过CREATE PLUGGABLE DATABASE语句创建的PDB,就可以指定默认表空间。

  • 一是通过CDB seed 或者application seed来创建的PDB,指定的默认表空间,Oracle会自动创建相关表空间。

  • 二是通过克隆其他PDB或者plug其他PDB,那么默认的表空间必须要存在于那个PDB中。

2 语法

oracle会自动创建表空间sihong

create pluggable database sihong admin user cndba identified by cndba
file_name_convert=('/u01/app/oracle/oradata/orcl/pdbseed/','/u01/app/oracle/oradata/orcl/sihong/')
DEFAULT TABLESPACE sihong;

猜你喜欢

转载自blog.csdn.net/qianglei6077/article/details/92795017