Tuesday 26 September 2017

Oracle Database Appliance Health Check

Introduction

Oracle introduced odachk with ODA version 2.3. Later in ODA 12.10 it was renamed to orachk.
Oracle ORAchk tool provides a lightweight and non-intrusive health check framework for the Oracle stack of software and hardware components.
ORAchk is available for Oracle Database and Oracle Database Appliance. For all other Engineered systems use EXAchk.


ORAchk Utility

ORAchk is a Configuration Audit tool developed by Oracle to audit various important configuration settings within Real Application Clusters (RAC), Oracle Clusterware (CRS), Automatic Storage Management (ASM) and Grid Infrastructure environments.

Benefits of ORAchk

  • Automates risk identification and proactive notification before business is impacted
  • Runs health checks based on critical and reoccurring problems
  • No risk involved as the report is stored on the server locally
  • Automate health check reports

In this article we will demonstrate how to execute orachk on Oracle Database Appliance


Running ORAchk On Oracle Database Appliance

Execute oakcli orachk -h command to list different options available with orachk

[root@odanode1 ~]# oakcli orachk -h
Usage : ./orachk [-abvhpfmsuSo:c:t:]

        -h      Prints this page.
        -a      All (Perform best practice check and recommended patch check)
        -b      Best Practice check only. No recommended patch check
        -v      Show version
        -p      Patch check only
        -m      exclude checks for Maximum Availability Architecture (MAA) scorecards(see user guide for more details)
        -u      Run orachk to check pre-upgrade or post-upgrade best practices for 11.2.0.3 and above
                -o pre or -o post is mandatory with -u option like ./orachk -u -o pre
        -f      Run Offline.Checks will be performed on data already collected from the system
        -o      Argument to an option. if -o is followed by v,V,Verbose,VERBOSE or Verbose, it will print checks which passs on the screen
                if -o option is not specified,it will print only failures on screen. for eg: orachk -a -o v

        -clusternodes
                Pass comma separated node names to run orachk only on subset of nodes.
        -output
               Create orachk collection zip file and ouptut directory to non-default(current) location.
        -dbnames
                Pass comma separated database names to run orachk only on subset of databases
        -localonly
                Run orachk only on local node.
        -debug
                Run orachk in debug mode. Debug log will be generated.
                eg:- ./orachk -debug
        -dbnone
                Do not prompt database selection and skip all database related checks.
        -dball
                Do not prompt database selection and run database related checks on all databases discovered on system.

        -c      Used only under the guidance of Oracle support or development to override default components

        -upgrade
                Used to force upgrade the version of orachk being run.
        -noupgrade
                Do not prompt for an upgrade even if a later version is available under the location specified by RAT_UPGRADE_LOC.
        -syslog
               Write JSON results from orachk run to syslog.
        -skip_usr_def_checks
                Do not run checks present in user defined xml file.


...
...
...


Execute the following command to run an ODA health check for all components which include checking best practice and recommended patch check

[root@odanode1 ~]# oakcli orachk

Checking for prompts on odanode1 for grid user...

Checking ssh user equivalency settings on all nodes in cluster

Node odanode2 is configured for ssh user equivalency for root user

Checking for prompts for grid user on all nodes...

Searching for running databases . . . . .

. . . . . . . . . . . . . .
List of running databases registered in OCR
1. odatest
2. odauat
3. odadev
4. odaprod
5. All of above
6. None of above

Select databases from list for checking best practices. For multiple databases, select 5 for All or comma separated number like 1,2 etc [1-6][5].5

Searching out ORACLE_HOME for selected databases.

. .
Checking for prompts for oracle user on all nodes...

. . . . . . . . . . . . . . . . . . . . . . . .

.
Checking Status of Oracle Software Stack - Clusterware, ASM, RDBMS

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Checking for prompts for oraoem user on all nodes...

. . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-------------------------------------------------------------------------------------------------------
                                                 Oracle Stack Status
