Tag Archive: script

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 »

Aug 09

Check db2 backup

Here a usefull script to check backup on all dbs in a db2 instance. It can be used with monitoring products as zabbix or nagios.     #!/bin/sh INS=$1   NOW=`date -d ‘1 day ago’ ‘+%Y%m%d’`     UNIQUE=`date +%Y%m` DBS=/tmp/dbs.$UNIQUE OUTZ=/tmp/outfordbs.$UNIQUE   su – $INS -c "db2 list database directory" | grep alias | …

Continue reading »

Older posts «