每日数据库监控

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

4.方案细则现阶段公司处于发展之中,现在数据库多以单机模式,但是目前生产库是属于集群模式,所以对于数据库的健康健康大致分为两个部分,一个是对于集群的健康监控,一个是对于数据库的性能状态监控。随着公司业务的不断发展及扩大,数据库的规模也会相应的增加,所以以集群模式出现的数据库在以后的环境中会有很多,在此加入了对于数据库集群的健康检查。4.1集群健康状态监控检查4.1.1查看各资源状态(nodeapps节点应用程序,ASM实例,数据库实例等):[root@node1~]#su-grid[grid@node1~]$crs_stat-t-v(命令兼容10g)NameTypeR/RAF/FTTargetStateHost----------------------------------------------------------------------ora.DATA.dgora....up.type0/50/ONLINEONLINEnode1ora.FLASH.dgora....up.type0/50/ONLINEONLINEnode1ora.GRIDDG.dgora....up.type0/50/ONLINEONLINEnode1ora....ER.lsnrora....er.type0/50/ONLINEONLINEnode1ora....N1.lsnrora....er.type0/50/0ONLINEONLINEnode2ora....N2.lsnrora....er.type0/50/0ONLINEONLINEnode2ora....N3.lsnrora....er.type0/50/0ONLINEONLINEnode2ora.asmora.asm.type0/50/ONLINEONLINEnode1ora.cvuora.cvu.type0/50/0ONLINEONLINEnode2ora.devdb.dbora....se.type0/20/1ONLINEONLINEnode1ora.gsdora.gsd.type0/50/OFFLINEOFFLINEora....networkora....rk.type1/50/ONLINEONLINEnode1ora....SM1.asmapplication0/50/0ONLINEONLINEnode1ora....E1.lsnrapplication0/50/0ONLINEONLINEnode1ora.node1.gsdapplication0/50/0OFFLINEOFFLINEora.node1.onsapplication0/30/0ONLINEONLINEnode1ora.node1.vipora....t1.type0/00/0ONLINEONLINEnode1ora....SM2.asmapplication0/50/0ONLINEONLINEnode2ora....E2.lsnrapplication0/50/0ONLINEONLINEnode2ora.node2.gsdapplication0/50/0OFFLINEOFFLINEora.node2.onsapplication0/30/0ONLINEONLINEnode2ora.node2.vipora....t1.type0/00/0ONLINEONLINEnode2ora.oc4jora.oc4j.type0/10/2ONLINEONLINEnode2ora.onsora.ons.type0/30/ONLINEONLINEnode1ora.scan1.vipora....ip.type0/00/0ONLINEONLINEnode2ora.scan2.vipora....ip.type0/00/0ONLINEONLINEnode2ora.scan3.vipora....ip.type0/00/0ONLINEONLINEnode2[grid@node1~]$在11gR2中,默认oc4j和gsd资源是disable的;gsd是CRS用于跟9iRAC进行通信的一个模块,是为了向后兼容才保留的,不影响性能;建议不要刪除,也不要尝试开启他们,忽略即可。4.1.211gRAC常用的命令crsctlstatresource-t.[root@node1u01]#su-grid[grid@node1~]$crsctlstatresource–t[grid@node1~]$crsctlstatresource-t--------------------------------------------------------------------------------NAMETARGETSTATESERVERSTATE_DETAILS--------------------------------------------------------------------------------LocalResources--------------------------------------------------------------------------------ora.DATA.dgONLINEONLINEnode1ONLINEONLINEnode2ora.FLASH.dgONLINEONLINEnode1ONLINEONLINEnode2ora.GRIDDG.dgONLINEONLINEnode1ONLINEONLINEnode2ora.LISTENER.lsnrONLINEONLINEnode1ONLINEONLINEnode2ora.asmONLINEONLINEnode1StartedONLINEONLINEnode2Startedora.gsdOFFLINEOFFLINEnode1OFFLINEOFFLINEnode2ora.net1.networkONLINEONLINEnode1ONLINEONLINEnode2ora.onsONLINEONLINEnode1ONLINEONLINEnode2--------------------------------------------------------------------------------ClusterResources--------------------------------------------------------------------------------ora.LISTENER_SCAN1.lsnr1ONLINEONLINEnode2ora.LISTENER_SCAN2.lsnr1ONLINEONLINEnode2ora.LISTENER_SCAN3.lsnr1ONLINEONLINEnode2ora.cvu1ONLINEONLINEnode2ora.devdb.db1ONLINEONLINEnode1Open2ONLINEONLINEnode2Openora.node1.vip1ONLINEONLINEnode1ora.node2.vip1ONLINEONLINEnode2ora.oc4j1ONLINEONLINEnode2ora.scan1.vip1ONLINEONLINEnode2ora.scan2.vip1ONLINEONLINEnode2ora.scan3.vip1ONLINEONLINEnode2[grid@node1~]$如果后面不带-t,那么可以看到相对详细的资源信息。[grid@rac01~]$crsctlstatresource[grid@node1~]$crsctlstatresourceNAME=ora.DATA.dgTYPE=ora.diskgroup.typeTARGET=ONLINE,ONLINESTATE=ONLINEonnode1,ONLINEonnode2NAME=ora.FLASH.dgTYPE=ora.diskgroup.typeTARGET=ONLINE,ONLINESTATE=ONLINEonnode1,ONLINEonnode2NAME=ora.GRIDDG.dgTYPE=ora.diskgroup.typeTARGET=ONLINE,ONLINESTATE=ONLINEonnode1,ONLINEonnode2NAME=ora.LISTENER.lsnrTYPE=ora.listener.typeTARGET=ONLINE,ONLINESTATE=ONLINEonnode1,ONLINEonnode2NAME=ora.LISTENER_SCAN1.lsnrTYPE=ora.scan_listener.typeTARGET=ONLINESTATE=ONLINEonnode2NAME=ora.LISTENER_SCAN2.lsnrTYPE=ora.scan_listener.typeTARGET=ONLINESTATE=ONLINEonnode2NAME=ora.LISTENER_SCAN3.lsnrTYPE=ora.scan_listener.typeTARGET=ONLINESTATE=ONLINEonnode2NAME=ora.asmTYPE=ora.asm.typeTARGET=ONLINE,ONLINESTATE=ONLINEonnode1,ONLINEonnode2NAME=ora.cvuTYPE=ora.cvu.typeTARGET=ONLINESTATE=ONLINEonnode2NAME=ora.devdb.dbTYPE=ora.database.typeTARGET=ONLINE,ONLINESTATE=ONLINEonnode1,ONLINEonnode2NAME=ora.gsdTYPE=ora.gsd.typeTARGET=OFFLINE,OFFLINESTATE=OFFLINE,OFFLINENAME=ora.net1.networkTYPE=ora.network.typeTARGET=ONLINE,ONLINESTATE=ONLINEonnode1,ONLINEonnode2NAME=ora.node1.vipTYPE=ora.cluster_vip_net1.typeTARGET=ONLINESTATE=ONLINEonnode1NAME=ora.node2.vipTYPE=ora.cluster_vip_net1.typeTARGET=ONLINESTATE=ONLINEonnode2NAME=ora.oc4jTYPE=ora.oc4j.typeTARGET=ONLINESTATE=ONLINEonnode2NAME=ora.onsTYPE=ora.ons.typeTARGET=ONLINE,ONLINESTATE=ONLINEonnode1,ONLINEonnode2NAME=ora.scan1.vipTYPE=ora.scan_vip.typeTARGET=ONLINESTATE=ONLINEonnode2NAME=ora.scan2.vipTYPE=ora.scan_vip.typeTARGET=ONLINESTATE=ONLINEonnode2NAME=ora.scan3.vipTYPE=ora.scan_vip.typeTARGET=ONLINESTATE=ONLINEonnode2[grid@node1~]$4.1.3检查cluster运行状态需要在grid用户下执行这些命令。[root@node1~]#su-grid检查OracleClusterware是否在线[grid@node1~]$crsctlcheckcrsCRS-4638:OracleHighAvailabilityServicesisonlineCRS-4537:ClusterReadyServicesisonlineCRS-4529:Cl

1 / 15
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功