Multitenant Unplug/Plug Best Practices (文档 ID 1935365.1)

1.source 从0419 升级到1019 ,但是datapatch 没有回退0419,导致plug pdb 在target 1019后,数据库无法正常open.

2. 操作步骤如下:(检查cdb 和plug pdb 兼容性,发现一旦不兼容,plug pdb 只能以受限制模式打开,无法使用,解决办法无。怀疑是步骤3 的bug)

source
create pluggable database PIVRSDEV using 'C:\app\oracle\DEV.xml' NOCOPY TEMPFILE REUSE;
alter pluggable database PIVRSDEV open read write instances =all;

sqlplus sys/oracle123@localhost:15301/pivrsdev AS SYSDBA

exec dbms_pdb.describe (‘PDB1_Unplug.xml’, ‘PIVRSDEV’);
 
  --localtion is D:\appOra12c\Administrator\product\12.1.0\dbhome_1\database

step 2:

target

set serveroutput on
 
 begin
  if dbms_pdb.check_plug_compatibility('C:\app\software\PDB1_Unplug.xml','PIVRSDEV') then
    dbms_output.put_line('no violations found');
  else
    dbms_output.put_line('violations found');
  end if;
end;

create table pdb_plug_back as select * from  pdb_plug_in_violations;
delete from  pdb_plug_in_violations;

set linesize 999
set pagesize 999
SELECT name,type, message, action
  FROM pdb_plug_in_violations

report below error .

PIVRSDEV                                                     WARNING
CDB parameter nls_language mismatch: Previous 'AMERICAN' Current 'SIMPLIFIED CHI
NESE'
Please check the parameter in the current CDB

PIVRSDEV                                                     ERROR
 (PSU bundle patch 160419 (WINDOWS DB BUNDLE PATCH 12.1.0.2.160419(64bit):228098
13): APPLY SUCCESS):  with status  in the PDB.
Call datapatch to reinstall

PIVRSDEV                                                     WARNING
CDB parameter nls_territory mismatch: Previous 'AMERICA' Current 'CHINA'
Please check the parameter in the current CDB

PIVRSDEV                                                     ERROR
 (SQL patch ID/UID 24591630/20690333 (WINDOWS ORACLE JAVAVM COMPONENT BUNDLE PAT
CH 12.1.0.2.161018 (64bit):24591630): APPLY SUCCESS):  with status  in the PDB.
Call datapatch to reinstall

PIVRSDEV                                                     ERROR
SQL patch ID/UID 24591630/20690333 (WINDOWS ORACLE JAVAVM COMPONENT BUNDLE PATCH
 12.1.0.2.161018 (64bit):24591630): Installed in the CDB but not in the PDB.
Call datapatch to install in the PDB or the CDB

PIVRSDEV                                                     WARNING
CDB parameter memory_target mismatch: Previous 2000M Current 0
Please check the parameter in the current CDB

PIVRSDEV                                                     ERROR
SQL patch ID/UID 24591642/20650331 (): Installed in the CDB but not in the PDB.
Call datapatch to install in the PDB or the CDB

PIVRSDEV                                                     WARNING
CDB parameter aq_tm_processes mismatch: Previous 10 Current 1
Please check the parameter in the current CDB

3.supect below issue

Bug 21913544 : DATAPATCH GENERATES WARNING IN PDB_PLUG_IN_VIOLATIONS AFTER APPLYING DBBP/DBPSU

4.

Multitenant Unplug/Plug Best Practices (文档 ID 1935365.1) 转到底部

In this Document

  Goal
  Solution
  Preparation:
  Scenarios:
  Scenario 1 – No plug in violations
  Scenario 2 – SQL patch present in target container but not in source container
  Scenario 3 – SQL patch present in source container but not in target container
  Scenario Summary and Actions
  References

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Information in this document applies to any platform.

Goal

To provide the Multitenant Unplug/Plug Best Practices

Solution

