Oracle 19c asm单机OPatch补丁报错"checkSystemCommandAvailable" failed.

  一、OPatch Conflict Check

As the Grid home user:

复制代码
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/36916690/36912597

% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/36916690/36917416

% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/36916690/36917397

% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/36916690/36940756

% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/36916690/36758186

For Oracle home, as home user:

复制代码
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/36916690/36912597
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/36916690/36917416

二、OPatch System Space Check
    • For Grid Infrastructure home, as home user:

      1. Create file /tmp/patch_list_gihome.txt with the following content:

        复制代码
        % cat /tmp/patch_list_gihome.txt
        
        <UNZIPPED_PATCH_LOCATION>/36916690/36912597
        <UNZIPPED_PATCH_LOCATION>/36916690/36917416
        <UNZIPPED_PATCH_LOCATION>/36916690/36917397
        <UNZIPPED_PATCH_LOCATION>/36916690/36940756
        <UNZIPPED_PATCH_LOCATION>/36916690/36758186

        <class="infoboxnote">

        Note:

        For HP-UX Itanium and Linux on IBM System z platforms, the last two rows in the previous example should not be added to the patch_list_gihome.txt file.

      2. Run the OPatch command to check if enough free space is available in the Grid Infrastructure home:

        复制代码
        % $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
    • For Oracle home, as home user:

      1. Create file /tmp/patch_list_dbhome.txt with the following content:

        复制代码
        % cat /tmp/patch_list_dbhome.txt
        <UNZIPPED_PATCH_LOCATION>/36916690/36912597
        <UNZIPPED_PATCH_LOCATION>/36916690/36917416
      2. Run OPatch command to check if enough free space is available in the Oracle home:

        复制代码
        % $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt

  三、As root user, execute the following command on each node of the cluster:

root@JX-DB-SVR02 backup# /oracle/grid/19c/grid_home1/OPatch/opatchauto apply /backup/36916690

OPatchauto session is initiated at Wed Sep 17 09:09:19 2025

System initialization log file is /oracle/grid/19c/grid_home1/cfgtoollogs/opatchautodb/systemconfig2025-09-17_09-09-22AM.log.

Session log file is /oracle/grid/19c/grid_home1/cfgtoollogs/opatchauto/opatchauto2025-09-17_09-09-26AM.log

The id for this session is 646T

Executing OPatch prereq operations to verify patch applicability on home /oracle/19c

Patch applicability verification failed on home /oracle/19c

Execution of OPatchAutoBinaryAction patch action failed, check log for more details. Failures:

Patch Target : JX-DB-SVR02->/oracle/19c Typesidb

Details: [

---------------------------Patching Failed---------------------------------

Command execution failed during patching in home: /oracle/19c, host: JX-DB-SVR02.

Command failed: /oracle/19c/OPatch/opatchauto apply /backup/36916690 -oh /oracle/19c -target_type oracle_database -binary -invPtrLoc /oracle/grid/19c/grid_home1/oraInst.loc -jre /oracle/grid/19c/grid_home1/OPatch/jre -persistresult /oracle/19c/opatchautocfg/db/sessioninfo/sessionresult_analyze_JX-DB-SVR02_sidb_2.ser -analyze -online -prepare_home

Command failure output:

==Following patches FAILED in analysis for apply:

Patch: /backup/36916690/36912597

Log: /oracle/19c/cfgtoollogs/opatchauto/core/opatch/opatch2025-09-17_09-09-39AM_1.log

Reason: Failed during Analysis: CheckSystemCommandsAvailable Failed, [ Prerequisite Status: FAILED, Prerequisite output:

The details are:

Missing command :fuser]

After fixing the cause of failure start a new opatchauto session

]

OPATCHAUTO-68061: The orchestration engine failed.

OPATCHAUTO-68061: The orchestration engine failed with return code 1

OPATCHAUTO-68061: Check the log for more details.

OPatchAuto failed.

OPatchauto session completed at Wed Sep 17 09:10:06 2025

Time taken to complete the session 0 minute, 44 seconds

opatchauto failed with error code 42

#查看日志/oracle/19c/cfgtoollogs/opatchauto/core/opatch/opatch2025-09-17_09-09-39AM_1.log

