RAC异常重启分析
-----信息收集命令:
/u01/app/grid/grid_home/tfa/bin/tfactl diagcollect -from "Aug/5/2020 22:00:00" -to "Aug/5/2020 23:00:00"
-----如果命令执行报错,使用下面命令启动tfa后再执行收集:
/u01/app/grid/grid_home/tfa/bin/tfactl start
修改KDUMP和重启
-----修改KDUMP配置
root执行,crsctl 用绝对路径:
[grid@xxxxx ~]$ which crsctl
/u01/app/grid/grid_home/bin/crsctl
【root】
/u01/app/grid/grid_home/bin/crsctl modify type ora.cssd.type -attr "ATTRIBUTE=REBOOT_OPTS, TYPE=string,DEFAULT_VALUE=,FLAGS=CONFIG" -init
/u01/app/grid/grid_home/bin/crsctl modify res ora.cssd -attr "REBOOT_OPTS=CRASHDUMP" -init
/u01/app/grid/grid_home/bin/crsctl modify type ora.cssdmonitor.type -attr "ATTRIBUTE=REBOOT_OPTS,TYPE=string,DEFAULT_VALUE=,FLAGS=CONFIG" -init
/u01/app/grid/grid_home/bin/crsctl modify res ora.cssdmonitor -attr "REBOOT_OPTS=CRASHDUMP" -init
RAC停库
srvctl stop database -d
或者:进入每个库,shutdown immediate
停监听
srvctl stop LISTENER
取消自启动
/u01/app/grid/grid_home/bin/crsctl disable crs
/u01/app/grid/grid_home/bin/crsctl stop crs
机器重启后,开启自启动
/u01/app/grid/grid_home/bin/crsctl enable crs
/u01/app/grid/grid_home/bin/crsctl start crs
export ORACLE_SID=
startup;
export ORACLE_SID=
startup;
看集群状态
/u01/app/grid/grid_home/bin/crsctl stat res -t
启动监听
srvctl start listener -n cxdxdb1
SQL> select instance_name,startup_time,status from gv$instance;
INSTANCE_NAME STARTUP_TIME STATUS
---------------- ------------------- ------------
xxxxx2 2020-08-09 23:59:45 OPEN
xxxxx1 2020-01-23 07:17:03 OPEN
最后 crsctl stat res -t 中除了 gsd和oc4j,其他进程起来就ok了
查看进程:
SELECT sid, serial#, username, osuser FROM v$session;