Exadata环境巡检需要执行专有的exachk,而普通Oracle环境可以通过执行orachk来检查集群和数据库相关健康状况。

1.使用orachk检查健康状态

使用root用户执行,期间可能需要多次输入另外节点的root密码,准备好密码正确输入即可:

[root@db01rac1 ~]# orachk
This version of AHF is older than 180 days and you should upgrade AHF using ahfctl upgrade. Clusterware stack is running from /u01/app/19.3.0/grid. Is this the correct Clusterware Home?[y/n][y]
root@db01rac2's password:
root@db01rac2's password: Searching for running databases . . . . . . .
List of running databases registered in OCR 1. demorac
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].
. . . . . . Either Cluster Verification Utility pack (cvupack) does not exist at /opt/oracle.ahf/common/cvu or it is an old or invalid cvupack Checking Cluster Verification Utility (CVU) version at CRS Home - /u01/app/19.3.0/grid This version of Cluster Verification Utility (CVU) was released on 10-Jul-2022 and it is older than 180 days. It is highly recommended that you download the latest version of CVU from MOS patch 30839369 to ensure the highest level of accuracy of the data contained within the report Do you want to download latest version of Cluster Verification Utility (CVU) from my oracle support? [y/n] [y] n Running older version of Cluster Verification Utility (CVU) from CRS Home - /u01/app/19.3.0/grid Starting to run orachk in background on db01rac2 using socket
root@db01rac2's password:
root@db01rac2's password:
This version of AHF is older than 180 days and you should upgrade AHF using ahfctl upgrade. .
. . . .
. . Checking Status of Oracle Software Stack - Clusterware, ASM, RDBMS on db01rac1 . . . . . .
. . . . . . . . . . . . .
-------------------------------------------------------------------------------------------------------
Oracle Stack Status
-------------------------------------------------------------------------------------------------------
Host Name CRS Installed RDBMS Installed CRS UP ASM UP RDBMS UP DB Instance Name
-------------------------------------------------------------------------------------------------------
db01rac1 Yes Yes Yes Yes Yes jydb1
-------------------------------------------------------------------------------------------------------
.
. . . . . . .
.
.
. . *** Checking Best Practice Recommendations ( Pass / Warning / Fail ) *** . Collections and audit checks log file is
/u01/app/grid/oracle.ahf/data/db01rac1/orachk/user_root/output/orachk_db01rac1_demorac_040623_234130/log/orachk.log ============================================================
Node name - db01rac1
============================================================
. . . . . . Collecting - ASM Disk Groups
Collecting - ASM Disk I/O stats
Collecting - ASM Diskgroup Attributes
Collecting - ASM disk partnership imbalance
Collecting - ASM diskgroup attributes
Collecting - ASM diskgroup usable free space
Collecting - ASM initialization parameters
Collecting - Database Parameters for demorac database
Collecting - Files not opened by ASM
Collecting - List of active logon and logoff triggers for demorac database
Collecting - Percentage of asm disk Imbalance
Collecting - Testing
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 - Cluster interconnect (clusterware)
Collecting - Clusterware OCR healthcheck
Collecting - Clusterware Resource Status
Collecting - Disk I/O Scheduler on Linux
Collecting - DiskFree Information
Collecting - DiskMount Information
Collecting - Huge pages configuration
Collecting - Interconnect network card speed
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 - RDBMS and GRID software owner UID across cluster
Collecting - Shared memory segments
Collecting - Table of file system defaults
Collecting - Voting disks (clusterware)
Collecting - number of semaphore operations per semop system call
Collecting - CHMAnalyzer to report potential Operating system resources usage
Collecting - CRS Opatch version
Collecting - CRS user time zone check
Collecting - Custom rc init scripts (rc.local)
Collecting - Disk Information
Collecting - Grid Infastructure user shell limits configuration
Collecting - Interconnect interface config
Collecting - Network interface stats
Collecting - Root user limits
Collecting - Verify ORAchk scheduler configuration
Collecting - Verify TCP Selective Acknowledgement is enabled
Collecting - Verify no database server kernel out of memory errors
Collecting - Verify the vm.min_free_kbytes configuration
Collecting - root time zone check
Collecting - slabinfo
Collecting - umask setting for GI owner Data collections completed. Checking best practices on db01rac1.
------------------------------------------------------------ INFO => Important Automatic Storage Management (ASM) Notes and Technical White Papers
INFO => Oracle Data Pump Best practices.
WARNING => Linux swap configuration does not meet recommendation
INFO => Most recent ADR incidents for /u01/app/oracle/product/19.3.0/db_1
INFO => Oracle GoldenGate failure prevention best practices
WARNING => OCR and OCR backup locations are the same path
FAIL => The vm.min_free_kbytes configuration is not set as recommended
CRITICAL => The RMAN snapshot control file location is not shared on all database nodes in the cluster for demorac
INFO => $CRS_HOME/log/hostname/client directory has too many older log files.
CRITICAL => ORAchk scheduler is not configured correctly
WARNING => Package compat-libstdc++-33-3.2.3-61-x86_64 is recommended but not installed
INFO => Important Storage Minimum Requirements for Grid & Database Homes
CRITICAL => Operating system hugepages count does not satisfy total SGA requirements
WARNING => NIC bonding is not configured for interconnect
WARNING => NIC bonding is NOT configured for public network (VIP)
WARNING => RAC interconnect network card speed does not meet recommendation
INFO => Cluster health analyzer (CHA) is not configured as recommended
FAIL => system service rngd is not running
WARNING => OSWatcher is not running as is recommended.
INFO => Jumbo frames (MTU >= 9000) are not configured for interconnect
WARNING => NTP is not running with correct setting
WARNING => All disk groups should have compatible.rdbms attribute set to recommended values
WARNING => All disk groups should have compatible.advm attribute set to recommended values
FAIL => Database parameter DB_LOST_WRITE_PROTECT is not set to recommended value on jydb1 instance
FAIL => Database parameter DB_BLOCK_CHECKING on STANDBY is NOT set to the recommended value. for demorac
FAIL => Flashback on STANDBY is not configured for demorac
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 jydb1 instance
FAIL => Standby redo logs should be configured on the standby for demorac
WARNING => Oracle patch 26749785 is not applied on RDBMS_HOME /u01/app/oracle/product/19.3.0/db_1
WARNING => Oracle patch 29259068 is not applied on RDBMS_HOME /u01/app/oracle/product/19.3.0/db_1
INFO => Information about hanganalyze and systemstate dump
FAIL => Database control files are not configured as recommended for demorac
WARNING => Oracle patch 28907129 is not applied on RDBMS_HOME /u01/app/oracle/product/19.3.0/db_1
INFO => While initialization parameter LOG_ARCHIVE_CONFIG is set it should be verified for your environment on Standby Database for demorac
WARNING => Redo log files should be appropriately sized for demorac
INFO => Database failure prevention best practices
WARNING => Perl Patch 33912872 is not found in 19c RDBMS_HOME. /u01/app/oracle/product/19.3.0/db_1
WARNING => Perl Patch 33912872 is not found in 19c CRS_HOME. /u01/app/19.3.0/grid
WARNING => Oracle patch 32043701 is not applied on RDBMS_HOME /u01/app/oracle/product/19.3.0/db_1
WARNING => Oracle patch 31211220 is not applied on RDBMS_HOME /u01/app/oracle/product/19.3.0/db_1
WARNING => TFA Collector is either not installed or not running
CRITICAL => Linux transparent huge pages are enabled
FAIL => Listener(s) running under GI Home are not healthy
FAIL => FRA space management problem file types are present without an RMAN backup completion within the last 7 days for demorac
INFO => Oracle recovery manager(rman) best practices
INFO => Database feature usage statistics for demorac
WARNING => Linux Disk I/O Scheduler should be configured to Deadline ------------------------------------------------------------
CLUSTERWIDE CHECKS
------------------------------------------------------------ ------------------------------------------------------------
Detailed report (html) - /u01/app/grid/oracle.ahf/data/db01rac1/orachk/user_root/output/orachk_db01rac1_demorac_040623_234130/orachk_db01rac1_demorac_040623_234130.html
root@db01rac2's password:
root@db01rac2's password: UPLOAD [if required] - /u01/app/grid/oracle.ahf/data/db01rac1/orachk/user_root/output/orachk_db01rac1_demorac_040623_234130.zip

