ORAchk-数据库健康检查

简介:

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

  1. racdb
  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-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.

  1. Enter 1 if you will enter root password for each host when prompted
  2. Enter 2 if you have sudo configured for oracle user to execute root_orachk.sh script
  3. Enter 3 to skip the root privileged collections
  4. 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-数据库健康检查,如需转载请自行联系原博主。

相关文章
|
SQL Oracle 关系型数据库
Oracle 数据库日常健康检查脚本
检查数据库和online logfile的大小 —执行一下这3个SQL,把结果贴出来,看看数据库大小和log的切换频率。
219 0
|
Oracle 关系型数据库 Unix
ORAchk-数据库健康检查
ORAchk-数据库健康检查  原文地址:ORAchk-数据库健康检查 作者:paulyibinyi ORAchk 之前被称为RACcheck,后来它的检查范围进行了扩展,改名为了ORAchk,它是在数据库系统进行健康检查的一个专用工具,这个工具主要用来检查软件的配置是否符合要求以及一些最佳实践是否被应用了。
3050 0
|
26天前
|
SQL 关系型数据库 MySQL
12 PHP配置数据库MySQL
路老师分享了PHP操作MySQL数据库的方法,包括安装并连接MySQL服务器、选择数据库、执行SQL语句(如插入、更新、删除和查询),以及将结果集返回到数组。通过具体示例代码,详细介绍了每一步的操作流程,帮助读者快速入门PHP与MySQL的交互。
34 1
|
28天前
|
SQL 关系型数据库 MySQL
go语言数据库中mysql驱动安装
【11月更文挑战第2天】
39 4
|
2月前
|
存储 关系型数据库 MySQL
Mysql(4)—数据库索引
数据库索引是用于提高数据检索效率的数据结构,类似于书籍中的索引。它允许用户快速找到数据,而无需扫描整个表。MySQL中的索引可以显著提升查询速度,使数据库操作更加高效。索引的发展经历了从无索引、简单索引到B-树、哈希索引、位图索引、全文索引等多个阶段。
69 3
Mysql(4)—数据库索引
|
1月前
|
监控 关系型数据库 MySQL
数据库优化:MySQL索引策略与查询性能调优实战
【10月更文挑战第27天】本文深入探讨了MySQL的索引策略和查询性能调优技巧。通过介绍B-Tree索引、哈希索引和全文索引等不同类型,以及如何创建和维护索引,结合实战案例分析查询执行计划,帮助读者掌握提升查询性能的方法。定期优化索引和调整查询语句是提高数据库性能的关键。
191 1
|
1月前
|
关系型数据库 MySQL Linux
在 CentOS 7 中通过编译源码方式安装 MySQL 数据库的详细步骤,包括准备工作、下载源码、编译安装、配置 MySQL 服务、登录设置等。
本文介绍了在 CentOS 7 中通过编译源码方式安装 MySQL 数据库的详细步骤,包括准备工作、下载源码、编译安装、配置 MySQL 服务、登录设置等。同时,文章还对比了编译源码安装与使用 RPM 包安装的优缺点,帮助读者根据需求选择最合适的方法。通过具体案例,展示了编译源码安装的灵活性和定制性。
98 2
|
1月前
|
存储 关系型数据库 MySQL
MySQL vs. PostgreSQL:选择适合你的开源数据库
在众多开源数据库中,MySQL和PostgreSQL无疑是最受欢迎的两个。它们都有着强大的功能、广泛的社区支持和丰富的生态系统。然而,它们在设计理念、性能特点、功能特性等方面存在着显著的差异。本文将从这三个方面对MySQL和PostgreSQL进行比较,以帮助您选择更适合您需求的开源数据库。
137 4
|
23天前
|
运维 关系型数据库 MySQL
安装MySQL8数据库
本文介绍了MySQL的不同版本及其特点,并详细描述了如何通过Yum源安装MySQL 8.4社区版,包括配置Yum源、安装MySQL、启动服务、设置开机自启动、修改root用户密码以及设置远程登录等步骤。最后还提供了测试连接的方法。适用于初学者和运维人员。
142 0
|
2月前
|
存储 关系型数据库 MySQL
如何在MySQL中创建数据库?
【10月更文挑战第16天】如何在MySQL中创建数据库?