Moneycontrol Brokerage Recos

Monday, February 5, 2018

[Oracle Cloud] - Installing TFA in Oracle Cloud environment using dbaascli



Installing TFA in Oracle Cloud using dbaascli


Here I would be demonstrating how we can install Oracle Trace File Analyzer(TFA) in Oracle Cloud environment using dbaascli utility in just a single hit. You have got so much simplicity provided by Oracle public cloud to play with database deployments by using Oracle provided cloud tooling.

TFA - Oracle Trace File Analyzer, collects all diagnostics data(which is composed of logs and traces referencing the problem or incident that we are supposed to diagnose) related to the problem or incident and combines all those diagnostic data in a single compressed zip file to upload to Oracle support service request to analyse the issue by Oracle support engineer.

If you are using Oracle Real Application Cluster then TFA will automatically collect all diagnostic data from both Grid and Oracle RDBMS Home that are related to the incident.

There are lots of things TFA does but those are not in scope of this article to discuss here so we will be concentrating on just installing it in Oracle cloud environment using dbaascli utility :-)


Following the are the sub-commands available with DBAAScli to work the TFA.

 DBAAS>tfa -help  
 Executing command tfa -help  
 Valid Subcommands:  
   install  
   uninstall 



Now, let go ahead and install TFA on compute node of our oracle cloud database deployment. In order to install it, you must be connect as root user, so first to connect to compute node with opc user and switch to root user as follows:

1 - Switch to root user once you are connected to compute node of oracle cloud database deployment.

 [opc@RAJDB121 ~]$ sudo -s  
 [root@RAJDB121 opc]# dbaascli  
 DBAAS CLI version 1.0.0  


2 - Please make a note that TFA is installed on Oracle cloud compute nodes and if you try to install it then it will just re-install the TFA or update it if latest TFA bundle is available.


 DBAAS>tfa install  
 Executing command tfa install  
 tfa.pm: WARNING: TFA already enabled. Reinstalling. <<<<< Already installed hence re-installing it
 Installing TFA.  
 Stopping dbcsmon  
 tfa.pm: INFO dbcsmon status is:  
 Stopping OSWatcher  
 tfa.pm: INFO OSWatcher status is:  
 Setting TFA's repository size to 300 MB  
 Enabling TFA auto startup  
 Enabling TFA auto collection  
 Setting TFA's minimal space for RTScan  
 Adding dbaastools log directories  
 Adding APEX log directories  
 Running tfactl stop command  
 Successfully installed TFA  
 Running tfactl start command  
 Starting dbcsmon  
 tfa.pm: INFO dbcsmon status is:  
 DBAAS>  



If TFA is not already install then it simply install it with latest version available as follows and it doesn't write any warning.

 DBAAS>tfa install  
 Executing command tfa install  
 Installing TFA.  
 Stopping dbcsmon  
 tfa.pm: INFO dbcsmon status is:  
 Stopping OSWatcher  
 tfa.pm: INFO OSWatcher status is:  
 Setting TFA's repository size to 300 MB  
 Enabling TFA auto startup  
 Enabling TFA auto collection  
 Setting TFA's minimal space for RTScan  
 Adding dbaastools log directories  
 Adding APEX log directories  
 Running tfactl stop command  
 Successfully installed TFA  
 Running tfactl start command  
 Starting dbcsmon  
 tfa.pm: INFO dbcsmon status is:  
 DBAAS>  



3 - Once, TFA is installed on compute node of Oracle database deployment of oracle cloud then you can validate its running status as follows:



 [root@RAJDB121 opc]# ps -ef | grep tfa  
 root   2018   1 0 18:52 ?    00:00:00 /bin/sh /etc/init.d/init.tfa run  
 root   14288   1 4 18:54 ?    00:00:06 /var/opt/oracle/tfa/rajdb121/tfa_home/jre/bin/java -Xms128m -Xmx256m oracle.rat.tfa.TFAMain /var/opt/oracle/tfa/rajdb121/tfa_home  
 oracle  14507   1 0 18:54 ?    00:00:00 /usr/bin/perl /var/opt/oracle/misc/dbcsmonitor.pl /var/opt/oracle/tfa/rajdb121/tfa_home /var/opt/oracle/tfa/repository/suptools/rajdb121/dbcsmon /var/opt/oracle/tfa/repository/suptools/rajdb121/dbcsmon/oracle  
 root   15965 26343 0 18:56 pts/1  00:00:00 grep tfa 


From above output, you can identify TFA HOME as /var/opt/oracle/tfa/rajdb121/tfa_home


Validate the status of TFA components by status sub-command of tfactl command line utility as follows:

 [root@RAJDB121 bin]# ./tfactl  
 tfactl> status  
 .-------------------------------------------------------------------------------------------------.  
 | Host   | Status of TFA | PID  | Port | Version  | Build ID       | Inventory Status |  
 +----------+---------------+-------+-------+------------+----------------------+------------------+  
 | rajdb121 | RUNNING    | 14288 | 59017 | 12.2.1.1.1 | 12211120170612181835 | COMPLETE     |  
 '----------+---------------+-------+-------+------------+----------------------+------------------'  
      

No comments:

Post a Comment