2.拷贝结果文件

orachk执行完成之后,会在最后提示你,具体生成了哪些相关文件,供你进一步分析。

可以看到,生成的完整压缩包有100多M,如果用户环境传输大文件困难,其实也可以只拷贝html报告结果(这里有30M,压缩完只有7M不到):

[root@db01rac1 ~]# ls -lrth /u01/app/grid/oracle.ahf/data/db01rac1/orachk/user_root/output/orachk_db01rac1_demorac_040623_234130.zip
-r--r----- 1 root root 111M Apr 6 23:53 /u01/app/grid/oracle.ahf/data/db01rac1/orachk/user_root/output/orachk_db01rac1_demorac_040623_234130.zip
[root@db01rac1 ~]# ls -lrth /u01/app/grid/oracle.ahf/data/db01rac1/orachk/user_root/output/orachk_db01rac1_demorac_040623_234130/orachk_db01rac1_demorac_040623_234130.html
-rw-r----- 1 root dba 30M Apr 6 23:53 /u01/app/grid/oracle.ahf/data/db01rac1/orachk/user_root/output/orachk_db01rac1_demorac_040623_234130/orachk_db01rac1_demorac_040623_234130.html
[root@db01rac1 ~]#
[root@db01rac1 ~]# cp /u01/app/grid/oracle.ahf/data/db01rac1/orachk/user_root/output/orachk_db01rac1_demorac_040623_234130/orachk_db01rac1_demorac_040623_234130.html /tmp/
[root@db01rac1 ~]# cd /tmp
[root@db01rac1 tmp]# ls -lrth orachk_db01rac1_demorac_040623_234130.html
-rw-r----- 1 root root 30M Apr 7 00:07 orachk_db01rac1_demorac_040623_234130.html
[root@db01rac1 tmp]# tar zcvf orachk_db01rac1_demorac_040623_234130.tar.gz orachk_db01rac1_demorac_040623_234130.html
orachk_db01rac1_demorac_040623_234130.html
[root@db01rac1 tmp]# ls -lrth orachk_db01rac1_demorac_040623_234130*
-rw-r----- 1 root root 30M Apr 7 00:07 orachk_db01rac1_demorac_040623_234130.html
-rw-r--r-- 1 root root 6.5M Apr 7 00:08 orachk_db01rac1_demorac_040623_234130.tar.gz
[root@db01rac1 tmp]# cp orachk_db01rac1_demorac_040623_234130.tar.gz /public/

