Table of Contents
Uninstall tfa as oracle user
This goes through all the ORACLE_HOMEs and uninstalls TFA everywhere. Just use the single uninstall if that is what is required.
for i in $(awk -F':' '!/^#/ {print $2}' /etc/oratab|sort -u); do
echo $i
find $i -name "*log4j*-2*jar" 2>/dev/null|grep suptools >/dev/null
[[ $? -ne 0 ]] && continue
if [[ -x $i/suptools/tfa/release/tfa_home/bin/tfactl ]]; then
echo $i/suptools/tfa/release/tfa_home/bin/tfactl uninstall
else
echo $i/suptools/tfa/bin/tfactl uninstall
fi
done
If it won't uninstall
rm -rf $ORACLE_HOME/suptools/tfa ${HOME}/.tfa /tmp/oracle.tfa
Install tfa as oracle user
Trace File Analyser (TFA) can be installed as either root (giving more collection possibilities) or as the oracle user which provides less in terms of background info but is fine for diagnosing Oracle related issues.
tfa is part of the Autonomous Health Framework (AHF) along with OraCheck and ExaCheck. It is installed using something like this:
cd /oracle/Patches unzip AHF-AIX-PPC64_v20.2.3.zip -d ./AHF-AIX-PPC64_v20.2.3
- set the environment for a database with the home to install tfa into.
cd AHF-AIX-PPC64_v20.2.3
./ahf_setup -ahf_loc "${ORACLE_BASE}"
AHF Installer for Platform AIX Architecture PPC64
AHF Installation Log : /tmp/ahf_install_243000_19924464_2024_04_19-11_48_25.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 24.3.0 Build Date: 202404011557
AHF is already installed at /cln/acc/ora_bin/app/oracle/oracle.ahf
Installed AHF Version: 23.8.0 Build Date: 202308300211
Do you want to upgrade AHF [Y]|N :
Upgrading /cln/acc/ora_bin/app/oracle/oracle.ahf
Upgrading AHF Services
.---------------------------------------------------------------.
| Host | TFA Version | TFA Build ID | Upgrade Status |
+--------+-------------+-----------------------+----------------+
| hn5407 | 24.3.0.0.0 | 240300020240401155746 | UPGRADED |
'--------+-------------+-----------------------+----------------'
Setting up AHF CLI and SDK
AHF is successfully upgraded to latest version
This is what the ${ORACLE_BASE}/oracle.ahf directory will look like
drwxr-xr-x 17 oracle oinstall 4096 Apr 19 11:51 . drwxr-xr-x 10 oracle oinstall 256 Feb 14 14:46 .. drwxr-xr-x 6 oracle oinstall 256 Apr 02 00:57 ahf drwxr-xr-x 5 oracle oinstall 256 Apr 02 00:58 ahfscope drwxr-x--x 2 oracle oinstall 256 Feb 14 14:47 analyzer drwxr-xr-x 2 oracle oinstall 256 Apr 19 11:51 bin drwxr-xr-x 3 oracle oinstall 256 Apr 19 11:49 cha drwxr-xr-x 5 oracle oinstall 256 Apr 02 00:58 chadiag drwxr-x--x 3 oracle oinstall 256 Apr 19 11:49 chm drwxr-xr-x 8 oracle oinstall 256 Apr 19 11:49 common drwxr-xr-x 5 oracle oinstall 256 Feb 14 14:47 data -rw-r--r-- 1 oracle oinstall 1390 Apr 19 11:51 install.properties drwxr-x--x 7 oracle oinstall 256 Apr 02 02:15 jre drwxr-xr-x 6 oracle oinstall 4096 Apr 19 11:51 orachk drwxr-xr-x 2 oracle oinstall 256 Aug 30 2023 pyrepo drwxr-xr-x 6 oracle oinstall 256 Feb 24 02:08 python drwx------ 2 oracle oinstall 256 Apr 02 00:58 rpms drwxr-x--x 15 oracle oinstall 4096 Apr 19 11:50 tfa
Oracle website may refer to TFA_HOME. This can be set as follows
export TFA_HOME="${ORACLE_BASE}/oracle.ahf"
If the data should be put somewhere else, it can be specified as an installer option
-data_dir /oracle/tfa/$(hostname)
Sometimes there may be issues finding Perl. Something like this may be needed
export PATH="${ORACLE_HOME}/perl/bin:${PATH}"
export PERL5LIB="${ORACLE_HOME}/perl/lib:${PERL5LIB}"
Upgrade doesn't seem to work any longer
Just running the installer to have it do an upgrade no longer works. It asks to uninstall first then install the latest version!
#!/usr/bin/env ksh
function cleanup
{
[[ "${RMDIR_AFTER}" == "Y" ]] && rm -rf "${ORACLE_BASE}/temp"
}
trap cleanup EXIT
#pick a randon 19c SID (to set ORACLE_BASE)
ORACLE_SID=$(awk -F':' '$2~/\/19/ {print $1}' /etc/oratab|head -1)
ORAENV_ASK=NO
. oraenv >/dev/null 2>&1
[[ "$?" -ne 0 ]] && echo "ERROR: unable to set environment for ${ORACLE_SID}" && exit 1
mkdir "${ORACLE_BASE}/temp"
[[ "$?" -eq 0 ]] && RMDIR_AFTER="Y" # if the creation did not fail, we created it so we will remove it afterwards!
echo "Y"|"${ORACLE_BASE}/oracle.ahf/bin/tfactl" -tmp_loc "${ORACLE_BASE}/temp" uninstall
cd /oracle/Patches/AHF-AIX-PPC64_v24.5.0/
./ahf_setup -tmp_loc "${ORACLE_BASE}/temp" -ahf_loc "${ORACLE_BASE}"
echo "Done."
List of all the diagnostic collections available
Link above will show the current list.
SRDC - How to Collect Standard Information for Clusterware Startup Issues (Doc ID 2766730.1) [Updated: 06/11/2021]
SRDC - How to Collect Diagnostics Information for ASM/ACFS Issues (Doc ID 1906193.1) [Updated: 06/10/2021]
SRDC - Required Diagnostic Data Collection for RMAN Issues (Doc ID 1671431.1) [Updated: 06/10/2021]
SRDC - Required diagnostic data collection for FRA (Doc ID 2352592.1) [Updated: 06/10/2021]
SRDC - Required Diagnostic Data Collection for RMAN-08137 or RMAN-08120 Issues (Doc ID 2078937.1) [Updated: 06/10/2021]
SRDC - Required Diagnostic Data Collection for ORA-01578 (Doc ID 1671531.1) [Updated: 06/10/2021]
SRDC - Collect Logical Standby Database Information (Doc ID 1910065.1) [Updated: 06/10/2021]
SRDC - How To Collect The Required Information For Support To Validate & Troubleshoot ASM/ASMLIB Issues. (Doc ID 1678592.1) [Updated: 05/28/2021]
SRDC - ORA-4031 on Shared Pool: Checklist of Evidence to Supply for Version 11g and Greater (Doc ID 2166084.1) [Updated: 05/27/2021]
SRDC - Diagnostic Collection for LogMiner Performance Issues (Doc ID 1940417.1) [Updated: 05/27/2021]
SRDC - Diagnostic Collection for DBVERIFY Utility Issues (Doc ID 1926299.1) [Updated: 05/26/2021]
SRDC - Diagnostic Collection for DataPump Import (IMPDP) Generic Issues (Doc ID 1947819.1) [Updated: 05/12/2021]
SRDC - Diagnostic Collection for DataPump Export Performance Issues (Doc ID 1935743.1) [Updated: 05/12/2021]
SRDC - How to Collect Standard Information for RAC Database / ASM Performance Problem (Doc ID 2760985.1) [Updated: 05/05/2021]
SRDC - EEST ODA Node Hang (Doc ID 1905402.1) [Updated: 04/27/2021]
SRDC - ODA Required Basic Information: HW Type, Product Version and Platform Type (Doc ID 2305297.1) [Updated: 04/21/2021]
SRDC - Shutdown Issues : Checklist of Evidence to Supply (Doc ID 1906473.1) [Updated: 04/20/2021]
SRDC - Diagnostic Collection for DataPump Export Generic Issues (Doc ID 1927719.1) [Updated: 04/14/2021]
SRDC - Exadata Generic Data Collection for Other DB Internal Errors (Doc ID 2656843.1) [Updated: 04/08/2021]
SRDC - ORA-4063 : Checklist of Evidence to Supply (Doc ID 2369144.1) [Updated: 04/07/2021]
SRDC - Database Parameters: Checklist of Evidence to Supply (Doc ID 1913412.1) [Updated: 04/07/2021]
SRDC - Open Cursors:Checklist of Evidence to Supply (Doc ID 1913408.1) [Updated: 04/07/2021]
SRDC - ORA-1555: Checklist of Evidence to Supply (Doc ID 1682708.1) [Updated: 04/07/2021]
SRDC - Wait Events related to Undo: Checklist of Evidence to Supply (Doc ID 1682723.1) [Updated: 04/07/2021]
SRDC - AUM : Checklist of Evidence to Supply (Doc ID 1682741.1) [Updated: 04/07/2021]
SRDC - ORA-22924 or ORA-1555 on LOB data: Checklist of Evidence to Supply (Doc ID 1682707.1) [Updated: 04/07/2021]
SRDC - SCN Issues: Checklist of Evidence to Supply (Doc ID 2329044.1) [Updated: 04/07/2021]
SRDC - Generic Process Management and Related Issues: Checklist of Evidence to Supply (Doc ID 2500734.1) [Updated: 04/07/2021]
SRDC - Bequeath Connection Issues: Checklist of Evidence to Supply (Doc ID 1928047.1) [Updated: 04/07/2021]
SRDC - ORA-445 or Unable to Spawn Process: Checklist of Evidence to Supply (Doc ID 2500730.1) [Updated: 04/07/2021]
SRDC - Instance Termination (non-RAC) Issues : Checklist of Evidence to Supply (Doc ID 2507010.1) [Updated: 04/07/2021]
SRDC - OracleService on Windows: Checklist of Evidence to Supply (Doc ID 1918781.1) [Updated: 04/07/2021]
SRDC - Startup Issues: Checklist of Evidence to Supply (Doc ID 1905616.1) [Updated: 04/07/2021]
SRDC - DBCA Issues: Checklist of Evidence to Supply (Doc ID 1927081.1) [Updated: 04/07/2021]
SRDC - ORA-18 or Sessions Parameter: Checklist of Evidence to Supply (Doc ID 1901726.1) [Updated: 04/07/2021]
SRDC - Processes Parameter or ORA-20:Checklist of Evidence to Supply (Doc ID 1913410.1) [Updated: 04/07/2021]
SRDC - DB on Windows Resources : Checklist of Evidence to Supply (Doc ID 1916752.1) [Updated: 04/07/2021]
SRDC - Parameter Files :Checklist of Evidence to Supply (Doc ID 1914153.1) [Updated: 04/07/2021]
SRDC - ORA-4023 : Checklist of Evidence to Supply (Doc ID 2369143.1) [Updated: 04/06/2021]
SRDC - DDL Errors: Checklist of Evidence to Supply (Doc ID 2383662.1) [Updated: 04/06/2021]
SRDC - Slow DDL: Checklist of Evidence to Supply (Doc ID 1911929.1) [Updated: 04/06/2021]
SRDC - Objects Getting Invalidated: Checklist of Evidence to Supply (Doc ID 2369192.1) [Updated: 04/06/2021]
SRDC - Invalid Components and Objects : Checklist of Evidence to Supply (Doc ID 2360953.1) [Updated: 04/06/2021]
SRDC - Data Collection for Oracle Text Installation Issues using TFA (Doc ID 1934539.1) [Updated: 03/24/2021]
SRDC - Apply DST Patch - till 11gR1: Checklist of Evidence to Supply (Doc ID 1919256.1) [Updated: 03/23/2021]
SRDC - Diagnostic Collection for SQL*Loader Issues (Doc ID 1926697.1) [Updated: 03/23/2021]
SRDC - Data Collection for XDB Installation and Invalid Object for Issues for 12c and Onward (Doc ID 2309483.1) [Updated: 03/18/2021]
SRDC - DB on Unix- Resources : Checklist of Evidence to Supply (Doc ID 1914243.1) [Updated: 03/17/2021]
SRDC - Data Collection for Oracle Spatial Installation Issues using TFA Collector (Doc ID 1901165.1) [Updated: 03/17/2021]
SRDC - Data Collection for XDB ORA-00600 and ORA-07445 Internal Error Issues using TFA Collector (Doc ID 1680021.1) [Updated: 03/17/2021]
Find out about Enterprise Manager (OEM) performance issues
export TFA_HOME="$ORACLE_HOME/suptools/oracle.ahf/tfa" $TFA_HOME/bin/tfactl diagcollect -srdc emagentperf
Find out about ORA-00060 dealocks
export TFA_HOME="$ORACLE_HOME/suptools/oracle.ahf/tfa" $TFA_HOME/bin/tfactl diagcollect -srdc ora60
Find out about ORA-00700 errors
export TFA_HOME="$ORACLE_HOME/suptools/oracle.ahf/tfa" $TFA_HOME/bin/tfactl diagcollect -srdc ora700