-------------------------------------------------------------------------------------------------------
Host Name  CRS Installed  RDBMS Installed  CRS UP    ASM UP    RDBMS UP  DB Instance Name
-------------------------------------------------------------------------------------------------------
odanode1 Yes             Yes             Yes        Yes      Yes      odatest odauat odadev odaprod
odanode2 Yes             Yes             Yes        Yes      Yes      odatest odauat odadev odaprod
-------------------------------------------------------------------------------------------------------

*** Checking Best Practice Recommendations (PASS/WARNING/FAIL) ***


Collections and audit checks log file is
/opt/oracle/oak/orachk/orachk_odanode1_odatest_091117_153015/log/orachk.log

Checking for prompts in /root/.bash_profile on odanode1 for root user...

Checking for prompts in /root/.bash_profile on odanode2 for root user...

Starting to run orachk in background on odanode2

. .
=============================================================
                    Node name - odanode1
=============================================================
. . . . .

Collecting - ASM Diskgroup Attributes
Collecting - ASM initialization parameters
Collecting - Database Parameters for odatest database
Collecting - Database Parameters for odauat database
Collecting - Database Parameters for odadev database
Collecting - Database Parameters for odaprod database
Collecting - Database Parameters for odatest database
Collecting - Database Parameters for odauat database
Collecting - Database Parameters for odadev database
Collecting - Database Parameters for odaprod database
Collecting - Database Undocumented Parameters for odatest database
Collecting - Database Undocumented Parameters for odauat database
Collecting - Database Undocumented Parameters for odadev database
Collecting - Database Undocumented Parameters for odaprod database
Collecting - RDBMS Feature Usage for odatest database
Collecting - RDBMS Feature Usage for odauat database
Collecting - RDBMS Feature Usage for odadev database
Collecting - RDBMS Feature Usage for odaprod database
Collecting - Kernel parameters
Collecting - Maximum number of semaphore sets on system
Collecting - Maximum number of semaphores on system
Collecting - Maximum number of semaphores per semaphore set
Collecting - OS Packages
Collecting - Patches for Grid Infrastructure
Collecting - Patches for RDBMS Home
Collecting - number of semaphore operations per semop system call
Collecting - CRS user limits configuration
Collecting - Firmware and software versions
Collecting - Network and Bonding Interfaces Status
Collecting - OS Disk Storage Status
Collecting - System Component Status
Collecting - Validate Shared storage


Data collections completed. Checking best practices on odanode1.
--------------------------------------------------------------------------------------

 INFO =>    Oracle Database Appliance Best Practice References
 WARNING => ORA_CRS_HOME environment variable is set
 INFO =>    $CRS_HOME/log/hostname/client directory has too many older log files.
 INFO =>    user_dump_dest has trace files older than 30 days for odauat
 INFO =>    user_dump_dest has trace files older than 30 days for odadev
 INFO =>    background_dump_dest has files older than 30 days for odauat
 INFO =>    background_dump_dest has files older than 30 days for odadev
 INFO =>    Some data or temp files are not autoextensible for odatest
 INFO =>    Number of SCAN listeners is NOT equal to the recommended number of 3.
 WARNING => NIC bonding is NOT configured for public network (VIP)
 FAIL =>    ASM Audit file destination file count > 100,000
 FAIL =>    Database parameter DB_LOST_WRITE_PROTECT is NOT set to recommended value on odauat instance
 FAIL =>    Database parameter DB_LOST_WRITE_PROTECT is NOT set to recommended value on odadev1 instance
 FAIL =>    Database parameter GLOBAL_NAMES is NOT set to recommended value on odauat instance
 FAIL =>    Database parameter GLOBAL_NAMES is NOT set to recommended value on odatest instance
 FAIL =>    Database parameter GLOBAL_NAMES is NOT set to recommended value on odadev1 instance
 FAIL =>    One or more errors for network and bonding interface checks
 INFO =>    Some custom (non-default) RPM are installed
 WARNING => Database parameter DB_BLOCK_CHECKING is NOT set to the recommended value. on odatest instance
 WARNING => Database parameter _DISABLE_INTERFACE_CHECKING is NOT set to recommended value on odatest instance
 INFO =>    Parallel Execution Health-Checks and Diagnostics Reports for odatest