Sep 17, 2025 9:09:56 AM INFO Prereq "checkSystemSpace" passed.

Sep 17, 2025 9:09:56 AM INFO Prereq "checkSystemCommandAvailable" for patch 36917416 passed.

Sep 17, 2025 9:09:58 AM INFO Missing command :fuser

Sep 17, 2025 9:09:58 AM INFO Prereq "checkSystemCommandAvailable" for patch 36912597 failed.

Sep 17, 2025 9:09:58 AM INFO The details are:

Missing command :fuser

#缺失psmisc组件

yum install -y psmisc

root@JX-DB-SVR02 backup# /oracle/grid/19c/grid_home1/OPatch/opatchauto apply /backup/36916690

OPatchauto session is initiated at Wed Sep 17 09:14:53 2025

System initialization log file is /oracle/grid/19c/grid_home1/cfgtoollogs/opatchautodb/systemconfig2025-09-17_09-14-57AM.log.

Session log file is /oracle/grid/19c/grid_home1/cfgtoollogs/opatchauto/opatchauto2025-09-17_09-15-00AM.log

The id for this session is KI2C

Executing OPatch prereq operations to verify patch applicability on home /oracle/19c

Patch applicability verified successfully on home /oracle/19c

Executing patch validation checks on home /oracle/19c

Patch validation checks successfully completed on home /oracle/19c

Verifying SQL patch applicability on home /oracle/19c

SQL patch applicability verified successfully on home /oracle/19c

Executing OPatch prereq operations to verify patch applicability on home /oracle/grid/19c/grid_home1

Patch applicability verified successfully on home /oracle/grid/19c/grid_home1

Executing patch validation checks on home /oracle/grid/19c/grid_home1

Patch validation checks successfully completed on home /oracle/grid/19c/grid_home1

Preparing to bring down database service on home /oracle/19c

Successfully prepared home /oracle/19c to bring down database service

Bringing down database service on home /oracle/19c

Following database has been stopped and will be restarted later during the session: jximes

Database service successfully brought down on home /oracle/19c

Performing prepatch operations on CRS - bringing down CRS service on home /oracle/grid/19c/grid_home1

Prepatch operation log file location: /oracle/grid/base/crsdata/JX-DB-SVR02/crsconfig/hapatch_2025-09-17_09-17-41AM.log

CRS service brought down successfully on home /oracle/grid/19c/grid_home1

Start applying binary patch on home /oracle/19c

Binary patch applied successfully on home /oracle/19c

Running rootadd_rdbms.sh on home /oracle/19c

Successfully executed rootadd_rdbms.sh on home /oracle/19c

Start applying binary patch on home /oracle/grid/19c/grid_home1

Binary patch applied successfully on home /oracle/grid/19c/grid_home1

Running rootadd_rdbms.sh on home /oracle/grid/19c/grid_home1

Successfully executed rootadd_rdbms.sh on home /oracle/grid/19c/grid_home1

Performing postpatch operations on CRS - starting CRS service on home /oracle/grid/19c/grid_home1

Postpatch operation log file location: /oracle/grid/base/crsdata/JX-DB-SVR02/crsconfig/hapatch_2025-09-17_09-27-15AM.log

CRS service started successfully on home /oracle/grid/19c/grid_home1

Starting database service on home /oracle/19c

Database service successfully started on home /oracle/19c

Preparing home /oracle/19c after database service restarted

No step execution required.........

Trying to apply SQL patch on home /oracle/19c

SQL patch applied successfully on home /oracle/19c

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:JX-DB-SVR02

SIDB Home:/oracle/19c

Version:19.0.0.0.0

Summary:

==Following patches were SKIPPED:

Patch: /backup/36916690/36917397

Reason: This patch is not applicable to this specified target type - "oracle_database"

Patch: /backup/36916690/36758186

Reason: This patch is not applicable to this specified target type - "oracle_database"

Patch: /backup/36916690/36940756

Reason: This patch is not applicable to this specified target type - "oracle_database"

==Following patches were SUCCESSFULLY applied:

Patch: /backup/36916690/36912597

