Orcle 12.2新特性 --- PDB Archive Files (.pdb Files)

1 说明

When a pluggable database (PDB) is unplugged, all data files associated with a PDB along with the PDB manifest need to be copied or moved individually over to the remote server where it is plugged into another multitenant container database (CDB). With this new feature, a you can choose to create a single PDB archive file, a compressed file with the .pdb extension, that contains the PDB manifest and all of the data files when unplugging a PDB. When plugging in a PDB, the presence of a .pdb file is interpreted and the PDB is plugged into the CDB. You can choose to run the PDB plug-in compatibility test directly on the PDB archive without extracting the PDB manifest file from the archive.

从12.2有了这个新功能,你可以选择创建一个单一的PDB归档文件,一个带有.pdb扩展名的压缩文件,其中包含PDB元数据和PDB的所有数据文件。

这个功能很实用,大大减少了迁移PDB的复杂性。

图1 拔出PDB
在这里插入图片描述

2 实验

2.1 Unplug PDB

相应的PDB必须关闭,处于MOUNT状态。

SQL> show pdbs;
    CON_ID CON_NAME	  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
 2 PDB$SEED	  READ ONLY  NO
 3 LEI1   MOUNTED
 4 LEI2   MOUNTED
 5 SIHONG MOUNTED
 6 CNDBA_PDB_REF	  MOUNTED
  • 导入到归档文件中(.pdb)
SQL> alter pluggable database sihong unplug into '/software/backup/sihong.pdb';
Pluggable database altered.
  • 看看文件大小
[oracle@db12CR2 backup]$ ll -h
total 440M
-rw-r--r-- 1 oracle oinstall 440M Aug  8 11:40 sihong.pdb

pdb文件可用于快速打包迁移PDB,备份等。

猜你喜欢

转载自blog.csdn.net/qianglei6077/article/details/92795161
pdb