zoukankan      html  css  js  c++  java
  • Plugging an Unplugged Pluggable Database issue 3

    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:apporacleDEV.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:appOra12cAdministratorproduct12.1.0dbhome_1database
     
     
     

    step 2:

    target


     set serveroutput on
     
     begin
      if dbms_pdb.check_plug_compatibility('C:appsoftwarePDB1_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.

    转到底部转到底部

    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.

  • 相关阅读:
    bzoj 3747: [POI2015]Kinoman
    bzoj 3123: [Sdoi2013]森林
    bzoj 1901: Zju2112 Dynamic Rankings
    poj 1741 Tree
    bzoj 2152: 聪聪可可
    bzoj 2599: [IOI2011]Race
    bzoj 3697: 采药人的路径
    bzoj 2728: [HNOI2012]与非
    bzoj 2115: [Wc2011] Xor
    bzoj 3143: [Hnoi2013]游走
  • 原文地址:https://www.cnblogs.com/feiyun8616/p/6514124.html
Copyright © 2011-2022 走看看