oracle_RAC数据库日常巡检工作一下六步骤。
1、 检查操作系统本地磁盘空间(主要查看操作系统/的空间使用情况,超过70%要注意。)
2、 检查Oracle数据库RAC集群服务状态
除了ora.gsd服务状态为OFFLINE,其他的服务正常状态均为ONLINE。
3、 检查数据库表空间使用情况,少了要及时添加。
切换到Oracle操作系统用户: su - oracle,并使用sqlplus 登陆到数据库:sqlplus / as sysdba,
然后执行查询语句。
4、 检查Oracle RAC集群ASM存储空间使用情况。
切换到集群软件用户: su – grid,执行命令:asmcmd lsdg
5、 检查数据库警告日志信息
可以在数据库中查看警告日志位置:
查看数据库警告日志信息是否有错误信息:
使用命令: cat /u01/app/oracle/diag/rdbms/hisdb/hisdb1/trace/alert_hisdb1.log|grep ORA-
图片.png
例如:
上面查看警告日志中存在WARNING类警告信息,此类警告信息对数据库及业务都无影响。此处的WARNING警告信息表示为网络连接超时信息。
6查看本地备份情况(每天晚上8点开始本地全库备份,保留最近7天)
一般巡检以上6步骤。
深大总医院Oracle数据库维护sop
ORACLE RAC运行状态相关查看
a)查看集群状态
crs_stat -t (crsctl check cluster -all)
b)查看节点软件运行状态
[grid@hisdb01 ~]$ srvctl status nodeapps
VIP hisdb01-vip is enabled
VIP hisdb01-vip is running on node: hisdb01
VIP hisdb02-vip is enabled
VIP hisdb02-vip is running on node: hisdb02
Network is enabled
Network is running on node: hisdb01
Network is running on node: hisdb02
GSD is disabled
GSD is not running on node: hisdb01
GSD is not running on node: hisdb02
ONS is enabled
ONS daemon is running on node: hisdb01
ONS daemon is running on node: hisdb02
c)查看ASM运行状态
[grid@hisdb01 ~]$ srvctl status asm
ASM is running on hisdb01,hisdb02
d)查看监听运行状态
[grid@hisdb01 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): hisdb01,hisdb02
e)查看数据库在各节点运行状态
[grid@hisdb01 ~]$ srvctl status database -d hisdb —hisdb为db_unique_name
Instance hisdb1 is running on node hisdb01
Instance hisdb2 is running on node hisdb02
查看Oracle 核心进程(之一):
ps -ef|grep pmon|grep -v grep
通过告警日志查看数据库运作情况:
oracle rac数据库,检查数据库告警日志和数据库集群就绪服务的告警日志。
数据库集群就绪服务的告警日志查看
1 ssh登陆oracle rac 的 node1 查询节点1上的集群就绪软件告警日志
su - grid cd $ORACLE_HOME/log/hisdb01 vi alerthisdb01.log
1 ssh登陆oracle rac 的 node2 查询节点2上的集群就绪软件告警日志
su - grid cd $ORACLE_HOME/log/hisdb02 vi alerthisdb02.log
检查数据库运行告警日志
su - oracle
cd $ORACLE_BASE
cd /u01/app/oracle/diag/rdbms/hisdb/hisdb1/trace
vim alert_hisdb1.log
主要查看是否有ORA- 报错日志。
CDR DataGuard状态查询数据同步情况:
a)查询数据库状态
SQL> select open_mode,database_role,db_unique_name from v d a t a