首页 » OGG, 系统相关 » Check goldengate replicate Availability (检查OGG REPLICATE)

Check goldengate replicate Availability (检查OGG REPLICATE)

通过检查replicate进程确认OGG REPLICATE进程是否存活shell

[root@ggsdb scripts]# vi ckoggrepl.sh 

#!/bin/sh
###############################################
# ckoggrepl.sh
# check oracle goldengate replicat process exist
# do't rm,root crontab use it.
# author:weizhao

################################################

INSIDER="zhangweizhao@mail.anbob.com"; export INSIDER
cd /var/opt/oracle
rm -f rpct.exist
ps -ef|grep replicat|grep -v grep > rpct.exist
if [ -s rpct.exist ]
then
   echo
else
echo "Alert: 57dbserver ogg replicat process abending or stop!"| mail -s "57ogg alert" $INSIDER
fi

[root@ggsdb scripts]# crontab -e

0 8-18/2 * * * /home/oracle/scripts/ckoggrepl.sh

每天8点到18点每2小时检查一次

打赏

对不起,这篇文章暂时关闭评论。