3.分析生成的html报告

报告类似如下,实际报告内容很多,html展示也很清晰,这里只截取部分文字内容示例:

Oracle RAC Assessment Report
System Health Score is 88 out of 100 (detail) OS Check Linux transparent huge pages are enabled All Database Servers OS Check Operating system hugepages count does not satisfy total SGA requirements All Database Servers Database Check The RMAN snapshot control file location is not shared on all database nodes in the cluster All Databases View
...

执行orachk检查数据库环境的更多相关文章

  1. oracle执行先决条件检查失败的解决方法

    在安装oracle 11g时,出现执行先决条件失败的情况如下: 你可以忽略所有强制安装,一般不会影响功能,但如果你想知道为什么会产生这种错误, 并且当出现以上情况时又该如何解决呢?如下列出了原因和解决 ...

  2. oracle 11g 执行先决条件检查失败的解决方法

    在安装oracle 11g时,出现执行先决条件失败的情况如下: 你可以忽略所有强制安装,一般不会影响功能,但如果你想知道为什么会产生这种错误, 并且当出现以上情况时又该如何解决呢?如下列出了原因和解决 ...

  3. mySQL数据库Sql语句执行效率检查--Explain命令

    mysql性能的检查和调优方法 Explain命令在解决数据库性能上是第一推荐使用命令,大部分的性能问题可以通过此命令来简单的解决,Explain可以用来查看SQL语句的执行效 果,可以帮助选择更好的 ...

  4. 数据库日常维护-CheckList_01历史Agent Job执行情况检查

    检查Agent Job中日常维护作业或业务作业是否成功,如每天的备份.碎片整理.索引维护.历史备份文件清除等,可利用SSMS工具,通过CDC下面设置好的DB Server List,运行下面脚本一次, ...

  5. Jenkins远程代码执行漏洞检查(CVE-2017-1000353)

    Jenkins的反序列化漏洞,攻击者使用该漏洞可以在被攻击服务器执行任意代码,漏洞利用不需要任何的权限 漏洞影响范围: 所有Jenkins主版本均受到影响(包括<=2.56版本)所有Jenkin ...

  6. 无法执行磁盘检查因为windows无法访问

    固态硬盘迁移系统后,将原先的系统盘(H,重新系统后固态硬盘的主分区变为了C盘)格式化,并和邻近的D盘合并.合并后,将盘符重新改为D盘,而D盘原有的软件安装目录Program Files无法识别,显示目 ...

  7. 用ORACHK自己主动化检查数据库系统的健壮性

    1.orachk工具主要用途 (1)主动检查您的整个软件在操作系统.CRS.数据库.高可用等层面中的严重问题,以便于IT部门整改,提升系统的稳定性 (2)对于您系统中存在的风险提供简单化和合理化的诊断 ...

  8. 使用Oracle官方巡检工具ORAchk巡检数据库

    ORAchk概述 ORAchk是Oracle官方出品的Oracle产品健康检查工具,可以从MOS(My Oracle Support)网站上下载,免费使用.这个工具可以检查Oracle数据库,Gold ...

  9. ORAchk-数据库健康检查好帮手

    ORAchk 之前被称为RACcheck,后来它的检查范围进行了扩展,改名为了ORAchk,它是在数据库系统进行健康检查的一个专用工具,这个工具主要用来检查软件的配置是否符合要求以及一些最佳实践是否被 ...

  10. mysql命令行创建存储过程命令行定时执行sql语句

    mysql -uroot -p show databases; use scm; show tables; show procedure status; 其他命令: SHOW VARIABLES LI ...

