Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3672183
  • 博文数量: 715
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7745
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(715)

文章存档

2023年(75)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

分类: Oracle

2021-11-05 21:49:20

前一阵测试oracle 19.12补丁,没注意后台日志还报了个错

  1. 2021-09-13T07:50:09.558237-07:00
  2. Unable to obtain current patch information due to error: 20001, ORA-20001: Latest xml inventory is not loaded into table
  3. ORA-06512: at "SYS.DBMS_QOPATCH", line 2327
  4. ORA-06512: at "SYS.DBMS_QOPATCH", line 854
  5. ORA-06512: at "SYS.DBMS_QOPATCH", line 937
  6. ORA-06510: PL/SQL: unhandled user-defined exception
  7. ORA-06512: at "SYS.DBMS_QOPATCH", line 932
  8. ORA-29913: error in executing ODCIEXTTABLEFETCH callout
  9. ORA-29400: data cartridge error
  10. 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)
  11. ORA-06512: at "SYS.DBMS_QOPATCH", line 919
  12. ORA-06512: at "SYS.DBMS_QOPATCH", line 2286
  13. ORA-06512: at "SYS.DBMS_QOPATCH", line 817
  14. ORA-06512: at "SYS.DBMS_QOPATCH", line 2309

  15. ===========================================================
  16. Dumping current patch information
  17. ===========================================================
  18. Unable to obtain current patch information due to error: 20001
  19. ===========================================================

