Tag Archive: bash 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 »

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 »

Older posts «