ORAchk 之前被称为RACcheck,后来它的检查范围进行了扩展,改名为了ORAchk,它是在数据库系统进行健康检查的一个专用工具,
这个工具主要用来检查软件的配置是否符合要求以及一些最佳实践是否被应用了。
通过这个工具,用户可以很方便地、自动化地对自己的系统进行健康检查和评估。
ORAchk 能够检查的软件主要有:OS、Oracle Clusterware (CRS)、 Grid Infrastructure environment(GI)、Automatic Storage Management (ASM)以及Real Application Clusters (RAC)、单机的数据库、Golden Gate。
检查的项目包括:
- OS kernel 参数
- OS 包/补丁
- OS上其它和RAC相关的配置
- CRS/Grid Infrastructure
- RDBMS
- ASM
- 数据库参数
- 对于RAC数据库影响较大的设置
- 升级到11.2.0.3/11.2.0.4/12c时的升级检查
-
Maximum Availability Architecture (MAA)检查
目前支持的平台:
o Linux x86-64* (Enterprise Linux, RedHat and SuSE 9, SuSE 10 & SuSE 11)
o Oracle Solaris SPARC (64-bit)(Solaris 10 and 11)
o Oracle Solaris x86-64 (Solaris 10 and 11)
o IBM AIX on POWER Systems (64-bit) **
o HP-UX PA-RISC (64-bit)**
o HP-UX Itanium **
- 不支持32位平台,不支持 Linux Itanium
- 需要安装BASH Shell 3.2 或之上
目前支持的数据库版本:
- 10gR2
- 11gR1
- 11gR2
- 12cR1
ORAchk 能够检查的软件主要有:OS、Oracle Clusterware (CRS)、 Grid Infrastructure environment(GI)、Automatic Storage Management (ASM)以及Real Application Clusters (RAC)、单机的数据库、Golden Gate。
检查的项目包括:
- OS kernel 参数
- OS 包/补丁
- OS上其它和RAC相关的配置
- CRS/Grid Infrastructure
- RDBMS
- ASM
- 数据库参数
- 对于RAC数据库影响较大的设置
- 升级到11.2.0.3/11.2.0.4/12c时的升级检查
Maximum Availability Architecture (MAA)检查
目前支持的平台:
o Linux x86-64* (Enterprise Linux, RedHat and SuSE 9, SuSE 10 & SuSE 11)
o Oracle Solaris SPARC (64-bit)(Solaris 10 and 11)
o Oracle Solaris x86-64 (Solaris 10 and 11)
o IBM AIX on POWER Systems (64-bit) **
o HP-UX PA-RISC (64-bit)**
o HP-UX Itanium **
- 不支持32位平台,不支持 Linux Itanium
- 需要安装BASH Shell 3.2 或之上
目前支持的数据库版本:
o 10gR2
o 11gR1
o 11gR2
o 12cR1
下面是具体界面输出:
[oracle@rac1 ~]$ orachk -ebs32bit
CRS stack is running and CRS_HOME is not set. Do you want to set CRS_HOME to /home/grid/11R2/grid?[y/n][y]y
Checking ssh user equivalency settings on all nodes in cluster
Node rac2 is configured for ssh user equivalency for oracle user
Searching for running databases . . . . .
. .
List of running databases registered in OCR
- racdb
- 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-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
-------------------------------------------------------------------------------------------------------
rac1 Yes N/A Yes Yes Yes Yes racdb1
rac2 Yes N/A Yes Yes Yes Yes racdb2
-------------------------------------------------------------------------------------------------------
Copying plug-ins
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . .
64 of the included audit checks require root privileged data collection . If sudo is not configured or the root password is not available, audit checks which require root privileged data collection can be skipped.
- Enter 1 if you will enter root password for each host when prompted
- Enter 2 if you have sudo configured for oracle user to execute root_orachk.sh script
- Enter 3 to skip the root privileged collections
- Enter 4 to exit and work with the SA to configure sudo or to arrange for root access and run the tool later.
Please indicate your selection from one of the above options for root access[1-4][1]:- 1
Is root password same on all nodes?[y/n][y]y
Enter root password :-
Verifying root password.
. . .
*** Checking Best Practice Recommendations (PASS/WARNING/FAIL) ***
Collections and audit checks log file is
/home/oracle/orachk_rac1_racdb_081814_152310/log/orachk.log
Checking for prompts in /home/oracle/.bash_profile on rac1 for oracle user...
Checking for prompts in /home/oracle/.bash_profile on rac2 for oracle user...
Starting to run orachk in background on rac2
=============================================================
Node name - rac1
=============================================================
Collecting - ASM DIsk I/O stats
Collecting - ASM Disk Groups
Collecting - ASM Diskgroup Attributes
Collecting - ASM disk partnership imbalance
Collecting - ASM diskgroup attributes
Collecting - ASM initialization parameters
Collecting - Active sessions load balance for racdb database
Collecting - Archived Destination Status for racdb database
Collecting - Cluster Interconnect Config for racdb database
Collecting - Database Archive Destinations for racdb database
Collecting - Database Files for racdb database
Collecting - Database Instance Settings for racdb database
Collecting - Database Parameters for racdb database
Collecting - Database Parameters for racdb database
Collecting - Database Properties for racdb database
Collecting - Database Registry for racdb database
Collecting - Database Sequences for racdb database
Collecting - Database Undocumented Parameters for racdb database
Collecting - Database Undocumented Parameters for racdb database
Collecting - Database Workload Services for racdb database
Collecting - Dataguard Status for racdb database
Collecting - Files not opened by ASM
Collecting - Log Sequence Numbers for racdb database
Collecting - Percentage of asm disk Imbalance
Collecting - Process for shipping Redo to standby for racdb database
Collecting - RDBMS Feature Usage for racdb database
Collecting - Redo Log information for racdb database
Collecting - Standby redo log creation status before switchover for racdb database
Collecting - /proc/cmdline
Collecting - /proc/modules
Collecting - CPU Information
Collecting - CRS active version
Collecting - CRS oifcfg
Collecting - CRS software version
Collecting - CSS Reboot time
Collecting - CSS disktimout
Collecting - Cluster interconnect (clusterware)
Collecting - Clusterware OCR healthcheck
Collecting - Clusterware Resource Status
Collecting - DiskFree Information
Collecting - DiskMount Information
Collecting - Huge pages configuration
Collecting - Kernel parameters
Collecting - Linux module config.
Collecting - Maximum number of semaphore sets on system
Collecting - Maximum number of semaphores on system
Collecting - Maximum number of semaphores per semaphore set
Collecting - Memory Information
Collecting - NUMA Configuration
Collecting - Network Interface Configuration
Collecting - Network Performance
Collecting - Network Service Switch
Collecting - OS Packages
Collecting - OS version
Collecting - Operating system release information and kernel version
Collecting - Oracle Executable Attributes
Collecting - Patches for Grid Infrastructure
Collecting - Patches for RDBMS Home
Collecting - Shared memory segments
Collecting - Table of file system defaults
Collecting - Verify ioctl to advm [ACFS]
Collecting - Voting disks (clusterware)
Collecting - number of semaphore operations per semop system call
Preparing to run root privileged commands rac1.
Collecting - ACFS and ASM driver version comparison [ACFS]
Collecting - CRS user time zone check
Collecting - Custom rc init scripts (rc.local)
Collecting - Disk Information
Collecting - Generic ACFS health [ACFS]
Collecting - Grid Infastructure user shell limits configuration
Collecting - Health of the mounted ACFS file systems [ACFS]
Collecting - Health of unmounted ACFS file systems [ACFS]
Collecting - Interconnect interface config
Collecting - Network interface stats
Collecting - Number of RDBMS LMS running in real time
Collecting - OCFS2 disks
Collecting - OLR Integrity
Collecting - Volume list for unmount ACFS file system [ACFS]
Collecting - ocsf status
Collecting - root time zone check
Data collections completed. Checking best practices on rac1.
--------------------------------------------------------------------------------------
WARNING => SYS.AUDSES$ sequence cache size < 10,000 for racdb
WARNING => Without ARCHIVELOG mode the database cannot be recovered from an online backup and Data Guard cannot be used. for racdb
WARNING => OCR is NOT being backed up daily
INFO => At some times checkpoints are not being completed for racdb
WARNING => Controlfile is NOT multiplexed for racdb
WARNING => One or more redo log groups are NOT multiplexed for racdb
WARNING => /tmp is NOT on a dedicated filesystem
WARNING => Linux Swap Configuration does NOT meet Recommendation
INFO => Number of SCAN listeners is NOT equal to the recommended number of 3.
WARNING => NIC bonding is not configured for interconnect
WARNING => NIC bonding is NOT configured for public network (VIP)
WARNING => OSWatcher is not running as is recommended.
INFO => Jumbo frames (MTU >= 8192) are not configured for interconnect
WARNING => NTP is not running with correct setting
WARNING => Database parameter DB_BLOCK_CHECKING on PRIMARY is NOT set to the recommended value. for racdb
FAIL => Flashback on PRIMARY is not configured for racdb
INFO => Operational Best Practices
INFO => Database Consolidation Best Practices
INFO => Computer failure prevention best practices
INFO => Data corruption prevention best practices
INFO => Logical corruption prevention best practices
INFO => Database/Cluster/Site failure prevention best practices
INFO => Client failover operational best practices
WARNING => fast_start_mttr_target should be greater than or equal to 300. on racdb1 instance
INFO => IMPORTANT: Oracle Database Patch 17478514 PSU is NOT applied to RDBMS Home /home/oracle/11gR2/db_1
INFO => Information about hanganalyze and systemstate dump
FAIL => Table AUD$[FGA_LOG$] should use Automatic Segment Space Management for racdb
INFO => Database failure prevention best practices
WARNING => Database Archivelog Mode should be set to ARCHIVELOG for racdb
FAIL => Primary database is NOT protected with Data Guard (standby database) for real-time data protection and availability for racdb
WARNING => avahi-daemon process is running
WARNING => Redo log write time is more than 500 milliseconds for racdb
INFO => Parallel Execution Health-Checks and Diagnostics Reports for racdb
INFO => Oracle recovery manager(rman) best practices
WARNING => RMAN controlfile autobackup should be set to ON for racdb
INFO => Consider increasing the COREDUMPSIZE size
INFO => Consider investigating changes to the schema objects such as DDLs or new object creation for racdb
Copying results from rac2 and generating report. This might take a while. Be patient.
=============================================================
Node name - rac2
=============================================================
Collecting - /proc/cmdline
Collecting - /proc/modules
Collecting - CPU Information
Collecting - CRS active version
Collecting - CRS oifcfg
Collecting - CRS software version
Collecting - Cluster interconnect (clusterware)
Collecting - DiskFree Information
Collecting - DiskMount Information
Collecting - Huge pages configuration
Collecting - Kernel parameters
Collecting - Linux module config.
Collecting - Maximum number of semaphore sets on system
Collecting - Maximum number of semaphores on system
Collecting - Maximum number of semaphores per semaphore set
Collecting - Memory Information
Collecting - NUMA Configuration
Collecting - Network Interface Configuration
Collecting - Network Performance
Collecting - Network Service Switch
Collecting - OS Packages
Collecting - OS version
Collecting - Operating system release information and kernel version
Collecting - Oracle Executable Attributes
Collecting - Patches for Grid Infrastructure
Collecting - Patches for RDBMS Home
Collecting - Shared memory segments
Collecting - Table of file system defaults
Collecting - Verify ioctl to advm [ACFS]
Collecting - number of semaphore operations per semop system call
Preparing to run root privileged commands rac2.
Collecting - ACFS and ASM driver version comparison [ACFS]
Collecting - CRS user time zone check
Collecting - Disk Information
Collecting - Generic ACFS health [ACFS]
Collecting - Grid Infastructure user shell limits configuration
Collecting - Health of the mounted ACFS file systems [ACFS]
Collecting - Health of unmounted ACFS file systems [ACFS]
Collecting - Interconnect interface config
Collecting - Network interface stats
Collecting - Number of RDBMS LMS running in real time
Collecting - OCFS2 disks
Collecting - OLR Integrity
Collecting - Volume list for unmount ACFS file system [ACFS]
Collecting - ocsf status
Collecting - root time zone check
Data collections completed. Checking best practices on rac2.
--------------------------------------------------------------------------------------
WARNING => /tmp is NOT on a dedicated filesystem
WARNING => Linux Swap Configuration does NOT meet Recommendation
INFO => Number of SCAN listeners is NOT equal to the recommended number of 3.
WARNING => NIC bonding is not configured for interconnect
WARNING => NIC bonding is NOT configured for public network (VIP)
WARNING => OSWatcher is not running as is recommended.
INFO => Jumbo frames (MTU >= 8192) are not configured for interconnect
WARNING => NTP is not running with correct setting
WARNING => Database parameter DB_BLOCK_CHECKING on PRIMARY is NOT set to the recommended value. for racdb
WARNING => fast_start_mttr_target should be greater than or equal to 300. on racdb2 instance
INFO => IMPORTANT: Oracle Database Patch 17478514 PSU is NOT applied to RDBMS Home /home/oracle/11gR2/db_1
WARNING => ezconnect should be configured in sqlnet.ora
WARNING => avahi-daemon process is running
WARNING => Redo log write time is more than 500 milliseconds for racdb
INFO => Consider increasing the COREDUMPSIZE size
---------------------------------------------------------------------------------
CLUSTERWIDE CHECKS
---------------------------------------------------------------------------------
WARNING => OS Kernel version(uname -r) does not match across cluster.
---------------------------------------------------------------------------------
Detailed report (html) - /home/oracle/orachk_rac1_racdb_081814_152310/orachk_rac1_racdb_081814_152310.html
UPLOAD(if required) - /home/oracle/orachk_rac1_racdb_081814_152310.zip
[oracle@rac1 ~]$ ls -ltr
total 36284
drwxr-xr-x 7 root root 4096 Aug 28 2013 database
-rwxr-xr-x 1 oracle oinstall 1604239 May 31 14:37 orachk
-rw-r--r-- 1 oracle oinstall 432 May 31 14:37 UserGuide.txt
-rw-r--r-- 1 oracle oinstall 3879 May 31 14:37 readme.txt
-rwxr-xr-x 1 oracle oinstall 1604239 May 31 14:37 raccheck
-rw-rw-r-- 1 oracle oinstall 3384097 May 31 14:37 rules.dat
-rw-rw-r-- 1 oracle oinstall 22951324 May 31 14:37 collections.dat
drwxr-xr-x 3 oracle oinstall 4096 Aug 14 11:34 11gR2
drwxrwxr-x 11 oracle oinstall 4096 Aug 14 11:52 diag
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 12:17 checkpoints
drwxr-x--- 3 oracle oinstall 4096 Aug 14 12:43 admin
drwxr-x--- 6 oracle oinstall 4096 Aug 14 13:06 cfgtoollogs
-rw-r--r-- 1 root root 5770368 Aug 18 15:18 orachk.zip
drwxr-xr-x 7 oracle oinstall 94208 Aug 18 15:38 orachk_rac1_racdb_081814_152310
-rw-r--r-- 1 oracle oinstall 1639658 Aug 18 15:38 orachk_rac1_racdb_081814_152310.zip
本文转自ICT时空 dbasdk博客,原文链接:ORAchk-数据库健康检查,如需转载请自行联系原博主。