根据具体提示,好像跟xml格式的inventory信息有关,与上次看到的LANG=c导致的问题现象不一样,后来看官方文档(Doc ID 1948198.1)说是外部表 OPATCH_XML_INV 被损坏或不存在,需要做如下处理:

  1. SQL*Plus: Release 19.0.0.0.0 - Production on Fri Nov 5 06:31:16 2021
  2. Version 19.12.0.0.0

  3. Copyright (c) 1982, 2021, Oracle. All rights reserved.


  4. Connected to:
  5. Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
  6. Version 19.12.0.0.0

  7. sys@orcl:PRIMARY:38> select * from OPATCH_XML_INV;
  8. ERROR:
  9. ORA-29913: error in executing ODCIEXTTABLEFETCH callout
  10. ORA-29400: data cartridge error
  11. 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)



  12. no rows selected

  13. sys@orcl:PRIMARY:38> desc SYS.OPATCH_XML_INV ;
  14.  Name Null? Type
  15.  ----------------------------------------------------------------------------------- -------- --------------------------------------------------------
  16.  XML_INVENTORY CLOB

  17. sys@orcl:PRIMARY:38> drop table SYS.OPATCH_XML_INV;

  18. Table dropped.

  19. sys@orcl:PRIMARY:38> CREATE TABLE opatch_xml_inv
  20.   2 (
  21.   3 xml_inventory CLOB
  22.   4 )
  23.   5 ORGANIZATION EXTERNAL
  24.   6 (
  25.   7 TYPE oracle_loader
  26.   8 DEFAULT DIRECTORY opatch_script_dir
  27.   9 ACCESS PARAMETERS
  28.  10 (
  29.  11 RECORDS DELIMITED BY NEWLINE
  30.  12 READSIZE 67108864
  31.  13 preprocessor opatch_script_dir:'qopiprep.bat'
  32.  14 BADFILE opatch_script_dir:'qopatch_bad.bad'
  33.  15 LOGFILE opatch_log_dir:'qopatch_log.log'
  34.  16 FIELDS TERMINATED BY 'UIJSVTBOEIZBEFFQBL'
  35.  17 MISSING FIELD VALUES ARE NULL
  36.  18 REJECT ROWS WITH ALL NULL FIELDS
  37.  19 (
  38.  20 xml_inventory CHAR(100000000)
  39.  21 )
  40.  22 )
  41.  23 LOCATION(opatch_script_dir:'qopiprep.bat')
  42.  24 )
  43.  25 PARALLEL 1
  44.  26 REJECT LIMIT UNLIMITED;

  45. Table created.

  46. sys@orcl:PRIMARY:38> alter package sys.DBMS_QOPATCH compile body ;

  47. Package body altered.

  48. sys@orcl:PRIMARY:38> select owner, object_name,object_type,status FROM dba_objects where object_name in ('DBMS_QOPATCH' ,'OPATCH_XML_INV');

  49. OWNER
  50. --------------------
  51. OBJECT_NAME
  52. ------------------------------------------------------------------------------------------------------------------------------------------------------
  53. OBJECT_TYPE STATUS
  54. ---------------------------------------------- --------------
  55. SYS
  56. DBMS_QOPATCH
  57. PACKAGE VALID

  58. SYS
  59. DBMS_QOPATCH
  60. PACKAGE BODY VALID

  61. SYS
  62. OPATCH_XML_INV
  63. TABLE VALID


  64. sys@orcl:PRIMARY:38> col object_name for a32
  65. sys@orcl:PRIMARY:38> select comp_id, status, version from dba_registry;

  66. COMP_ID STATUS
  67. ------------------------------------------------------------ ----------------------------------------------------------------------------------------
  68. VERSION
  69. ------------------------------------------------------------
  70. CATALOG VALID
  71. 19.0.0.0.0

  72. CATPROC VALID
  73. 19.0.0.0.0

  74. RAC OPTION OFF
  75. 19.0.0.0.0

  76. JAVAVM VALID
  77. 19.0.0.0.0

  78. XML VALID
  79. 19.0.0.0.0

  80. CATJAVA VALID
  81. 19.0.0.0.0

  82. APS VALID
  83. 19.0.0.0.0

  84. XDB VALID
  85. 19.0.0.0.0

  86. OWM VALID
  87. 19.0.0.0.0

  88. CONTEXT VALID
  89. 19.0.0.0.0

  90. ORDIM VALID
  91. 19.0.0.0.0

  92. SDO VALID
  93. 19.0.0.0.0

  94. XOQ VALID
  95. 19.0.0.0.0

  96. OLS VALID
  97. 19.0.0.0.0

  98. DV VALID
  99. 19.0.0.0.0


  100. 15 rows selected.

  101. sys@orcl:PRIMARY:38> exit
  102. Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
  103. Version 19.12.0.0.0
  104. [oracle@bjdb boot]$ env|grep HOME
  105. ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
  106. HOME=/home/oracle
  107. [oracle@bjdb boot]$ find /u01 -name datapatch*
  108. /u01/app/oracle/product/19.0.0/dbhome_1/OPatch_bak/datapatch
  109. /u01/app/oracle/product/19.0.0/dbhome_1/OPatch/datapatch
  110. /u01/app/oracle/product/19.0.0/dbhome_1/OPatch/datapatch.bat
  111. [oracle@bjdb boot]$ cd /u01/app/oracle/product/19.0.0/dbhome_1/OPatch/
  112. [oracle@bjdb OPatch]$ ./datapatch
  113. SQL Patching tool version 19.12.0.0.0 Production on Fri Nov 5 06:33:17 2021
  114. Copyright (c) 2012, 2021, Oracle. All rights reserved.

  115. Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_3548_2021_11_05_06_33_17/sqlpatch_invocation.log

  116. Connecting to database...OK
  117. Gathering database info...done
  118. Bootstrapping registry and package to current versions...done
  119. Determining current state...done

  120. Current state of interim SQL patches:
  121. Interim patch 32876380 (OJVM RELEASE UPDATE: 19.12.0.0.210720 (32876380)):
  122.   Binary registry: Installed
  123.   SQL registry: Not installed

  124. Current state of release update SQL patches:
  125.   Binary registry:
  126.     19.12.0.0.0 Release_Update 210716141810: Installed
  127.   SQL registry:
  128.     Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 13-SEP-21 07.05.02.955102 AM

  129. Adding patches to installation queue and performing prereq checks...done
  130. Installation queue:
  131.   No interim patches need to be rolled back
  132.   Patch 32904851 (Database Release Update : 19.12.0.0.210720 (32904851)):
  133.     Apply from 19.3.0.0.0 Release_Update 190410122720 to 19.12.0.0.0 Release_Update 210716141810
  134.   The following interim patches will be applied:
  135.     32876380 (OJVM RELEASE UPDATE: 19.12.0.0.210720 (32876380))

  136. Installing patches...
  137. Patch installation complete. Total patches installed: 2

  138. Validating logfiles...done
  139. Patch 32904851 apply: SUCCESS
  140.   logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/32904851/24343243/32904851_apply_ORCL_2021Nov05_06_34_24.log (no errors)
  141. Patch 32876380 apply: SUCCESS
  142.   logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/32876380/24269510/32876380_apply_ORCL_2021Nov05_06_33_45.log (no errors)
  143. SQL Patching tool complete on Fri Nov 5 06:40:49 2021
再次重启实例,不再提示ORA-20001错误。
KUP-04020 这个报错说明是外部表相关的问题,类似的有ORA-  TNS- CRS- ,现在多见INS- ASM-opatch- 等开头的报错。
阅读(1866) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~