@@@@Platform-“OnPrem”

@@@@Product-“Database”

@@@@ReleaseVersion-“26.11”

@@@@info-map-label-“Running AHFCTL Update Commands to Apply AHF Metadata and Framework Updates”

Running AHFCTL Update Commands to Apply AHF Metadata and Framework Updates

You need AHF install user privileges to run these commands.

Note:

To configure AHF auto-update refer to:

ahfctl applyupdate

Use the ahfctl applyupdate command to update metadata and framework files on the local node from the zip file provided.

Note:

Syntax

ahfctl applyupdate [-h] [-debug] [-updatefile UPDATEFILE]

Parameters

ahfctl applyupdate Command Parameters

Parameter Description
-debug Specify the -debug option to enable debugging.
-updatefile UPDATEFILE

Specify the name of the zip file. The existing metadata and framework files will be replaced with the files in the zip file.

Download the zip file from My Oracle Support note 2550798.1.

Example ahfctl applyupdate

# ahfctl applyupdate -updatefile /tmp/ahf_data_20220203.zip
Updated file /opt/oracle.ahf/exachk/.cgrep/collections.dat
Updated file /opt/oracle.ahf/exachk/rules.dat
Updated file /opt/oracle.ahf/exachk/.cgrep/versions.dat
Updated file /opt/oracle.ahf/exachk/messages/check_messages.json
Data files updated to 20220203 from 20211220

For more information, see https://support.oracle.com/epmos/faces/DocContentDisplay?id=2550798.1.

ahfctl queryupdate

Use the ahfctl queryupdate command to check if an update was applied. To get a list of all the metadata and framework updates applied, use the -all option. To query a metadata or framework update with a specific update ID, use the -updateid option.

Note: To verify if the metadata and framework updates were applied to all nodes in a cluster, run the ahfctl queryupdate command as the AHF install user on each cluster node.

Syntax

ahfctl queryupdate [-h] [-debug] [-updateid UPDATEID] [-all] [-json]

Parameters

ahfctl queryupdate Command Parameters

Parameter Description
-debug Specify the -debug option to enable debugging.
-updateid UPDATEID

To query framework update with a specific update ID.

Specify -updateid UPDATEID option to query framework updates.

<blockquote>

Note:

To query metadata updates, please use the -all option.

</blockquote>
-all Lists all applied metadata and framework updates.
-json Specify this option to get the output in JSON format.

Example ahfctl queryupdate

# ahfctl queryupdate -all
AHF Metadata Update: 20220203
Status: Applied
Applied on: Fri Feb 4 00:47:00 2022
# ahfctl queryupdate -all
AHF Framework update: PATCH_22.2.4.1
Status: Applied
Fixes: 34716496
Applied on: Wed Nov 30 15:14:56 2022

34716496 is the update ID for AHF framework update applied.

ahfctl queryupdate -updateid 34716496
AHF Framework update: PATCH_22.2.4.1
Status: Applied
Fixes: 34716496
Applied on: Wed Nov 30 15:14:56 2022
1:53
AHF framework updated files:
/opt/oracle.ahf/ahf/lib/ahfcomponents.py
/opt/oracle.ahf/ahf/lib/ahfctl.py
/opt/oracle.ahf/exachk/messages/framework_messages.json
/opt/oracle.ahf/exachk/lib/ahf_metadata.py

ahfctl rollbackupdate

Use the ahfctl rollbackupdate command to rollback the updates with a specific update ID applied to the local node. If you do not specify the update ID, then AHF rolls back to the previous state by default.

Note: To rollback the metadata and framework updates applied to all nodes in a cluster, you must run the ahfctl rollbackupdate command as the AHF install user on each cluster node.

Syntax

ahfctl rollbackupdate [-h] [-debug] [-updateid UPDATEID]

Parameters

ahfctl rollbackupdate Command Parameters

Parameter Description
-debug Specify the -debug option to enable debugging.
-updateid UPDATEID Specify update ID, for example, Bug ID, Build ID, that you want to rollback.

Example ahfctl rollbackupdate

# ahfctl rollbackupdate -updateid 20220203
Data files with timestamp 20220203 identified. Rolling back the files to Production version 20211220
Rolled back the data files 20220203 to Production version 20211220

ahfctl deleteupdatebackup

Use the ahfctl deleteupdatebackup command to delete the backup directories used for AHF update.

Note:

For example: AHF Updates applied in order is: 20230901 -> 20231001 -> 20231101 (Current latest update). You can delete update backups for 20230901 and 20231001 but not the 20231101.

Syntax

ahfctl deleteupdatebackup [-h] [-debug] [-updateid UPDATEID] [-silent]

Parameters

ahfctl deleteupdatebackup Command Parameters