When plugging into a new container a PDB may have violations due to Database version (12.1.0.1 vs 12.1.0.2)

  • SQL patch mismatches
  • Database parameter mismatches such as character sets or block size

The dbms_pdb.describe and dbms_pdb.check_plug_compatibility APIs can
be used to determine if a given PDB can be plugged in successfully to a
target container.  Here are the steps to invoke dbms_pdb.describe and
dbms_pdb.check_plug_compatibility to investigate this further:

Preparation:

1) Create PDB description XML file for PDB(PDB1) in question:
    exec dbms_pdb.describe (‘PDB1_Unplug.xml’, ‘PDB1’);
2) In the target container environment, check plug compatibility  
begin
  if dbms_pdb.check_plug_compatibility('PDB1_Unplug.xml', ‘PDB1') then
    dbms_output.put_line(‘no violations found');
  else
    dbms_output.put_line(‘violations found');
  end if;
end;
Plugin compatibility issues, if any, will be reported in
pdb_plug_in_violations view

Scenarios:

Scenario 1 – No plug in violations

SQL> BEGIN
  2    IF dbms_pdb.check_plug_compatibility('/tmp/PDBORCL.xml') THEN
  3       dbms_output.put_line('no violations found');
  4    ELSE
  5       dbms_output.put_line('violations found');
  6    END IF;
  7  END;
  8  /
no violations found

PL/SQL procedure successfully completed.

SQL> SELECT type, message, action
  2    FROM pdb_plug_in_violations
  3    WHERE name = 'PDBORCL';

no rows selected

Scenario 2 – SQL patch present in target container but not in source container

SQL> BEGIN
  2    IF dbms_pdb.check_plug_compatibility('/tmp/PDBORCL.xml') THEN
  3       dbms_output.put_line('no violations found');
  4    ELSE
  5       dbms_output.put_line('violations found');
  6    END IF;
  7  END;
  8  /
violations found

SQL> SELECT type, message, action
  2    FROM pdb_plug_in_violations
  3    WHERE name = 'PDBORCL';

TYPE      MESSAGE
--------- --------------------------------------------------------------------------------
ACTION
--------------------------------------------------------------------------------
ERROR      PSU bundle patch 1 (PSU Patch 12345): Installed in the CDB but not in the PDB.

Call datapatch to install in the PDB or the CDB

Scenario 3 – SQL patch present in source container but not in target container

SQL> BEGIN
  2    IF dbms_pdb.check_plug_compatibility('/tmp/PDBORCL.xml') THEN
  3       dbms_output.put_line('no violations found');
  4    ELSE
  5       dbms_output.put_line('violations found');
  6    END IF;
  7  END;
  8  /
violations found

SQL> SELECT type, message, action
  2    FROM pdb_plug_in_violations
  3    WHERE name = 'PDBORCL';

TYPE      MESSAGE
--------- --------------------------------------------------------------------------------
ACTION
--------------------------------------------------------------------------------
ERROR      PSU bundle patch 1 (PSU Patch 12345): Installed in the PDB but not in the CDB.
Call datapatch to install in the PDB or the CDB

Scenario Summary and Actions

Scenario

Recommended Action

1: SQL Patches in both source and target container

None needed – safe to plug in (see Document 1633071.1)

2: SQL Patches in target container only

Run datapatch in target after plug in

3: SQL Patches in source container only

Option 1: Rollback the patch(es) on the source PDB before unplugging

% datapatch -rollback < patch id > –force [–bundle_series] -pdbs <pdb1,pdb2,...,pdbn>

Option 2: Install the patch(es) on the target installation then run datapatch in target after plug in

Note: Option 2 will apply the new patches in the CDB and all PDBs in the target.

Plugging an Unplugged Pluggable Database issue 3的更多相关文章

  1. Plugging an Unplugged Pluggable Database issue 2

    因为原库和目标库版本不一制,出现各种问题,强烈建议保持2个版本一致 http://www.cndba.cn/dave/article/220 Log 提示查看PDB_PLUG_IN_VIOLATION ...

  2. Plugging an Unplugged Pluggable Database

    1.unplug To unplug a PDB, you first close it and then generate an XML manifest file. The XML file co ...

  3. ORA-65179: cannot keep datafiles for a pluggable database that is not unplugged

    SQL> drop pluggable database pdb2; drop pluggable database pdb2 * ERROR at line : ORA-: cannot ke ...

  4. oracle12c新特点之可插拔数据库(Pluggable Database,PDB)

    1.    12c PDB新特点的优势 1)    可以把多个PDB集成进一个平台. 2)    可以快速提供一个新的PDB或一个已有PDB的克隆. 3)    通过拔插技术,可以快速把存在的数据库重 ...

  5. Oracle Database 12c 新特性 - Pluggable Database

    在Oracle Database 12c中,可组装式数据库 - Pluggable Database为云计算而生.在12c以前,Oracle数据库是通过Schema来进行用户模式隔离的,现在,可组装式 ...

  6. Oracle 12c: RMAN restore/recover pluggable database

    查看数据库状态 运行在归档模式,可拔插数据库name=pdborcl SQL> archive log list; Database log mode Archive Mode Automati ...

  7. Oracle 12C pluggable database自启动

    实验环境创建了两个PDB,本实验实现在开启数据库时,实现pluggable database PDB2自启动: 原始环境: SQL> shu immediateDatabase closed.D ...

  8. Clone a Pluggable Database – 12c Edition

    1. 1.Tnsnames when connecting to either Container or Pluggable instance The tnsnames.ora should be c ...

  9. Multitenant best Practice clone pdb seed and Clone a Pluggable Database – 12c Edition

    1. 1.Tnsnames when connecting to either Container or Pluggable instance The tnsnames.ora should be c ...

