前一阵测试oracle 19.12补丁,没注意后台日志还报了个错
-
2021-09-13T07:50:09.558237-07:00
-
Unable to obtain current patch information due to error: 20001, ORA-20001: Latest xml inventory is not loaded into table
-
ORA-06512: at "SYS.DBMS_QOPATCH", line 2327
-
ORA-06512: at "SYS.DBMS_QOPATCH", line 854
-
ORA-06512: at "SYS.DBMS_QOPATCH", line 937
-
ORA-06510: PL/SQL: unhandled user-defined exception
-
ORA-06512: at "SYS.DBMS_QOPATCH", line 932
-
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
-
ORA-29400: data cartridge error
-
KUP-04020: found record longer than buffer size supported, 8388608, in /u01/app/oracle/product/19.0.0/dbhome_1/QOpatch/qopiprep.bat (offset=0)
-
ORA-06512: at "SYS.DBMS_QOPATCH", line 919
-
ORA-06512: at "SYS.DBMS_QOPATCH", line 2286
-
ORA-06512: at "SYS.DBMS_QOPATCH", line 817
-
ORA-06512: at "SYS.DBMS_QOPATCH", line 2309
-
-
===========================================================
-
Dumping current patch information
-
===========================================================
-
Unable to obtain current patch information due to error: 20001
-
===========================================================
根据具体提示,好像跟xml格式的inventory信息有关,与上次看到的LANG=c导致的问题现象不一样,后来看官方文档(Doc ID 1948198.1)说是外部表 OPATCH_XML_INV 被损坏或不存在,需要做如下处理:
-
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Nov 5 06:31:16 2021
-
Version 19.12.0.0.0
-
-
Copyright (c) 1982, 2021, Oracle. All rights reserved.
-
-
-
Connected to:
-
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
-
Version 19.12.0.0.0
-
-
sys@orcl:PRIMARY:38> select * from OPATCH_XML_INV;
-
ERROR:
-
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
-
ORA-29400: data cartridge error
-
KUP-04020: found record longer than buffer size supported, 8388608, in /u01/app/oracle/product/19.0.0/dbhome_1/QOpatch/qopiprep.bat (offset=0)
-
-
-
-
no rows selected
-
-
sys@orcl:PRIMARY:38> desc SYS.OPATCH_XML_INV ;
-
Name Null? Type
-
----------------------------------------------------------------------------------- -------- --------------------------------------------------------
-
XML_INVENTORY CLOB
-
-
sys@orcl:PRIMARY:38> drop table SYS.OPATCH_XML_INV;
-
-
Table dropped.
-
-
sys@orcl:PRIMARY:38> CREATE TABLE opatch_xml_inv
-
2 (
-
3 xml_inventory CLOB
-
4 )
-
5 ORGANIZATION EXTERNAL
-
6 (
-
7 TYPE oracle_loader
-
8 DEFAULT DIRECTORY opatch_script_dir
-
9 ACCESS PARAMETERS
-
10 (
-
11 RECORDS DELIMITED BY NEWLINE
-
12 READSIZE 67108864
-
13 preprocessor opatch_script_dir:'qopiprep.bat'
-
14 BADFILE opatch_script_dir:'qopatch_bad.bad'
-
15 LOGFILE opatch_log_dir:'qopatch_log.log'
-
16 FIELDS TERMINATED BY 'UIJSVTBOEIZBEFFQBL'
-
17 MISSING FIELD VALUES ARE NULL
-
18 REJECT ROWS WITH ALL NULL FIELDS
-
19 (
-
20 xml_inventory CHAR(100000000)
-
21 )
-
22 )
-
23 LOCATION(opatch_script_dir:'qopiprep.bat')
-
24 )
-
25 PARALLEL 1
-
26 REJECT LIMIT UNLIMITED;
-
-
Table created.
-
-
sys@orcl:PRIMARY:38> alter package sys.DBMS_QOPATCH compile body ;
-
-
Package body altered.
-
-
sys@orcl:PRIMARY:38> select owner, object_name,object_type,status FROM dba_objects where object_name in ('DBMS_QOPATCH' ,'OPATCH_XML_INV');
-
-
OWNER
-
--------------------
-
OBJECT_NAME
-
------------------------------------------------------------------------------------------------------------------------------------------------------
-
OBJECT_TYPE STATUS
-
---------------------------------------------- --------------
-
SYS
-
DBMS_QOPATCH
-
PACKAGE VALID
-
-
SYS
-
DBMS_QOPATCH
-
PACKAGE BODY VALID
-
-
SYS
-
OPATCH_XML_INV
-
TABLE VALID
-
-
-
sys@orcl:PRIMARY:38> col object_name for a32
-
sys@orcl:PRIMARY:38> select comp_id, status, version from dba_registry;
-
-
COMP_ID STATUS
-
------------------------------------------------------------ ----------------------------------------------------------------------------------------
-
VERSION
-
------------------------------------------------------------
-
CATALOG VALID
-
19.0.0.0.0
-
-
CATPROC VALID
-
19.0.0.0.0
-
-
RAC OPTION OFF
-
19.0.0.0.0
-
-
JAVAVM VALID
-
19.0.0.0.0
-
-
XML VALID
-
19.0.0.0.0
-
-
CATJAVA VALID
-
19.0.0.0.0
-
-
APS VALID
-
19.0.0.0.0
-
-
XDB VALID
-
19.0.0.0.0
-
-
OWM VALID
-
19.0.0.0.0
-
-
CONTEXT VALID
-
19.0.0.0.0
-
-
ORDIM VALID
-
19.0.0.0.0
-
-
SDO VALID
-
19.0.0.0.0
-
-
XOQ VALID
-
19.0.0.0.0
-
-
OLS VALID
-
19.0.0.0.0
-
-
DV VALID
-
19.0.0.0.0
-
-
-
15 rows selected.
-
-
sys@orcl:PRIMARY:38> exit
-
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
-
Version 19.12.0.0.0
-
[oracle@bjdb boot]$ env|grep HOME
-
ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
-
HOME=/home/oracle
-
[oracle@bjdb boot]$ find /u01 -name datapatch*
-
/u01/app/oracle/product/19.0.0/dbhome_1/OPatch_bak/datapatch
-
/u01/app/oracle/product/19.0.0/dbhome_1/OPatch/datapatch
-
/u01/app/oracle/product/19.0.0/dbhome_1/OPatch/datapatch.bat
-
[oracle@bjdb boot]$ cd /u01/app/oracle/product/19.0.0/dbhome_1/OPatch/
-
[oracle@bjdb OPatch]$ ./datapatch
-
SQL Patching tool version 19.12.0.0.0 Production on Fri Nov 5 06:33:17 2021
-
Copyright (c) 2012, 2021, Oracle. All rights reserved.
-
-
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_3548_2021_11_05_06_33_17/sqlpatch_invocation.log
-
-
Connecting to database...OK
-
Gathering database info...done
-
Bootstrapping registry and package to current versions...done
-
Determining current state...done
-
-
Current state of interim SQL patches:
-
Interim patch 32876380 (OJVM RELEASE UPDATE: 19.12.0.0.210720 (32876380)):
-
Binary registry: Installed
-
SQL registry: Not installed
-
-
Current state of release update SQL patches:
-
Binary registry:
-
19.12.0.0.0 Release_Update 210716141810: Installed
-
SQL registry:
-
Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 13-SEP-21 07.05.02.955102 AM
-
-
Adding patches to installation queue and performing prereq checks...done
-
Installation queue:
-
No interim patches need to be rolled back
-
Patch 32904851 (Database Release Update : 19.12.0.0.210720 (32904851)):
-
Apply from 19.3.0.0.0 Release_Update 190410122720 to 19.12.0.0.0 Release_Update 210716141810
-
The following interim patches will be applied:
-
32876380 (OJVM RELEASE UPDATE: 19.12.0.0.210720 (32876380))
-
-
Installing patches...
-
Patch installation complete. Total patches installed: 2
-
-
Validating logfiles...done
-
Patch 32904851 apply: SUCCESS
-
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/32904851/24343243/32904851_apply_ORCL_2021Nov05_06_34_24.log (no errors)
-
Patch 32876380 apply: SUCCESS
-
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/32876380/24269510/32876380_apply_ORCL_2021Nov05_06_33_45.log (no errors)
-
SQL Patching tool complete on Fri Nov 5 06:40:49 2021
再次重启实例,不再提示ORA-20001错误。
KUP-04020 这个报错说明是外部表相关的问题,类似的有ORA- TNS- CRS- ,现在多见
INS- ASM-opatch- 等开头的报错。
阅读(1910) | 评论(0) | 转发(0) |