|
oracheck来源于Oracle为RAC环境准备的工具raccheck。
oracheck是需要单独从MOS上下载的工具包。和其他Oracle产品不同,oracheck更新速度非常快,官方建议是90天就需要下载最新的oracheck版本。
这样做的目的就是让用户可以获得最新的检查项目和建议,及时下载安装最新的安全补丁。
贴上下载地址:
https://support.oracle.com/epmos ... l-state=7zuzpudjx_4
下面简单介绍一下,oracheck工具的使用
(1)上传包到服务器
[root@rac1 oracheck]# ll
total 257500
-rw-r--r--. 1 root root 263673609 Jan 25 15:33 orachk.zip
(2)解压
[root@rac1 oracheck]# unzip orachk.zip
解压过程略
(3)将目录授权给oracle用户
[root@rac1 oracle]# chown -R oracle:dba oracheck/
[root@rac1 oracle]# su - oracle
cd [oracle@rac1 ~]$ cd /oracle/oracheck/
[oracle@rac1 oracheck]$ ll
total 325368
-r--r-----. 1 oracle dba 8233480 Dec 13 01:42 Apex5_CollectionManager_App.sql
drwxr-x---. 2 oracle dba 4096 Dec 13 01:41 bash
drwxr-x---. 3 oracle dba 4096 Jan 25 15:37 build
-r--r-----. 1 oracle dba 2958609 Dec 13 01:42 CollectionManager_App.sql
-r--r-----. 1 oracle dba 49352682 Dec 13 01:03 collections.dat
drwxr-xr-x. 2 oracle dba 4096 Jan 25 15:36 doc
drwxr-x---. 2 oracle dba 4096 Dec 13 05:31 exadiscover
drwxr-x---. 3 oracle dba 4096 Dec 13 05:31 lib
-rwxr-x---. 1 oracle dba 11063 Dec 13 05:31 orachk
-r-xr-x---. 1 oracle dba 5665 Dec 13 01:41 orachk.bat
-rw-r--r--. 1 oracle dba 2296616 Dec 13 05:45 ORAchk_Health_Check_Catalog.html
-r--r-----. 1 oracle dba 109317 Dec 13 01:41 orachk.pyc
-rw-r--r--. 1 oracle dba 263673609 Jan 25 15:33 orachk.zip
-rw-r--r--. 1 oracle dba 10105 Dec 13 05:45 readme.txt
-r--r-----. 1 oracle dba 6424905 Dec 13 01:03 rules.dat
-r--r-----. 1 oracle dba 40052 Dec 13 01:42 sample_user_defined_checks.xml
drwxr-x---. 2 oracle dba 4096 Dec 13 05:31 templates
-r--r-----. 1 oracle dba 2888 Dec 13 01:42 user_defined_checks.xsd
-rw-r--r--. 1 oracle dba 230 Dec 13 05:45 UserGuide.txt
orachk工具有很多参数,可通过-h选项查看
[oracle@rac1 oracheck]$ ./orachk -h
| -S
| -a
| -acchk
| -allserial
| -appjar
| -apptrc
| -asmhome
| -auto_restart
| -b
| -baseline
| -c
| -cells
| -cellserial
| -celltmpdir
.................
.................
(4)运行orachk工具对服务器进行检查
ps:如果是rac环境,那么在运行过程中,也会对其他节点进行检查,因此只在一个节点运行即可。
[oracle@rac1 oracheck]$ ./orachk
CRS stack is running and CRS_HOME is not set. Do you want to set CRS_HOME to /oracle/app/11.2.0/grid?[y/n][y] y
Checking ssh user equivalency settings on all nodes in cluster for oracle
Node rac2 is configured for ssh user equivalency for oracle user
Searching for running databases . . . . .
. .
List of running databases registered in OCR
1. orcl
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 RDBMS Installed CRS UP ASM UP RDBMS UP DB Instance Name
-------------------------------------------------------------------------------------------------------
rac1 Yes Yes Yes Yes Yes orcl1
rac2 Yes Yes Yes Yes No
-------------------------------------------------------------------------------------------------------
.............
.............
.............
Clusterware patches summary report
--------------------------------------------------------------------------------
Total patches Applied on CRS Applied on RDBMS Applied on ASM
--------------------------------------------------------------------------------
1 0 0 0
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
RDBMS homes patches summary report
--------------------------------------------------------------------------------
Total patches Applied on RDBMS Applied on ASM ORACLE_HOME
--------------------------------------------------------------------------------
1 2 0 /oracle/app/oracle/product/11.2.0/db
--------------------------------------------------------------------------------
------------------------------------------------------------
CLUSTERWIDE CHECKS
------------------------------------------------------------
------------------------------------------------------------
Detailed report (html) - /oracle/oracheck/orachk_rac1_orcl_012518_163134/orachk_rac1_orcl_012518_163134.html
UPLOAD [if required] - /oracle/oracheck/orachk_rac1_orcl_012518_163134.zip
|
|