Tag Archive: script

Apr 14

Db2 set online logs and enable autodelete for logs and backup

A simple script to set logs for online backup :     #!/bin/sh #First of all create archive logs dir in the home path of the instance owner. mkdir -p /$HOME/archiveLog #Change log settings. db2 UPDATE DB CFG FOR $1 USING logarchmeth1 “DISK:/data/archiveLog” logprimary 15 logsecond 15 logfilsiz 8000 #Backup Db. db2 BACKUP DATABASE $1 …

Continue reading »

Aug 09

Execute command on all Db2 instances

Here the script I use to verify all backup on all dbs on all instances. I use it with the “db2-check-backup.sh” documented Here #!/bin/sh UNIQUE=`date +%s` LPATH=$(pwd) INST=/tmp/instances.$UNIQUE OUT=/tmp/outallinst.$UNIQUE   /opt/ibm/db2/V9.7/bin/db2ilist > $INST   while read LN; do echo "###########" $LN >> $OUT $LPATH/db2-check-backup.sh $LN >>$OUT done < $INST   cat $OUT rm $OUT rm …

Continue reading »

Older posts «