Oracle 18c bug 致使執行 DBMS_PDB.CHECK_PLUG_COMPATIBILITY報錯sql
在Oracle 18c 插入PDB時須要進行兼容性檢查,在執行DBMS_PDB.CHECK_PLUG_COMPATIBILITY時會報ORA-07445: exception encountered: core dump [__intel_ssse3_rep_memcpy()+6461]的錯誤,以下:數據庫
[dave@www.cndba.cn admin]$ sqlplus / as sysdba SQL*Plus: Release 18.0.0.0.0 - Production on Thu Oct 25 11:52:34 2018 Version 18.3.0.0.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Connected to: Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production Version 18.3.0.0.0 SQL> select banner from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production SQL> SET SERVEROUTPUT ON DECLARE compatible CONSTANT VARCHAR2(3) := CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY( pdb_descr_file => '/opt/oracle/oradata/ORCLCDB/dave/dave.xml', pdb_name => 'dave') WHEN TRUE THEN 'YES' ELSE 'NO' END; BEGIN DBMS_OUTPUT.PUT_LINE(compatible); END; / SQL> 2 3 4 5 6 7 8 9 10 11 12 ERROR: ORA-03114: not connected to ORACLE DECLARE * ERROR at line 1: ORA-03113: end-of-file on communication channel Process ID: 2748 Session ID: 1 Serial number: 37812
查看log 日誌:oracle
2018-10-25T11:10:15.262580+08:00 Exception [type: SIGSEGV, Invalid permissions for mapped object] [ADDR:0x7F6B69AF5000] [PC:0x6E46EED, __intel_ssse3_rep_memcpy()+6461] [flags: 0x0, count: 1] Errors in file /opt/oracle/diag/rdbms/orclcdb/ORCLCDB/trace/ORCLCDB_ora_2123.trc (incident=19481) (PDBNAME=CDB$ROOT): ORA-07445: exception encountered: core dump [__intel_ssse3_rep_memcpy()+6461] [SIGSEGV] [ADDR:0x7F6B69AF5000] [PC:0x6E46EED] [Invalid permissions for mapped object] [] Incident details in: /opt/oracle/diag/rdbms/orclcdb/ORCLCDB/incident/incdir_19481/ORCLCDB_ora_2123_i19481.trc Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details. Exception [type: SIGSEGV, SI_KERNEL(general_protection)] [ADDR:0x0] [PC:0x112C4711, pfrtcs()+65] [flags: 0x0, count: 2] Errors in file /opt/oracle/diag/rdbms/orclcdb/ORCLCDB/trace/ORCLCDB_ora_2123.trc (incident=19482) (PDBNAME=CDB$ROOT): ORA-07445: exception encountered: core dump [pfrtcs()+65] [SIGSEGV] [ADDR:0x0] [PC:0x112C4711] [SI_KERNEL(general_protection)] [] ORA-07445: exception encountered: core dump [__intel_ssse3_rep_memcpy()+6461] [SIGSEGV] [ADDR:0x7F6B69AF5000] [PC:0x6E46EED] [Invalid permissions for mapped object] [] Incident details in: /opt/oracle/diag/rdbms/orclcdb/ORCLCDB/incident/incdir_19482/ORCLCDB_ora_2123_i19482.trc Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details.
根據MOS 文檔說明,這裏是Oracle 18c 的bug:app
DBMS_PDB.CHECK_PLUG_COMPATIBILITY = ORA-3113 / ORA-7445[__intel_ssse3_rep_memcpy()+6429] (文檔 ID 2446450.1)
解決方法就是升級到19.1 或者打Patch 28502403 ,咱們這裏選擇打補丁:ide
[dave@www.cndba.cn tmp]$ unzip p28502403_183000DBRU_Linux-x86-64.zip Archive: p28502403_183000DBRU_Linux-x86-64.zip creating: 28502403/ inflating: 28502403/README.txt creating: 28502403/files/ creating: 28502403/files/lib/ creating: 28502403/files/lib/libserver18.a/ inflating: 28502403/files/lib/libserver18.a/kpdbe.o creating: 28502403/etc/ creating: 28502403/etc/config/ inflating: 28502403/etc/config/actions.xml inflating: 28502403/etc/config/inventory.xml inflating: PatchSearch.xml [dave@www.cndba.cn tmp]$ cd 28502403/ [dave@www.cndba.cn 28502403]$ ls etc files README.txt [dave@www.cndba.cn 28502403]$ $ORACLE_HOME/OPatch/opatch apply Oracle Interim Patch Installer version 12.2.0.1.14 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /opt/oracle/product/18c/dbhome_1 Central Inventory : /opt/oracle/oraInventory from : /opt/oracle/product/18c/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.14 OUI version : 12.2.0.4.0 Log file location : /opt/oracle/product/18c/dbhome_1/cfgtoollogs/opatch/opatch2018-10-25_11-28-32AM_1.log Verifying environment and performing prerequisite checks... Prerequisite check "CheckActiveFilesAndExecutables" failed. The details are: Following executables are active : /opt/oracle/product/18c/dbhome_1/bin/oracle UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed. Log file location: /opt/oracle/product/18c/dbhome_1/cfgtoollogs/opatch/opatch2018-10-25_11-28-32AM_1.log OPatch failed with error code 73 [dave@www.cndba.cn 28502403]$
補丁報錯,查看日誌:函數
[Oct 25, 2018 11:28:38 AM] [INFO] Files in use by a process: /opt/oracle/product/18c/dbhome_1/bin/oracle PID( 2665 2667 2669 2671 2675 2677 2684 2687 2690 2693 2695 2700 2702 2704 2706 2 708 2710 2712 2714 2716 2718 2720 2722 2724 2728 2730 2733 2735 2737 2742 2744 2750 2752 2754 2756 2758 2760 2762 2770 2777 2782 2784 2803 2996 3003 3017 3021 3023 3039 3850 ) [Oct 25, 2018 11:28:38 AM] [INFO] Following executables are active : /opt/oracle/product/18c/dbhome_1/bin/oracle [Oct 25, 2018 11:28:38 AM] [INFO] Prerequisite check "CheckActiveFilesAndExecutables" failed. The details are:
數據庫在使用,關閉數據庫和監聽後,在打正常:ui
[dave@www.cndba.cn 28502403]$ $ORACLE_HOME/OPatch/opatch apply Oracle Interim Patch Installer version 12.2.0.1.14 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /opt/oracle/product/18c/dbhome_1 Central Inventory : /opt/oracle/oraInventory from : /opt/oracle/product/18c/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.14 OUI version : 12.2.0.4.0 Log file location : /opt/oracle/product/18c/dbhome_1/cfgtoollogs/opatch/opatch2018-10-25_11-34-28AM_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 28502403 Do you want to proceed? [y|n] y User Responded with: Y All checks passed. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/opt/oracle/product/18c/dbhome_1') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch '28502403' to OH '/opt/oracle/product/18c/dbhome_1' Patching component oracle.rdbms, 18.0.0.0.0... Patch 28502403 successfully applied. Log file location: /opt/oracle/product/18c/dbhome_1/cfgtoollogs/opatch/opatch2018-10-25_11-34-28AM_1.log OPatch succeeded. [dave@www.cndba.cn 28502403]$
打完補丁後函數也正常執行:this
SQL> SET SERVEROUTPUT ON DECLARE compatible CONSTANT VARCHAR2(3) := CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY( pdb_descr_file => '/opt/oracle/oradata/ORCLCDB/dave/dave.xml', pdb_name => 'dave') WHEN TRUE THEN 'YES' ELSE 'NO' END; BEGIN DBMS_OUTPUT.PUT_LINE(compatible); END; / SQL> 2 3 4 5 6 7 8 9 10 11 12 NO PL/SQL procedure successfully completed.