Tag Archive: bash script

Oct 09

Generate command list for all instance’s Dbs

-) Step 1 : this scrip is an example to prune all logs and backup of a db. #################### prune.sh db2 connect to $1 db2 PRUNE HISTORY 20131007 AND DELETE   -) Step 2 : generate a command list to prune object for all Dbs in the instance db2 list database directory | grep alias …

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 «