9.5.5 ahf software

Use the ahf software command to retrieve the details of AHF software, Monthly Recommended Patches (MRP), get downgrade target, validate downgrade installer, get update history, and get downgrade history.

Use the ahf software command:
  • to query the version of AHF installed
  • to find the Monthly Recommended Patches (MRP) level the Oracle home is at
  • to fetch the list of installed and missing patches for a specific MRP level. This will help you determine whether an Oracle home has all an MRP's patches installed or not.
  • get downgrade target
  • validate downgrade installer
  • get update history
  • get downgrade history
Use the --to-json option with the following commands to get output in the JSON format.
  • ahf software get-version
  • ahf software compare-mrp-level
  • ahf software get-latest-mrp-level

Use the following commands to get downgrade target, validate downgrade installer, get update history, and get downgrade history.

  • ahf software get-downgrade-target [options]
    Options:
    • --to-json: get the output in JSON format
    • --version: get the downgrade target version
    • --location: get the downgrade target installer location
  • ahf software validate-downgrade-installer [options]
    Options:
    • --to-json: get the output in JSON format
    • --installer INSTALLER: specify the installer file
  • ahf software get-update-history [options]
    Options:
    • --to-json: get the output in JSON format
    • --update-id UPDATE_ID: the update ID option is applicable only for framework updates
    • --all: get information of all the updates
  • ahf software get-upgrade-history [options]

    Options:

    • --to-json: get the output in JSON format
  • ahf software downgrade

    Run this command to request an AHF downgrade. This will revert AHF to the previous version in the background if the installer has been saved with AHF. For more information, see Downgrading Oracle Autonomous Health Framework.

Syntax: ahf software

  • To get AHF installed version:
    ahf software get-version --component all
    For example:
    ahf software get-version --component all
    AHF version: 24.2.0
    Build Timestamp: 20240224222447
    TFA version: 24.2.0
    Compliance version: 24.2.0
    Compliance metadata version: 20240224
  • To get the MRP level for a given Oracle home:
    ahf software get-mrp-level --oracle_home ORACLE_HOME
    For example:
    • Database: compliant and no missing patches

      ahf software get-mrp-level --oracle-home /u01/oracle
      Database MRP 19.17.0.0.221115
    • Grid Infrastructure: compliant and no missing patches

      ahf software get-mrp-level --oracle-home /u01/oracle/grid
      GI MRP 19.17.0.0.230221
    • Oracle Home: No MRP installed

      ahf software get-mrp-level --oracle-home /u01/oracle
      No MRP installed in the Oracle Home
  • To compare an Oracle home against a specific MRP level to retrieve installed and missing patches:
    ahf software compare-mrp-level --oracle-home TEXT --mrp-level TEXT
    For example:
    • Database: comparing to a specific level

      ahf software compare-mrp-level --oracle-home /u01/oracle --mrp-level "Database MRP 19.17.0.0.221220"
      Installed:
          <bug-id-1>
          <bug-id-2>
            ...
          <bug-id-5>
       Missing:
          <bug-id-8>
          <bug-id-9>
            ...
          <bug-id-10>
    • Grid Infrastructure: comparing to a specific level

      ahf software compare-mrp-level --oracle-home /u01/oracle/grid --mrp-level "GI MRP 19.17.0.0.230321"
      Installed:
          <bug-id-1>
          <bug-id-2>
            ...
          <bug-id-5>
       Missing:
          <bug-id-8>
          <bug-id-9>
            ...
          <bug-id-10>
  • To query the latest MRP level:
    ahf software get-latest-mrp-level 
    19.22
        Database: Database MRP 19.22.0.0.240220
        GI      : None
    19.21
        Database: Database MRP 19.21.0.0.240220
        GI      : GI MRP 19.21.0.0.240116
    19.20
        Database: Database MRP 19.20.0.0.240116
        GI      : GI MRP 19.20.0.0.240116
    19.19
        Database: Database MRP 19.19.0.0.231017
        GI      : GI MRP 19.19.0.0.231017
    19.18
        Database: Database MRP 19.18.0.0.230718
        GI      : GI MRP 19.18.0.0.230718
    19.17
        Database: Database MRP 19.17.0.0.230418
        GI      : GI MRP 19.17.0.0.230418
    ahf software get-latest-mrp-level --ru 19.21
    19.21
        Database: Database MRP 19.21.0.0.240220
        GI      : GI MRP 19.21.0.0.240116
    ahf software get-latest-mrp-level --ru 19.22
    19.22
        Database: Database MRP 19.22.0.0.240220
        GI      : None
  • To apply update using a specific file:
    ahf software apply-update --update-file <zip-file-name>

    For example:

    ahf software apply-update --update-file /tmp/ahf_data_20240127.zip
    Successfully updated Data files from version 20240111 to 20240127
  • To get upgrade history:
    ahf software get-upgrade-history
    +----------------+----------------+----------------+-----------------------------+----------------+
    |   install_type |   from_version |    to_version  |         install_date        |  upgrade_status|
    +----------------+----------------+----------------+-----------------------------+----------------+
    |        UPGRADE |         24.4.0 |         24.5.0 | 2024-04-19 22:35:22.165 UTC |     SUCCESSFUL |
    |        INSTALL |                |         24.4.0 | 2024-04-16 20:36:02.049 UTC |     SUCCESSFUL |
    +----------------+----------------+----------------+-----------------------------+----------------+
  • To get the downgrade target:
    ahf software get-downgrade-target
    Installation file is unavailable
    Valid version target for downgrade is: 24.4.0