随机推荐

  1. VB6 如何添加自定义函数 模块 把代码放到一个模块中

    1 工程-添加模块,在右侧工程视图中可以发现多了一个Module1   2 比如我在这个模块中自定义两个函数,分别为写入和读取INI的函数   3 则在主程序中已经可以直接调用  

  2. 畅通project续

    Time Limit : 3000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) ...

  3. Android 官方博客 - Android应用程序的内存分析(翻译)(转)

    转自:http://www.cnblogs.com/wisekingokok/archive/2011/11/30/2245790.html Dalvik虚拟机支持垃圾收集,但是这不意味着你可以不用关 ...

  4. Java中有多少种设计模式?请简单画一下三种常见设计模式的类图?

    转载:http://blog.csdn.net/longyulu/article/details/9159589 一.设计模式的分类 总体来说设计模式分为三大类: 创建型模式,共五种:工厂方法模式.抽 ...

  5. a simple and universal interface between web servers and web applications or frameworks: the Python Web Server Gateway Interface (WSGI).

    WSGI is the Web Server Gateway Interface. It is a specification that describes how a web server comm ...

  6. 1分钟看完 jQuery UI

    jQuery UI简介 jQuery UI包含了许多维持状态的小部件(Widget),因此,它与典型的 jQuery 插件使用模式略有不同.所有的 jQuery UI 小部件(Widget)使用相同的 ...

  7. YTU 2844: 改错题A-看电影

    2844: 改错题A-看电影 时间限制: 1 Sec  内存限制: 128 MB 提交: 69  解决: 47 题目描述 注:本题只需要提交标记为修改部分之间的代码,请按照C++方式提交. 小平家长为 ...

  8. idea output 悬浮浮动问题

    参考:https://www.cnblogs.com/thinkingandworkinghard/p/6306800.html 点这个就ok

  9. codeforces 682D D. Alyona and Strings(dp)

    题目链接: D. Alyona and Strings time limit per test 2 seconds memory limit per test 256 megabytes input ...

  10. oracle分区表有什么作用

    oracle分区表有什么作用 https://zhidao.baidu.com/question/1818955865408544348.html (1) 表空间及分区表的概念 表空间: 是一个或多个 ...