因为原库和目标库版本不一制,出现各种问题,强烈建议保持2个版本一致
http://www.cndba.cn/dave/article/220
Log 提示查看PDB_PLUG_IN_VIOLATIONS。
col action for a70
select status,action from PDB_PLUG_IN_VIOLATIONS;
RESOLVED
Please check the parameter in the current CDB
PENDING
Call datapatch to install in the PDB or the CDB
PENDING
Call datapatch to install in the PDB or the CDB
PENDING
Call datapatch to install in the PDB or the CDB
已选择 8 行。
select message from PDB_PLUG_IN_VIOLATIONS;
SU bundle patch 4 (Database Patch Set Update : 12.1.0.2.4 (20831110)): Installed in the CDB but not in the PDB.
shutdown immediate
startup upgrade
alter pluggable database PIVRSDEV close immediate;
alter pluggable database PIVRSDEV open upgrade;
cd C:\app\oracle\product\12.1.0\dbhome_1\OPatch
##datapatch.bat -verbose -pdbs PIVRSDEV
datapatch.bat -verbose
##因为需要回退补丁,所以需要将source 下的$ORACLE_HOME\sqlpatch 下的两个文件夹 才copy 到target 机器$ORACLE_HOME\sqlpatch
##(atapatch fails with "The Database Must Be In Upgrade Mode" error (文档 ID 2006198.1)) .\datapatch.bat -verbose
##因为之前已经打过patch,所以这里直接执行脚本即可:
(DB_NAME IS UPPER,AND GIVE ADMINISTRATOR OSDBA GROUP )
AND THEN RESTART WHOLE DB
alter pluggable database PIVRSDEV close immediate;
alter pluggable database PIVRSDEV open read write;
alter pluggable database all save state;
shutdown immediate;
startup
--结论:
###bug After running datapatch, PDB plugin or cloned db returns violations shown in PDB_PLUG_IN_VIOLATION (文档 ID 1635482.1)
内容如下:
alter pluggable database PIVRSDEV open read write;
PDB_PLUG_IN_VIOLATIONS 就会有pending;
alter pluggable database PIVRSDEV open upgrade:
PDB_PLUG_IN_VIOLATIONS 就会有 resolved.
workaroud.
·##只能保持2个版本一致。