DB2: Freeze Thaw Quiesce and Unquiesce scripts for Hitachi Virtual Infrastructure Integrator

Document created by Paul Morrissey on Jan 8, 2016
Version 1Show Document
  • View in full screen mode

Related Article Application Consistent Backup with Hitachi Virtual Infrastructure Integrator

 

pre-freeze-script.sh

#!/bin/sh

 

if [ "$(id -u)" -eq "0" ]; then

exec su - db2inst2 -c /db2home/db2inst2/write_suspend

fi

 

post-thaw-script.sh

 

#!/bin/sh

 

if [ "$(id -u)" -eq "0" ]; then

exec su - db2inst2 -c /db2home/db2inst2/write_resume

fi

 

write_suspend.sh

#!/bin/sh

 

export INSTHOME=/db2home/db2inst2

date >> $INSTHOME/write_suspend.log

echo "----START SUSPEND----" >> $INSTHOME/write_suspend.log << EOF

EOF

#connect to the database

$INSTHOME/sqllib/bin/db2 connect to test >> $INSTHOME/write_suspend.log

echo "+++" >> $INSTHOME/write_suspend.log << EOF_1

EOF_1

#set write condition for database

$INSTHOME/sqllib/bin/db2 set write suspend for database >> $INSTHOME/write_suspend.log

echo "+++" >> $INSTHOME/write_suspend.log << EOF_2

EOF_2

echo "----END----" >> $INSTHOME/write_suspend.log << EOF_3

EOF_3

 

write_resume.sh

#!/bin/sh

export INSTHOME=/db2home/db2inst2

date >> $INSTHOME/write_resume.log

echo "----START RESUME----" >> $INSTHOME/write_resume.log << EOF

EOF

 

$INSTHOME/sqllib/bin/db2 connect to test >> $INSTHOME/write_resume.log

echo "+++" >> $INSTHOME/write_resume.log << EOF_1

EOF_1

 

$INSTHOME/sqllib/bin/db2 set write resume for database >> $INSTHOME/write_resume.log

echo "+++" >> $INSTHOME/write_resume.log << EOF_2

EOF_2

echo "----END----" >> $INSTHOME/write_resume.log << EOF_3

EOF_3

 

 

____________________________________________________________

Accreditation: Hitachi Data Protection Suite Software Documentation

Attachments

    Outcomes