随机推荐

  1. 《深入理解计算机系统》(CSAPP)实验四 —— Attack Lab

    这是CSAPP的第四个实验,这个实验比较有意思,也比较难.通过这个实验我们可以更加熟悉GDB的使用和机器代码的栈和参数传递机制. @ 目录 实验目的 准备工作 内容简介 代码注入攻击 Level 1 ...

  2. 《模拟龙生》|500行Go代码写一个随机冒险游戏|巨龙修为挑战开启

    一.前言 新年就要到了,祝大家新的一年: 龙行龘龘, 前程朤朤! 白泽花了点时间,用 500行 Go 代码写了一个控制台的小游戏:<模拟龙生>,在游戏中你将模拟一条新生的巨龙,开始无尽的冒 ...

  3. freeswitch xml_rpc模块

    概述 freeswitch有非常多的周边模块,给我们提供各种各样的功能,有些功能在适当的场景下可以极大的方便我们的开发和应用. 今天我们介绍一个不常用的模块mod_xml_rpc. freeswitc ...

  4. 容器网络原理分析:veth 和 network namespace

    1. Liunx veth-pair 和 network namespace Docker 中容器的访问需要依赖 veth-pair 和 network namespace 等技术.network n ...

  5. 基于java+springboot的图书借阅网站-在线图书借阅管理系统

    该系统是基于java+springboot开发的图书借阅管理系统.是给师弟开发的课程作业.大家学习过程中,遇到问题可以github咨询作者. 系统演示地址 前台 http://book.gitapp. ...

  6. 非标准库--conio.h库

    1.getch函数 主要内容 int getch(void): 所在头文件:conio.h 函数用途:从控制台读取一个字符,但不显示在屏幕上,即一个不需要通过ENTER确定的getchar. 函数原型 ...

  7. 第二届福州大学至诚学院网络安全大赛G0DCTF Misc WP

    MISC baby_misc 1.题目信息 key文件夹: 还有一张图片 2.解题方法 观察key文件夹里的每个文件信息,发现并无什么有用的,甚至有的为空... 看到文件名称的数字而且还给了图片,可以 ...

  8. IL合集二

    引言 在第一篇关于IL的文章中,我们写了一些IL的相加,创建对象,循环以及实现TryCatch的一些功能,接下来,为大家带上后续关于IL的更新,其中包括,类型转换,以及条件判断,还有定义字段,定义属性 ...

  9. 使用阿里canal实现mysql与Elasticsearch增量同步

    一.背景介绍 最近在做一个地理信息相关的项目,需要维护大量的地址描述数据,同时需要提供对数据检索的功能,准备采用Elasticsearch(6.7)实现.那么问题就来了,地址数据需要同时在MySQL和 ...

  10. [转帖]5 分钟学会写一个自己的 Prometheus Exporter

    https://cloud.tencent.com/developer/article/1520621学习一下怎么搭建呢.   去年底我写了一个阿里云云监控的 Prometheus Exporter, ...