Log: /oracle/19c/cfgtoollogs/opatchauto/core/opatch/opatch2025-09-17_09-18-07AM_1.log

Patch: /backup/36916690/36917416

Log: /oracle/19c/cfgtoollogs/opatchauto/core/opatch/opatch2025-09-17_09-18-07AM_1.log

Host:JX-DB-SVR02

SIHA Home:/oracle/grid/19c/grid_home1

Version:19.0.0.0.0

Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /backup/36916690/36758186

Log: /oracle/grid/19c/grid_home1/cfgtoollogs/opatchauto/core/opatch/opatch2025-09-17_09-22-56AM_1.log

Patch: /backup/36916690/36912597

Log: /oracle/grid/19c/grid_home1/cfgtoollogs/opatchauto/core/opatch/opatch2025-09-17_09-22-56AM_1.log

Patch: /backup/36916690/36917397

Log: /oracle/grid/19c/grid_home1/cfgtoollogs/opatchauto/core/opatch/opatch2025-09-17_09-22-56AM_1.log

Patch: /backup/36916690/36917416

Log: /oracle/grid/19c/grid_home1/cfgtoollogs/opatchauto/core/opatch/opatch2025-09-17_09-22-56AM_1.log

Patch: /backup/36916690/36940756

Log: /oracle/grid/19c/grid_home1/cfgtoollogs/opatchauto/core/opatch/opatch2025-09-17_09-22-56AM_1.log

OPatchauto session completed at Wed Sep 17 09:37:38 2025

Time taken to complete the session 22 minutes, 42 seconds

root@JX-DB-SVR02 backup#

  四、pluggable容器数据库更新

  1. Any (pluggable) database that has invalid objects after the execution of datapatch should have catcon.pl run to revalidate those objects.

    复制代码
    For example:
    export PATH=$PATH:$ORACLE_HOME/bin
    cd $ORACLE_HOME/rdbms/admin
    $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -e -b utlrp -d $ORACLE_HOME/rdbms/admin utlrp.sql

Upgrade Oracle Recovery Manager Catalog

If you are using the Oracle Recovery Manager, the catalog needs to be upgraded. Enter the following command to upgrade it. The UPGRADE CATALOG command must be entered twice to confirm the upgrade.

复制代码
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
RMAN> UPGRADE CATALOG;
RMAN> EXIT;

oracle@JX-DB-SVR02 19c export PATH=PATH:$ORACLE_HOME/bin

oracle@JX-DB-SVR02 19c cd ORACLE_HOME/rdbms/admin

oracle@JX-DB-SVR02 admin ORACLE_HOME/perl/bin/perl ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -e -b utlrp -d ORACLE_HOME/rdbms/admin utlrp.sql

catcon::set_log_file_base_path: ALL catcon-related output will be written to /oracle/19c/rdbms/admin/utlrp_catcon_1061.lst

catcon::set_log_file_base_path: catcon: See /oracle/19c/rdbms/admin/utlrp\*.log files for output generated by scripts

catcon::set_log_file_base_path: catcon: See /oracle/19c/rdbms/admin/utlrp_\*.lst files for spool files, if any

catcon.pl: completed successfully

oracle@JX-DB-SVR02 admin$

#AI 介绍psmisc
在 CentOS 7 中,psmisc 是一个包含多个实用系统工具的软件包,主要用于进程管理和系统资源查看,提供了一些方便的命令来管理和监控系统中的进程。
psmisc 包包含的核心工具及其功能如下:

  1. fuser
    用于查找正在使用指定文件、目录或端口的进程 PID(进程 ID)。
    例如:fuser /var/log/messages 可查看正在访问 /var/log/messages 文件的进程;fuser -n tcp 80 可查看占用 80 端口的进程。
  2. killall
    按进程名称终止进程(与 kill 按 PID 终止不同),支持批量结束同名进程。
    例如:killall httpd 可终止所有名为 httpd 的进程。
  3. pstree
    以树形结构显示进程间的父子关系,直观展示系统中进程的层级结构。
    例如:pstree -p 可显示进程树并附带每个进程的 PID。
  4. peekfd(较少使用):
    查看进程打开的文件描述符内容,用于调试进程与文件的交互