Informix Scripts

pre-freeze-script

#!/bin/sh
mkdir -p /scripts
echo "############################################################" >> /scripts/pre_freeze.log
date >> '/scripts/pre_freeze.log'
echo -e "\n attempting to run pre-freeze script for INFORMIX as root user\n" >> /scripts/pre_freeze.log
if [ "$(id -u)" -eq "0" ]; then
### Replace the informix server related information as per your setup
INFORMIXDIR=/opt/Informix_Software_Bundle
INFORMIXSERVER=ol_informix1210
ONCONFIG=onconfig.ol_informix1210
INFORMIXSQLHOSTS=/opt/Informix_Software_Bundle/etc/sqlhosts.ol_informix1210
GL_USEGLU=1
PATH=${INFORMIXDIR}/bin:${INFORMIXDIR}/extend/krakatoa/jre/bin:${PATH}
export INFORMIXDIR INFORMIXSERVER ONCONFIG INFORMIXSQLHOSTS GL_USEGLU PATH
onmode -c block
echo -e "\n Database is in quiesce mode now\n" >> /scripts/pre_freeze.log
else
date >> '/scripts/pre_freeze.log'
echo -e "not root useri\n" >> '/scripts/pre_freeze.log'
fi

post-thaw-script

#!/bin/sh
echo "############################################################" >> /scripts/post_thaw.log
date >> '/scripts/post_thaw.log'
echo -e "\n attempting to run post-thaw script for INFORMIX as root user\n" >> /scripts/post_thaw.log
if [ "$(id -u)" -eq "0" ]; then
### Replace the informix server related information as per your setup
INFORMIXDIR=/opt/Informix_Software_Bundle
INFORMIXSERVER=ol_informix1210
ONCONFIG=onconfig.ol_informix1210
INFORMIXSQLHOSTS=/opt/Informix_Software_Bundle/etc/sqlhosts.ol_informix1210
GL_USEGLU=1
PATH=${INFORMIXDIR}/bin:${INFORMIXDIR}/extend/krakatoa/jre/bin:${PATH}
export INFORMIXDIR INFORMIXSERVER ONCONFIG INFORMIXSQLHOSTS GL_USEGLU PATH
onmode -c unblock
echo -e "\n Database is in unblocked mode now\n" >> /scripts/post_thaw.log
else
date >> '/scripts/post_thaw.log'
echo -e "not root useri\n" >> '/scripts/post_thaw.log'
fi

Loading...