Installing Oracle AHF and Running ORAchk on Linux and Windows
Is your Oracle database in need of some TLC? Then you need ORAchk (Oracle Check). The utility examines an Oracle system’s configuration looking for areas that need improvement and generates a risk report that you can then use to improve the health status of your database. ORAchk is provided as part of Oracle’s Autonomous Health Framework (AHF) toolkit.
I see a lot of customers looking to take advantage of the benefits that ORAchk brings so I thought I’d write a step-by-step guide on how to install Oracle AHF, and run ORAchk, on Linux and Windows environments.
- Pre-requisites
- Oracle AHF and ORAchk on Linux
- Oracle AHF and ORAchk on Windows
Pre-requisites
Before you begin the installation there are some pre-requisites to installing Oracle AHF and running ORAchk. I’ve outlined the key pre-requisites below:
Linux
- Oracle AHF should be installed as root to obtain the fullest capabilities. If you are unable to install as root then Oracle AHF should be installed as the Oracle Home User.
- Oracle AHF should be installed to a filesystem with at least 5GB of free diskspace.
- Perl version 5.10 or later is required to install Oracle AHF.
Windows
- Oracle AHF should be installed as a user with local administrative privileges.
- Oracle AHF should be installed to a disk with at least 5GB of free diskspace.
- Perl version 5.10 or later is required to install Oracle AHF (note that a later version of Perl is usually to be found installed in the %ORACLE_HOME%\perl directory)
Installing Oracle AHF on Linux
So you’ve checked the pre-requisites and you’re good to begin the installation. The latest version of Oracle AHF can be downloaded as a .zip file from Oracle Support via the following link:
Oracle Autonomous Health Framework (AHF) – Including TFA and ORAchk/EXAchk (Doc ID 2550798.1)
You will need to ensure that the GA Release of TFA & ORAchk/EXAchk for Linux is downloaded.
Once downloaded, transfer the .zip file (using e.g., FileZilla, WinSCP or pscp) to the database host as the root user and unzip the file. Ensure that there is at least 5GB of free diskspace on the filesystem where the Oracle AHF will be installed.
In the following example the AHF-LINUX_v20.1.1.zip file has been transferred to the /opt/oracle/media/ahf directory:
[root@dbhost]# pwd
/opt/oracle/media/ahf
Check available diskspace
[root@dbhost]# df -hP .
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 100G 42G 58G 42% /
[root@dbhost]# ls -lh
total 349M
-rw-r--r--. 1 root root 349M Mar 19 13:06 AHF-LINUX_v20.1.1.zip
Unzip the AHF-LINUX zip file
[root@dbhost]# unzip AHF-LINUX_v20.1.1.zip
Archive: AHF-LINUX_v20.1.1.zip
inflating: README.txt
inflating: ahf_setup
[root@dbhost]# ls -lh
total 703M
-rw-r--r--. 1 root root 349M Mar 19 13:06 AHF-LINUX_v20.1.1.zip
-rwxr-xr-x. 1 root root 355M Mar 17 20:29 ahf_setup
-rw-r--r--. 1 root root 832 Mar 17 20:33 README.txt
[root@dbhost]# yum list installed | grep -i perl.x86_64
perl.x86_64 4:5.16.3-294.el7_6
If perl is not installed or is an earlier version, use ‘yum install perl.x86_64’ to install.
To install Oracle AHF we run the ahf_setup installer with the -extract parameter. We also specify the -notfasetup parameter to avoid enabling the Oracle Trace File Analyser component of Oracle AHF.
By default Oracle AHF will be installed to the /opt/oracle.ahf directory.
[root@dbhost]# pwd
/opt/oracle/media/ahf
[root@dbhost]# ./ahf_setup -extract -notfasetup
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_2020_03_25-18_45_10.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 20.1.1.0.0 Build Date: 202003170925
Default AHF Location : /opt/oracle.ahf
Do you want to install AHF at [/opt/oracle.ahf] ? [Y]|N : Y
AHF Location : /opt/oracle.ahf
AHF Data Directory : /opt/oracle.ahf/data
Extracting AHF to /opt/oracle.ahf
AHF is deployed at /opt/oracle.ahf
ORAchk is available at /opt/oracle.ahf/bin/orachk
AHF binaries are available in /opt/oracle.ahf/bin
AHF is successfully installed
Running ORAchk on Linux on non-RAC Databases
Now that Oracle AHF has been installed we can run ORAchk from the ‘bin’ directory below the Oracle AHF installation directory:
[root@dbhost]# cd /opt/oracle.ahf/bin
[root@dbhost]# ./orachk
Note the following message will be seen if Oracle ASM storage is utilised
Clusterware is running from /u01/app/18.0.0/grid. Is this the correct Clusterware Home?[y/n] y
List of running databases
If multiple databases are running on the host, an 'All of above' option will be given and should be selected
1. ORADB1
2. None of above
Select databases from list for checking best practices. For multiple databases, select 1 for All or comma separated number like 1,2 etc. 1
Searching out ORACLE_HOME for selected databases...
Checking Status of Oracle Software Stack - Clusterware, ASM, RDBMS...
------------------------------------------------------------------------------------------------------------------
Oracle Stack Status
------------------------------------------------------------------------------------------------------------------
Host Name CRS Installed ASM HOME RDBMS Installed CRS UP ASM UP RDBMS UP DB Instance Name
------------------------------------------------------------------------------------------------------------------
dbhost Yes Yes Yes Yes Yes Yes ORADB1
-----------------------------------------------------------------------------------------------------------------
Copying plug-ins...
Either Cluster Verification Utility pack (cvupack) does not exist at /opt/oracle.ahf/common/cvu or it is an old or invalid cvupack
Checking Cluster Verification Utility (CVU) version at CRS Home - /u01/app/18.0.0/gri
This version of Cluster Verification Utility (CVU) was released on 26-Jun-2018 and it is older than 180 days. It is highly recommended that you download the latest version of CVU from MOS patch 30166242 to ensure the highest level of accuracy of the data contained within the report
Do you want to download latest version of Cluster Verification Utility (CVU) from my oracle support? [y/n] [y] n
Running older version of Cluster Verification Utility (CVU) from CRS Home - /u01/app/18.0.0/grid
Collections and audit checks log file is
/opt/oracle.ahf/data/dbhost/orachk/orachk_dbhost_oradb1_032520_190714/log/orachk.log
============================================================
Node name - dbhost
============================================================
Collecting - Database Parameters for db11g database
Collecting - Database Undocumented Parameters for db11g database
Collecting - List of active logon and logoff triggers for db11g database
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<··· Collecting - ORAchk Daemon/Scheduler configuration Collecting - Root user limits Collecting - Verify no database server kernel out of memory errors Data collections completed. Checking best practices on dbhost. ------------------------------------------------------------ WARNING => There are some application objects with STALE statistics for oradb1
INFO => Most recent ADR incidents for /u01/app/oracle/product/11.2.0.4/db_1
INFO => Oracle GoldenGate failure prevention best practices
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<··· INFO => Consider setting optimizer related parameters to their default values for oradb1
WARNING => Flashback on PRIMARY is not configured for db11g
INFO => Database failure prevention best practices
Best Practice checking completed. Check recommended patches on dbhost...
-----------------------------------------------------------------------------------------------------
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/11.2.0.4/db_1
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
1 Recommended RDBMS patches for 112040 from /u01/app/oracle/product/11.2.0.4/db_1 on dbhost
-----------------------------------------------------------------------------------------------------
Patch# RDBMS ASM type Patch-Description
-----------------------------------------------------------------------------------------------------
30670774 no merge DATABASE PATCH SET UPDATE 11.2.0.4.200414
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
RDBMS homes patches summary report
-----------------------------------------------------------------------------------------------------
Total patches Applied on RDBMS Applied on ASM ORACLE_HOME
-----------------------------------------------------------------------------------------------------
1 1 0 /u01/app/oracle/product/11.2.0.4/db_1
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Detailed report (html) - /opt/oracle.ahf/data/dbhost/orachk/orachk_dbhost_oradb1_062220_091748/↵
orachk_dbhost_oradb1_032520_190714.html
UPLOAD [if required] - /opt/oracle.ahf/data/dbhost/orachk/orachk_dbhost_oradb1_032520_190714.zip
Running ORAchk on Linux on RAC Databases
There are 3 methods of running ORAchk in a clustered database environment:
Option 1: If password-less SSH user equivalency for root has been setup (allowing the root user to SSH to the remote nodes without having to enter a password) then ORAchk can automatically execute the checks on the remote nodes.
Option 2: If password-less SSH user equivalency for root has not been setup then the root password for the remote nodes can be specified at the time of running ORAchk. Temporary password-less SSH user equivalency will be configured for the duration of ORAchk’s execution.
Option 3: The ORAchk command-line option – localonly can be used to run ORAchk on the local node only. If this option is chosen then Oracle AHF should be installed on all cluster nodes and ORAchk should be run individually on each node
Check to see if password-less SSH user equivalency for root has already been set up:
Example where password-less SSH user equivalency has not been setup
[root@dbhostrac1]# ssh dbhostrac2
root@dbhost2’s password: *********** /* Note – if we are prompted to enter a password here then equivalency
does not exist. In this case we will need to manually enter root’s
password when running ORAchk */
Example where password-less SSH user equivalency has been setup
[root@dbhostrac1]# ssh dbhostrac2
Last login: Wed Mar 25 16:35:50 2020 /* Note – if we are not prompted to enter a password here then
equivalency exists and ORAchk can automatically use ssh to execute
checks on the remote nodes */
[root@dbhostrac1]# cd /opt/oracle.ahf/bin [root@ dbhostrac1]# ./orachk Clusterware is running from /u01/app/18.0.0/grid. Is this the correct Clusterware Home?[y/n] y Checking ssh user equivalency settings on all nodes in cluster for root Node dbhostrac2 is configured for ssh user equivalency for root user Searching for running database... List of running databases registered in OCR 1. DBRAC 2. None of above Select databases from list for checking best practices. For multiple databases, select 1 for All or comma separated number like 1,2 etc. 1 Checking Status of Oracle Software Stack - Clusterware, ASM, RDBMS... ------------------------------------------------------------------------------------------------------------------ Oracle Stack Status ------------------------------------------------------------------------------------------------------------------ Host Name CRS Installed ASM HOME RDBMS Installed CRS UP ASM UP RDBMS UP DB Instance Name ------------------------------------------------------------------------------------------------------------------ dbhostrac1 Yes Yes Yes Yes Yes Yes DBRAC1 dbhostrac2 Yes Yes Yes Yes Yes Yes DBRAC2 ----------------------------------------------------------------------------------------------------------------
#091;/et_pb_text][et_pb_text _builder_version="4.6.0" _module_preset="default" text_font="|300|||||||"]At this point we may see the Cluster Verification Utility pack version warning as described earlier. It is safe to proceed without downloading the latest version of the pack. ORAchk proceeds to run the audit checks and executes in the background on the remote node: [/et_pb_text][et_pb_text admin_label="Code 10" _builder_version="4.6.0" _module_preset="default" background_color="#f2f2f2"]*** Checking Best Practice Recommendations ( Pass / Warning / Fail ) *** Collections and audit checks log file is /opt/oracle.ahf/data/dbhostrac1/orachk/orachk_dbhostrac1_dbrac_032520_185210/log/orachk.log Starting to run orachk in background on dbhostrac2 ============================================================ Node name – dbhostrac1 ============================================================ Collecting - ASM Disk Groups Collecting - ASM Disk I/O stats Collecting - ASM Diskgroup Attributes ···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<··· Collecting - Table of file system defaults Collecting - Voting disks (clusterware) Collecting - number of semaphore operations per semop system call Data collections completed. Checking best practices on dbhostrac1. ------------------------------------------------------------------ INFO => Important Automatic Storage Management (ASM) Notes and Technical White Papers INFO => Oracle Data Pump Best practices WARNING => Linux swap configuration does not meet recommendations ···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<··· INFO => Oracle recovery manager (RMAN) best practices CRITICAL => Linux transparent huge pages are enabled WARNING => vm.min_free_kbytes should be set as recommended. Best Practice checking completed. Checking recommended patches on dbhostrac1 ---------------------------------------------------------------------------- Collecting patch inventory on CRS_HOME /u01/app/18.0.0/grid Collecting patch inventory on ASM_HOME /u01/app/18.0.0/grid Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/18.0.0/db_1 ------------------------------------------------------------------------------------------------------------------ 1 Recommended CRS patches for 180000 from /u01/app/18.0.0/grid on dbhostrac1 ------------------------------------------------------------------------------------------------------------------ Patch# CRS ASM RDBMS_HOME Patch-Description ------------------------------------------------------------------------------------------------------------------ 28655963 yes yes /u01/app/oracle/product/18.0.0/db_1 DBWLM Release Update 18.4.0.0.181016 30869417 no no /u01/app/oracle/product/18.0.0/db_1 ACFS Release Update 18.10.0.0.200414 30872794 no no /u01/app/oracle/product/18.0.0/db_1 Database Release Update 18.10.0.0.200414 30882568 no no /u01/app/oracle/product/18.0.0/db_1 OCW Release Update 18.10.0.0.200414 30888855 no no /u01/app/oracle/product/18.0.0/db_1 Tomcat Release Update 18.0.0.0.0 ------------------------------------------------------------------------------------------------------------------ 1 Recommended RDBMS patches for 180000 from /u01/app/oracle/product/18.0.0/db_1 on dbhostrac1 ···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<··· ------------------------------------------------------------------------------------------------------------------ Clusterware patches summary report ------------------------------------------------------------------------------------------------------------------ ···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<··· ------------------------------------------------------------------------------------------------------------------ RDBMS homes patches summary report ------------------------------------------------------------------------------------------------------------------
============================================================
Node name – dbhostrac2
============================================================
Collecting - /proc/cmdline
Collecting - /proc/modules
Collecting - CPU Information
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<··· Collecting - root time zone check Collecting - slabinfo Collecting - umask setting for GI owner Data collections completed. Checking best practices on dbhostrac2. ------------------------------------------------------------ WARNING => Linux swap configuration does not meet recommendation
FAIL => ASM Audit file destination file count > 100,000
INFO => $CRS_HOME/log/hostname/client directory has too many older log files.
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<··· WARNING => NIC bonding is not configured for interconnect
WARNING => NIC bonding is NOT configured for public network (VIP)
CRITICAL => Operating system hugepages count does not satisfy total SGA requirements
Best Practice checking completed. Checking recommended patches on dbhostrac2
--------------------------------------------------------------------------------
Collecting patch inventory on CRS_HOME /u01/app/18.0.0/grid
Collecting patch inventory on ASM_HOME /u01/app/18.0.0/grid
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/18.0.0/db_1
------------------------------------------------------------------------------------------------------------------
1 Recommended CRS patches for 180000 from /u01/app/18.0.0/grid on dbhostrac2
------------------------------------------------------------------------------------------------------------------
Patch# CRS ASM RDBMS_HOME Patch-Description
------------------------------------------------------------------------------------------------------------------
28655963 yes yes /u01/app/oracle/product/18.0.0/db_1 DBWLM Release Update 18.4.0.0.181016
30869417 no no /u01/app/oracle/product/18.0.0/db_1 ACFS Release Update 18.10.0.0.200414
30872794 no no /u01/app/oracle/product/18.0.0/db_1 Database Release Update 18.10.0.0.200414
30882568 no no /u01/app/oracle/product/18.0.0/db_1 OCW Release Update 18.10.0.0.200414
30888855 no no /u01/app/oracle/product/18.0.0/db_1 Tomcat Release Update 18.0.0.0.0
------------------------------------------------------------------------------------------------------------------
1 Recommended RDBMS patches for 180000 from /u01/app/oracle/product/18.0.0/db_1 on dbhostrac2
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···
------------------------------------------------------------------------------------------------------------------
Clusterware patches summary report
------------------------------------------------------------------------------------------------------------------
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···
------------------------------------------------------------------------------------------------------------------
RDBMS homes patches summary report
------------------------------------------------------------------------------------------------------------------
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<··· ------------------------------------------------------------------------------------------------------------------ CLUSTERWIDE CHECKS ------------------------------------------------------------ WARNING => Private interconnect interface names are NOT the same across cluster
------------------------------------------------------------------------------------------------------------------
Detailed report (html) - /opt/oracle.ahf/data/dbhostrac1/orachk/orachk_dbhostrac1_DBRAC_061920_174923/↵
orachk_dbhostrac1_DBRAC_061920_174923.html
UPLOAD [if required] - /opt/oracle.ahf/data/dbhostrac1/orachk/orachk_dbhostrac1_DBRAC_061920_174923.zip
Removing Oracle AHF from Linux
If Oracle AHF is no longer required it can be uninstalled by running the tfactl script as root with the ‘uninstall’ parameter:
[root@dbhost]# cd /opt/oracle.ahf/tfa/bin
[root@dbhost]# ./tfactl uninstall
Starting AHF Uninstall
NOTE : Uninstalling does not return all the space used by the AHF repository
Unable to determine host list from TFA. So running local AHF uninstall.
AHF will be uninstalled on: dbhost
Do you want to continue with AHF uninstall ? [Y]|N :
Stopping AHF service on local node dbhost...
Sleeping for 10 seconds...
Stopping TFA Support Tools...
Removing AHF setup on dbhost:
Removing /opt/oracle.ahf/jre
Removing /opt/oracle.ahf/common
Removing /opt/oracle.ahf/bin
Removing /opt/oracle.ahf/python
Removing /opt/oracle.ahf/analyzer
Removing /opt/oracle.ahf/tfa
Removing /opt/oracle.ahf/orachk
Removing /opt/oracle.ahf/ahf
Removing /opt/oracle.ahf/data/wirk-ora
Removing /opt/oracle.ahf/install.properties
Installing Oracle AHF on Windows
If you’re looking to install Oracle AHF on Windows you can download the latest versionfind tas a .zip file from Oracle Support via the following link:
Oracle Autonomous Health Framework (AHF) – Including TFA and ORAchk/EXAchk (Doc ID 2550798.1)
You will need to ensure that the GA Release of TFA & ORAchk/EXAchk for Windows (64-bit) is downloaded.
Note that, as of the time of writing, the .zip file downloaded from Oracle Support contains a directory named ‘..’ as highlighted in the screenshot below:
Once downloaded, transfer the .zip file to the database host as an administrative user and unzip the file. Ensure that there is at least 5GB of free diskspace on the disk where the Oracle AHF will be installed.
In the following example the AHF-Win_v20.1.1.zip file is transferred to the D:\Oracle\media\AHF directory and the .zip file’s contents are extracted into the directory. We will install Oracle AHF into the D:\Oracle\AHF directory:
/* In an administrative Command Prompt */
D:\> cd Oracle
Create directories for installation of Oracle AHF
D:\Oracle> mkdir media\AHF AHF
D:\Oracle> cd media\AHF
AHF-Win_v20.1.1.zip transferred to the current directory
D:\Oracle\media\AHF> dir /b
AHF-Win_v20.1.1.zip
Extract contents of the .zip file to the current directory using 7-Zip or Windows Explorer
D:\Oracle\media\ahf> dir /b
AHF-Win_v20.1.1.zip
extracted
README.txt
/* In an administrative Command Prompt */
D:\Oracle\media\ahf> cd extracted
D:\Oracle\media\ahf\extracted> dir /b
installahf.bat
oracle.ahf
Check if perl.exe is already on the PATH
D:\Oracle\media\ahf\extracted> perl -v
'perl' is not recognised as an internal or external command, operable program or batch file.
Search for per.exe
D:\Oracle\media\ahf\extracted> dir D:\perl.exe /s /b
D:\Oracle\product\11.2.0\db_1\perl\bin\perl.exe
Append the location of perl.exe to the system path variable
D:\oracle\media\ahf\extracted> SET PATH=%PATH%;D:\Oracle\product\11.2.0\db_1\perl\bin
Retry earlier 'perl -v' command
D:\Oracle\media\ahf\extracted> perl -v
This is perl, v5.10.0 built for MSWin32-x64-multi-thread
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<
We now run installahf.bat with two parameters, -perlhome (the Perl home) and -ahf_loc, the location to which Oracle AHF is to be installed.
ORACLE TRACE FILE ANALYSER (TFA) ISSUES
Note that unlike installing Oracle AHF on Linux, as of the time of writing we cannot avoid installing the Oracle Trace File Analyser (TFA) component when installing Oracle AHF on Windows.
In testing, TFA has been seen to cause an issue whereby it continuously writes exception errors to a file within the Oracle AHF installation folder structure. Left unchecked, the file can grow to several GB in size, so it is necessary to disable Oracle TFA as soon as the installation of Oracle AHF completes.
/* In an administrative Command Prompt */
D:\Oracle\media\ahf\extracted> installahf.bat -perlhome D:\Oracle\product\11.2.0\db_1\perl ↵
-ahf_loc D:\Oracle\AHF
AHF Installation Log : C:\ahf_install_3060_2020_05_06_16_55_54.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 201100 Build Date: 202003170925
AHF Location : D:\Oracle\ahf\oracle.ahf
AHF Data Directory stores diagnostic collections and metadata.
AHF Data Directory requires at least 5GB (Recommended 10GB) of free space.
Choose Data Directory from below options :
1. D:\Oracle\ahf\oracle.ahf [Free Space : 29896 MB]
2. Enter a different Location
Choose Option [1 - 2] : 1
AHF Data Directory : D:\Oracle\ahf\oracle.ahf\data
Symbolic link created for D:\Oracle\ahf\oracle.ahf\bin\orachk.bat <<===>> D:\Oracle\ahf\oracle.ahf\orachk\orachk.bat
Configuring TFA Services
Starting Discovery...
The system cannot find the path specified.
No Grid Infrastructure Discovered on this system . . . . .
dborawin
Searching for running databases...
1. DB11G
Searching out ORACLE_HOME for selected databases...
Getting Oracle Inventory...
ORACLE INVENTORY: C:\Program Files\Oracle\Inventory
Discovery Complete...
Cleaning Temporary Folders . . .
Reading inv C:\Program Files\Oracle\Inventory\ContentsXML\inventory.xml
Successfully generated certificates.
Starting TFA Services
.------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID |
+------------+---------------+-----+-------+------------+----------------------+
| dborawin | RUNNING | 584 | 49183 | 20.1.1.0.0 | 20110020200317092524 |
'------------+---------------+-----+-------+------------+----------------------'
Running TFA Inventory...
.-----------------------------------------------------------------.
| Summary of AHF Configuration |
+-----------------+-----------------------------------------------+
| Parameter | Value |
+-----------------+-----------------------------------------------+
| AHF Location | D:\Oracle\ahf\oracle.ahf |
| TFA Location | D:\Oracle\ahf\oracle.ahf\tfa |
| Orachk Location | D:\Oracle\ahf\oracle.ahf\orachk |
| Data Directory | D:\Oracle\ahf\oracle.ahf\data |
| Repository | D:\Oracle\ahf\oracle.ahf\data\repository |
| Diag Directory | D:\Oracle\ahf\oracle.ahf\data\dborawin\diag |
'-----------------+-----------------------------------------------'
AHF binaries are available in D:\Oracle\ahf\oracle.ahf\bin
AHF is successfully installed
You can disable Oracle TFA by performing the following steps:
1. Locate the ‘Oracle Trace File Analyser’ Windows service
2. Edit the service’s properties to stop and disable the service:
/* In an administrative Command Prompt */
D:\Oracle\media\ahf\extracted> cd \
D:\> cd Oracle\AHF\oracle.ahf\tfa\bin
Stop TFA
D:\Oracle\AHF\oracle.ahf\tfa\bin> tfactl.bat stop
Stopping TFA from the Command Line
Successfully stopped TFA
Note that if the 'tfactl.bat stop' command fails with a 'missing api-ms-win-crt-runtime-l1-1-0.dll'
error, download & install the Visual C++ Redistributable for Visual Studio 2015 and retry the command
Running ORAchk on Windows
Unlike running ORAchk on Linux, it is not possible for ORAchk to run on remote nodes in a Windows clustered database (Oracle RAC) environment. Therefore, when running ORAchk on Windows on Oracle RAC databases it is necessary to install Oracle AHF and run ORAchk on each cluster node separately.
Before running ORAchk on Windows you must ensure that a tnsnames.ora file exists in the network\admin directory below the Oracle Home and that all databases hosted on the server have an entry in the tnsnames.ora file.
/* In an administrative Command Prompt */
D:\> cd Oracle\AHF\oracle.ahf\bin
D:\Oracle\AHF\oracle.ahf\bin> orachk.bat
List of running databases
1. DB11G
2. None of above
If multiple databases are running on the host an 'All of above' option will be given and should be selected
Select databases from list for checking best practices. For multiple databases, select 1 for All or comma separated number like 1,2 etc [1-2][1].1
Checking Status of Oracle Software Stack - Clusterware, ASM, RDBMS...
--------------------------------------------------------------------------------------------------------------
Oracle Stack Status
--------------------------------------------------------------------------------------------------------------
Host Name CRS Installed ASM HOME RDBMS Installed CRS UP ASM UP RDBMS UP DB Instance Name
--------------------------------------------------------------------------------------------------------------
dborawin No No Yes No No Yes DB11G
--------------------------------------------------------------------------------------------------------------
Copying plug-ins...
*** Checking Best Practice Recommendations ( Pass / Warning / Fail ) ***
Collections and audit checks log file is: D:\Oracle\AHF\oracle.ahf\data\dborawin\orachk\orachk_050120_133251\log\orachk.log
============================================================
Node name - dborawin
============================================================
Collecting - Database Parameters for DB11G database
Collecting - Database Undocumented Parameters for DB11G database
Collecting - List of active logon and logoff triggers for DB11G database
Collecting - Patches for RDBMS Home
Collecting - winservices
Data collections completed. Checking best practices on dborawin...
------------------------------------------------------------------
WARNING => There are some application objects with STALE statistics for DB11G
WARNING => Oracle patch 18498878 is not applied on RDBMS_HOME D:\Oracle\product\11.2.0\db_1
WARNING => Oracle patch 20907061 is not applied on RDBMS_HOME D:\Oracle\product\11.2.0\db_1
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%< FAIL => Table AUD$ [FGA_LOG$] should use Automatic Segment Space Management for DB11G
WARNING => fast_start_mttr_target has NOT been changed from default on DB11G instance
WARNING => Flashback on PRIMARY is not configured for DB11G
Best Practice checking completed. Checking recommended patches on dborawin
--------------------------------------------------------------------------------
Collecting patch inventory on ORACLE_HOME D:\Oracle\product\11.2.0\db_1
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<
0 Recommended RDBMS patches for 112040 from D:\Oracle\product\11.2.0\db_1 on dborawin
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<
Detailed report (html) - D:\Oracle\ahf\oracle.ahf\data\vmora-win\orachk\orachk_050120_133251\↵
orachk_050120_133251.html
UPLOAD [if required] - D:\Oracle\ahf\oracle.ahf\data\vmora-win\orachk\orachk_050120_133251.zip
Once completed, you can transfer the html report locally and open the report in a browser.
Removing Oracle AHF from Windows
If Oracle AHF is no longer required it can be uninstalled in this way::
/* In an administrative Command Prompt */
D:\> cd Oracle\AHF\oracle.ahf\tfa\bin
Check if perl.exe is already on the PATH
D:\Oracle\AHF\oracle.ahf\tra\bin> perl -v
'perl' is not recognised as an internal or external command, operable program or batch file.
Append the location of perl.exe to the system path variable
D:\Oracle\AHF\oracle.ahf\tra\bin> SET PATH=%PATH%;D:\Oracle\product\11.2.0\db_1\perl\bin
Retry earlier 'perl -v' command
D:\Oracle\AHF\oracle.ahf\tra\bin> perl -v
This is perl, v5.10.0 built for MSWin32-x64-multi-thread
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%< Proceed with the removal of Oracle AHF D:\Oracle\AHF\oracle.ahf\tra\bin> tfactl uninstall
TFA-00002 Oracle Trace File Analyzer (TFA) is not running
Unable to determine a host list from TFA. So running local uninstall.
Starting TFA Uninstall
NOTE: Uninstalling does not return all the space used by the AHF respository
AHF will be Uninstalled on Node dborawin:
Do you want to continue with AHF Uninstall? [Y|N] [Y]: Y
Removing TFA from dborawin...
Stopping TFA Support Tools...
Stopping TFA in dborawin...
Deleting TFA support files on dborawin:
Removing TFAService...
Removing D:\Orace\AHF\oracle.ahf\ahf on dborawin...
Removing D:\Orace\AHF\oracle.ahf\analyzer on dborawin...
Removing D:\Orace\AHF\oracle.ahf\bin on dborawin...
Removing D:\Orace\AHF\oracle.ahf\common on dborawin...
Removing D:\Orace\AHF\oracle.ahf\jre on dborawin...
Removing D:\Orace\AHF\oracle.ahf\orachk on dborawin...
Removing D:\Orace\AHF\oracle.ahf\tfa on dborawin...
Removing D:\Orace\AHF\oracle.ahf\python on dborawin...
Removing D:\Orace\AHF\oracle.ahf\data\ dborawin on dborawin...
Removing D:\Orace\AHF\oracle.ahf\data\work on dborawin...
Removing D:\Orace\AHF\oracle.ahf\install.properties on dborawin...
Successfully Uninstalled AHF on dborawin...
/* In an administrative Command Prompt */
D:\> cd Oracle\AHF\oracle.ahf\tfa\bin
Check if perl.exe is already on the PATH
D:\Oracle\AHF\oracle.ahf\tra\bin> perl -v
'perl' is not recognised as an internal or external command, operable program or batch file.
Append the location of perl.exe to the system path variable
D:\Oracle\AHF\oracle.ahf\tra\bin> SET PATH=%PATH%;D:\Oracle\product\11.2.0\db_1\perl\bin
Retry earlier 'perl -v' command
D:\Oracle\AHF\oracle.ahf\tra\bin> perl -v
This is perl, v5.10.0 built for MSWin32-x64-multi-thread
···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%<···%< Proceed with the removal of Oracle AHF D:\Oracle\AHF\oracle.ahf\tra\bin> tfactl uninstall
TFA-00002 Oracle Trace File Analyzer (TFA) is not running
Unable to determine a host list from TFA. So running local uninstall.
Starting TFA Uninstall
NOTE: Uninstalling does not return all the space used by the AHF respository
AHF will be Uninstalled on Node dborawin:
Do you want to continue with AHF Uninstall? [Y|N] [Y]: Y
Removing TFA from dborawin...
Stopping TFA Support Tools...
Stopping TFA in dborawin...
Deleting TFA support files on dborawin:
Removing TFAService...
Removing D:\Orace\AHF\oracle.ahf\ahf on dborawin...
Removing D:\Orace\AHF\oracle.ahf\analyzer on dborawin...
Removing D:\Orace\AHF\oracle.ahf\bin on dborawin...
Removing D:\Orace\AHF\oracle.ahf\common on dborawin...
Removing D:\Orace\AHF\oracle.ahf\jre on dborawin...
Removing D:\Orace\AHF\oracle.ahf\orachk on dborawin...
Removing D:\Orace\AHF\oracle.ahf\tfa on dborawin...
Removing D:\Orace\AHF\oracle.ahf\python on dborawin...
Removing D:\Orace\AHF\oracle.ahf\data\ dborawin on dborawin...
Removing D:\Orace\AHF\oracle.ahf\data\work on dborawin...
Removing D:\Orace\AHF\oracle.ahf\install.properties on dborawin...
Successfully Uninstalled AHF on dborawin...
I hope this step-by-step guide to installing, using, and removing Oracle AHF and ORAchk on Linux and Windows has helped. If you have any further questions, or would like to discuss more about how our expert DBAs can help you please get in touch.
Further Insights
Case Study: Global Healthcare ISV Partnership
Find out how our team of experts helped a global healthcare ISV implement their Oracle database environments.
Are you ready for Oracle 12c End of Support?
Oracle 12c support ends in November 2020. Have a read of our blog to find out what your support options are going forward.
Looking to outsource your DBA support overhead?
Download our handy guide to discover the eight business benefits to outsourcing your DBA support overhead.
Neil Garside
Senior DBA
Neil started his Oracle career as a developer, becoming a DBA after emigrating to Australia in 1997.
After returning to the UK in early 2003 he joined Ikano Bank as part of a team of Oracle DBAs looking after databases across Scandinavia, Germany, Poland and the UK. After being outsourced to Capgemini in 2017 Neil managed the transition of Ikano's Oracle databases to Capgemini's datacentres in Finland.
Neil joined N4Stack in 2019. When not asking himself why he ever returned from Australia, Neil is a keen photographer and chicken keeper.
He still thinks materialised views are a pretty neat idea.