Parameter Description
-debug Specify the -debug option to enable debugging.
-updateid UPDATEID Deletes the backup directories with the specified timestamp.
-silent Skips user confirmation for delete backup directories.

ahfctl deletebackup

# ahfctl deleteupdatebackup -updateid 20220130
Deleted metadata backup directory for: /opt/oracle.ahf/data/work/.exachk_patch_directory/.20220130_metadata_bkp

Update Java Without Updating AHF

With this enhancement, you can update JRE without updating AHF.

  1. Check the Autonomous Health Framework, Oracle Trace File Analyzer, Oracle Orachk, and Java versions.

    For example:

    # ahfctl version -all
    AHF version: 24.7.0
    TFA version: 24.7.0
    ORACHK  VERSION: 24.7.0_20240714
    JAVA VERSION: 11.0.22
  2. Apply Java update.

    ahfctl applyupdate -updatefile

    Where updatefile specifies the Java update file generated.

    For example:

    # ahfctl applyupdate -updatefile ahf_36840033_java_JDK11_MAIN_LINUX.X64_240318.11.0.23.B7.zip
    This is a Java patch. Requires Java version comparison before proceeding.
    Java patch validation passed.
    Stopping TFA before applying JAVA Patch.
    
    Updated file /opt/oracle.ahf/jre
    Java patch applied successfully.
    Starting TFA post JAVA patch completion.
  3. Post update, check the Java version.

    For example:

    $ /opt/oracle.ahf/jre/bin/java --version
    java 11.0.23 2024-04-16 LTS
    Java(TM) SE Runtime Environment 18.9 (build 11.0.23+7-LTS-222)
  4. Post update, check the AHF, TFA, Oracle Orachk, and Java versions.

    For example:

    # ahfctl version -all
    AHF version: 24.7.0
    TFA version: 24.7.0
    ORACHK  VERSION: 24.7.0_20240714
    JAVA VERSION: 11.0.23

Update AHF Configuration Files

With AHF 26.1, the Autonomous Health Framework (AHF) update feature is enhanced to support managing AHF configuration files across multiple base versions.

# ahfctl applyupdate -updatefile ahfConfig_26.1.0.1_251116.zip
WARNING: DeprecatedCommand: `applyupdate` command is deprecated and will be removed in a future release, no sooner than 2028-11-01. Refer to `ahf software apply-update -h` for the new command to perform this operation.

Updated file /opt/oracle.ahf/tfa/resources/searchStrings.xml
Updated file /opt/oracle.ahf/tfa/resources/file_monitor_config.json

AHF metadata updating of file ahfConfig_26.1.0.1_251116.zip completed
Updated to 26.1.0.1 from 26.1.0
AHF framework update fixes 38457409

.--------------------------------------------------------------------------------------------------------.
| Host            | Status of TFA | PID   | Port | Version    | Build ID              | Inventory Status |
+-----------------+---------------+-------+------+------------+-----------------------+------------------+
| stbm000004-vm19 | RUNNING       | 21662 | 5000 | 26.1.0.0.0 | 251001020251119112103 | COMPLETE         |
'-----------------+---------------+-------+------+------------+-----------------------+------------------'
# ahfctl queryupdate -updateid 26.1.0.1.0_251116
WARNING: DeprecatedCommand: `queryupdate` command is deprecated and will be removed in a future release, no sooner than 2028-11-01. Refer to `ahf software get-update-history -h` for the new command to perform this operation.

{
    "isPatchCompatible": true,
    "patchApplied": true,
    "additionalDetails": {
        "installedTFA": "26.1.0",
        "ahfConfigversion": "26.1.0.1",
        "status": "Success",
        "timestamp": "Wed Nov 19 11:40:51 2025",
        "errorDetails": ""
    }
}
# ahfctl rollbackupdate -updateid 26.1.0.1.0_251116
WARNING: DeprecatedCommand: `rollbackupdate` command is deprecated and will be removed in a future release, no sooner than 2028-11-01. Refer to `ahf software rollback-update -h` for the new command to perform this operation.

Rolled-back file /opt/oracle.ahf/tfa/resources/searchStrings.xml
Rolled-back file /opt/oracle.ahf/tfa/resources/file_monitor_config.json

Rolled-back to 26.1.0 from 26.1.0.1
Rolled-back fixes for 38457409

.--------------------------------------------------------------------------------------------------------.
| Host            | Status of TFA | PID   | Port | Version    | Build ID              | Inventory Status |
+-----------------+---------------+-------+------+------------+-----------------------+------------------+
| stbm000004-vm19 | RUNNING       | 21662 | 5000 | 26.1.0.0.0 | 251000020251119094021 | COMPLETE         |
'-----------------+---------------+-------+------+------------+-----------------------+------------------'