Oracle19c-补丁升级报错合集(一)

前言:

        本文主要介绍Oracle19c补丁升级遇到的问题,涉及安装补丁prepatch步骤,apply应用报错以及datapatch -verbose数据字典更新报错

问题一:

        在执行补丁rootcrs.sh -prepatch操作时,发生执行检查命令cluutil -chkshare报错

CLSRSC-180: An error occurred while executing the command 'cluutil -chkshare -oh /u01/app/grid -localnode prd-node3 -nodelist prd-node1,prd-node2,prd-node3,prd-node4'
Died at /u01/app/19.0.0.0/grid/crs/install/crsutils.pm line 13132.
The command '/u01/app/19.0.0.0/grid/perl/bin/perl -I/u01/app/19.0.0.0/grid/perl/lib -I/u01/app/19.0.0.0/grid/crs/install -I/u01/app/19.0.0.0/grid/xag /u01/app/19.0.0.0/grid/crs/install/rootcrs.pl -prepatch' execution failed

        对于这个报错,要检查cluutil工具的运行日志$GRID_BASE/crsdata/$HOSTNAME/

crsconfig/cluutil.log,确定具体的报错原因

        当前案例遇到的是由于集群之间的ssh 22端口被禁用,导致远程连接主机失败报错,后面重新开放22端口解决

Oracle19c-补丁升级报错合集(一)_第1张图片

问题二:

            在执行补丁rootcrs.sh -prepatch操作时,,出现检查节点失败PRKC-1191 : Remote command execution setup check for node xxx2 using shell /usr/bin/ssh failed.

Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/xxx1/crsconfig/crs_prepatch_xxx1_2022-12-27_07-47-28PM.log
xxx2 : PRKC-1191 : Remote command execution setup check for node xxx2 using shell /usr/bin/ssh failed.
​
File "/usr/bin/ssh" does not exist on node "xxx2"
​
2022/12/27 19:49:36 CLSRSC-180: An error occurred while executing the command '/u01/app/19.0.0/grid/bin/cluutil -ckpt -global -oraclebase /u01/app/grid -writeckpt -name ROOTCRS_PATCHINFO -state SUCCESS -nodelist xxx1,xxx2 -transferfile'
2022/12/27 19:49:36 CLSRSC-175: Failed to write the checkpoint 'ROOTCRS_PATCHINFO' with status 'SUCCESS' (error code 0)
2022/12/27 19:49:36 CLSRSC-175: Failed to write the checkpoint 'ROOTCRS_PATCHINFO' with status 'SUCCESS' (error code 0)
Died at /u01/app/19.0.0/grid/crs/install/crsutils.pm line 13985.
The command '/u01/app/19.0.0/grid/perl/bin/perl -I/u01/app/19.0.0/grid/perl/lib -I/u01/app/19.0.0/grid/crs/install -I/u01/app/19.0.0/grid/xag /u01/app/19.0.0/grid/crs/install/rootcrs.pl -prepatch -nonrolling' execution failed

        报错的原因是由于操作系统/usr/bin下的执行程序没有ssh。默认路径下有ssh,可能由于ssh升级或者安全整改导致/usr/bin下缺少了ssh,最后重新将ssh软连接到/usr/bin修复问题

问题三:

        在应用OJVM补丁的时候,出现报错make: execvp: perl: Permission denied [javavm_refresh] Error 127

[Aug 1, 2023 6:06:13 PM] [INFO]     Stack Description: java.lang.RuntimeException: make: execvp: perl: Permission denied
 make: *** [javavm_refresh] Error 127​
at oracle.opatch.MakeAction.apply(MakeAction.java:538)
at oracle.opatch.OPatchSession.runMake(OPatchSession.java:757)
at oracle.opatch.OPatchSession.runMake(OPatchSession.java:699)
at oracle.opatch.MergedPatchObject.invokeConsolidatedMake(MergedPatchObject.java:1903)
at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:1550)
at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:373)
at oracle.opatch.opatchutil.NApply.process(NApply.java:353)
at oracle.opatch.opatchutil.OUSession.napply(OUSession.java:1139)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at oracle.opatch.UtilSession.process(UtilSession.java:355)
at oracle.opatch.OPatchSession.process(OPatchSession.java:2643)
at oracle.opatch.OPatch.process(OPatch.java:873)
at oracle.opatch.OPatch.main(OPatch.java:930)

        对于这个报错主要检查执行用户的环境变量PATH,PERL5LIB是否设置正确,如果配置错误会导致perl,lib的调用异常

        设置正确的PATH,PERL5LIB环境变量解决

export PATH=$ORACLE_HOME/perl/bin:$PATH
export PERL5LIB=$ORACLE_HOME/perl/lib

        此外,在安装OJVM补丁还有检查用户的LANG环境变量是否设置正确,特别是输出的变量格式是否正确,之前遇到过en_US.UTF-8格式写错的,导致安装OJVM补丁时,出现LANG=en_US相关的编译错误

问题四:

        执行datapatch -verbose时,出现报错 Error at line 19439: script rdbms/admin/cataudit.sql

-> Error at line 19439: script rdbms/admin/cataudit.sql
      - ORA-04063: view "SYS.DBA_AUDIT_TRAIL" has errors
  -> Error at line 19447: script rdbms/admin/cataudit.sql
      - ORA-04063: view "SYS.DBA_AUDIT_TRAIL" has errors
  -> Error at line 19455: script rdbms/admin/cataudit.sql
      - ORA-04063: view "SYS.DBA_AUDIT_TRAIL" has errors
  -> Error at line 19554: script rdbms/admin/cataudit.sql
      - ORA-04063: view "SYS.DBA_AUDIT_TRAIL" has errors
      - ORA-06512: at "SYS.CDBVIEW_INTERNAL", line 93
      - ORA-06512: at "SYS.CDBVIEW", line 6
      - ORA-06512: at line 1
  -> Error at line 19565: script rdbms/admin/cataudit.sql
      - ORA-04045: errors during recompilation/revalidation of SYS.CDB_AUDIT_TRAIL
      - ORA-04063: view "SYS.DBA_AUDIT_TRAIL" has errors
  -> Error at line 19574: script rdbms/admin/cataudit.sql
      - ORA-04045: errors during recompilation/revalidation of SYS.CDB_AUDIT_TRAIL
      - ORA-04063: view "SYS.DBA_AUDIT_TRAIL" has errors
  -> Error at line 19583: script rdbms/admin/cataudit.sql
      - ORA-04045: errors during recompilation/revalidation of SYS.CDB_AUDIT_TRAIL
      - ORA-04063: view "SYS.DBA_AUDIT_TRAIL" has errors

        报错是在执行数据字典编译,调用审计数据字典脚本cataudit时出现,通过数据库的DBA_ERRORS查看发现主要是审计表视图"SYS.DBA_AUDIT_TRAIL"出现编译错误,而编译错误的原因是ORA-00942表或视图不存在

Oracle19c-补丁升级报错合集(一)_第2张图片

        进一步检查发现视图SYS.DBA_AUDIT_TRAIL的基表AUD$被误删除了

Oracle19c-补丁升级报错合集(一)_第3张图片

        最终从其他环境的19c数据库获取了AUD$的元数据,重建表修复该问题

你可能感兴趣的:(Oracle,oracle,数据库,dba,运维)