Best Practice checking completed.Checking recommended patches on odanode1.
---------------------------------------------------------------------------------

Collecting patch inventory on CRS HOME /u01/app/12.1.0.2/grid
Collecting patch inventory on ASM HOME /u01/app/12.1.0.2/grid
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/11.2.0.4/dbhome1
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/11.2.0.4/dbhome2
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/11.2.0.4/dbhome3
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/12.1.0.2/dbhome4

Copying results from odanode2 and generating report. This might take a while. Be patient.

. .
=============================================================
                    Node name - odanode2
=============================================================
. . . . .

Collecting - Kernel parameters
Collecting - Maximum number of semaphore sets on system
Collecting - Maximum number of semaphores on system
Collecting - Maximum number of semaphores per semaphore set
Collecting - OS Packages
Collecting - Patches for Grid Infrastructure
Collecting - Patches for RDBMS Home
Collecting - number of semaphore operations per semop system call
Collecting - CRS user limits configuration
Collecting - Firmware and software versions
Collecting - Network and Bonding Interfaces Status
Collecting - OS Disk Storage Status
Collecting - System Component Status
Collecting - Validate Shared storage

Data collections completed. Checking best practices on odanode2.
--------------------------------------------------------------------------------------

 INFO =>    $CRS_HOME/log/hostname/client directory has too many older log files.
 INFO =>    user_dump_dest has trace files older than 30 days for odaprod
 INFO =>    user_dump_dest has trace files older than 30 days for odadev
 INFO =>    background_dump_dest has files older than 30 days for odaprod
 INFO =>    background_dump_dest has files older than 30 days for odadev
 INFO =>    Number of SCAN listeners is NOT equal to the recommended number of 3.
 WARNING => NIC bonding is NOT configured for public network (VIP)
 FAIL =>    ASM Audit file destination file count > 100,000
 FAIL =>    Database parameter DB_LOST_WRITE_PROTECT is NOT set to recommended value on odaprod instance
 FAIL =>    Database parameter DB_LOST_WRITE_PROTECT is NOT set to recommended value on odadev2 instance
 FAIL =>    Database parameter GLOBAL_NAMES is NOT set to recommended value on odaprod instance
 FAIL =>    Database parameter GLOBAL_NAMES is NOT set to recommended value on odadev2 instance
 FAIL =>    One or more errors for network and bonding interface checks
 INFO =>    Some custom (non-default) RPM are installed

Best Practice checking completed.Checking recommended patches on odanode2.
---------------------------------------------------------------------------------

Collecting patch inventory on CRS HOME /u01/app/12.1.0.2/grid
Collecting patch inventory on ASM HOME /u01/app/12.1.0.2/grid
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/11.2.0.4/dbhome1
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/11.2.0.4/dbhome2
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/11.2.0.4/dbhome3
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/12.1.0.2/dbhome4

---------------------------------------------------------------------------------
                      CLUSTERWIDE CHECKS
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------

Detailed report (html) - /opt/oracle/oak/orachk/orachk_odanode1_odatest_091117_153015/orachk_odanode1_odatest_091117_153015.html
UPLOAD(if required) - /opt/oracle/oak/orachk/orachk_odanode1_odatest_091117_153015.zip

Review the report for FAILURE, WARNING and take necessary action to fix the issue by following the recommendation provided within the report. You can also work with Oracle Support if don't understand a particular issue or if you want to clarify with them before taking an action.



Conclusion

In this article we have learned to perform an Oracle Database Appliance Health check using orachk. Oracle introduced odachk with ODA version 2.3. Later in ODA 12.10 it was renamed to orachk. Oracle ORAchk tool provides a lightweight and non-intrusive health check framework for the Oracle stack of software and hardware components.

No comments:

Post a Comment

Comparing Oracle Database Appliance X8-2 Model Family

September 2019 Oracle announced Oracle Database Appliance X8-2 (Small, Medium and HA). ODA X8-2 comes with more computing resources com...