什么是PDB Refresh功能?
Oracle PDB Refresh是在12.2版本推出了一个pdb的管理功能,它是pdb热克隆技术的一个增强。从Oracle多租户版本迭代中,目前在18c中有一次比较大的功能更新,支持了pdb级别的switchover功能。其他版本里的基本是修补一些相关的bug。(pdb switchover功能目前只支持Oracle Database Cloud Service和Exadata一体机使用)

支持三种类型的源端数据库,分别是Local PDB/PDB in a remote CDB/Non-CDB。这里要注意的是不管是本地还是远程,都需要创建dblink(语法上决定的)。

file

refresh基本语法及相关视图
基础创建语法:

Create pluggable database new_pdb from old_pdb@db_link [fail_name_convert] refresh mode NONE/MANUAL/EVERY TIME [parallel N]

基础管理语法:

alter pluggable database enmodb refresh mode manual; alter pluggable database enmodb refresh mode every 1 hours; alter pluggable database enmodb refresh mode every 1 minutes; alter pluggable database enmodb refresh mode none;

相关视图:

`dba_pdbs ---查看refresh配置信息

pdb_plug_in_violations ---查看refresh错误信息
`

相关参数:

remote_recovery_file_dest ---在源库关闭或异常的情况下,目标库设置了这个参数的话,可以从这个位置找到归档应用到目

refresh的前置限制条件
源端和目标端数据库必须为归档模式
源端和目标端必须为local_undo多租户(database_properties where property_name=‘LOCAL_UNDO_ENABLED’)
源端和目标端需要同平台,字节顺序相同
确保目标库有足够的SGA/PGA内存分配给refresh过来的pdb
确保目标库磁盘组有足够的可用空间存放refresh过来的pdb
源库pdb的字符集要和目标CDB的字符集和国家字符集兼容,例如目标库是AL32UTF8的话,源库可以是ZHS16GBK,但是反过来就不行。

Related Posts