1、目的很单纯 ——> 简化巡检工作
2、可以做成分发脚本进行批量巡检
3、生成HTML文件方便查看
4、生成的报告中包含修改建议
5、操作方法:
上传脚本 >> 解压脚本 >> 执行sh脚本 >> 下载报告
(RAC环境在一个节点上执行即可)
[oracle@centos610:/home/oracle/work]$ rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring ora_dbchk.zip...
100% 49 KB 49 KB/sec 00:00:01 0 Errors
[oracle@centos610:/home/oracle/work]$ unzip ora_dbchk.zip
Archive: ora_dbchk.zip
inflating: dbchk_node1.sh
inflating: oracle_dbchk_v3.3_utf8.sql
[oracle@centos610:/home/oracle/work]$ sh +x dbchk_node1.sh
+-----------------------------------------------------------------------+
| Oracle Database Health Check |
+-----------------------------------------------------------------------+
Run this script need the user have sysdba authority.
please wait for a minute.
The script is collecting some message,please wait for a minute...........
5% Collect Database Instance Information......
10% Collect Database Storage Information......
20% Collect Database Backup Information......
30% Collect Database Memory Information......
45% Collect Database Objects Information......
60% Collect Database Session Information......
70% Collect Operating Accout Information.....
85% Collect Operating DataGuard Information.....
100% Complete.
Output written to: ODBChk_centos610_test_NoCDB_20241101.html
Creating database report complete!
Start get os informaton!
/app/oracle/diag/rdbms/test/TEST/trace
define num_days=1;
define report_type="html";
define dbid=2476531108
define inst_num=1
define report_name=./awrrpt_top_TEST1.html;
define begin_snap=1505
define end_snap=1506
@?/rdbms/admin/awrrpti.sql;
......
此外AWR生成过程省略
......
Report written to ./awrrpt_top_TEST1.html
[oracle@centos610:/home/oracle/work]$ ll
total 1248
-rw-r--r-- 1 oracle oinstall 488444 Nov 1 11:03 awrrpt_top_TEST1.html
-rw-r--r-- 1 oracle oinstall 8743 Jun 29 2023 dbchk_node1.sh
-rw-r--r-- 1 oracle oinstall 163473 Nov 1 11:03 ODBChk_centos610_test_NoCDB_20241101.html
-rw-r--r-- 1 oracle oinstall 312020 May 31 2023 oracle_dbchk_v3.3_utf8.sql
-rw-r--r-- 1 oracle oinstall 50227 Nov 1 10:46 ora_dbchk.zip
-rw-r--r-- 1 oracle oinstall 239101 Nov 1 11:03 os_check_centos610_202411011103.txt
[oracle@centos610:/home/oracle/work]$ sz ODBChk_centos610_test_NoCDB_20241101.html
rz
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring ODBChk_centos610_test_NoCDB_20241101.html...
100% 159 KB 159 KB/sec 00:00:01 0 Errors
最后修改时间:2024-11-01 14:37:04
文章转载自楚枫默寒,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




