#!/usr/bin/ksh ############################################################################### # # Module: add_logs1.sh # Author: Peter R. Schmidt # Description: Add logical logs - move them to the log dbs # # Change Log # # Date Name Description................. # 06/21/00 Peter R. Schmidt Start Program # ############################################################################### echo echo "Note: this script expects that you just initialized the Informix database" echo "and you created 3 logical logs in the root dbspace " echo "and that only the first log has been used so far" echo "and that the LTAPEDEV (log tape device) is set to /dev/null" echo echo "(That is a typical situtation)" echo onstat -l echo echo "Is that the case ?? (y/n)" read answer if [ $answer != y -a $answer != Y ] then exit fi ############################################################################### echo echo "How many logical logs do you want to end up with ?" read TOTAL_LOGS echo echo "Which DBSPACE do you want to move the logical logs to ?" read LOGICAL_DBS echo echo "Total Logs will be: $TOTAL_LOGS" echo "Logical Log DBSPACE will be: $LOGICAL_DBS" echo echo "Press to continue to quit" read answer ############################################################################### onmode -u -y sleep 5 onparams -a -d $LOGICAL_DBS onparams -a -d $LOGICAL_DBS onparams -a -d $LOGICAL_DBS echo echo "Press to continue" read answer ontape -s -L 0 onparams -d -l 2 -y onparams -d -l 3 -y echo echo "Press to continue" read answer onmode -l onmode -c ontape -a echo echo "Press to continue" read answer onparams -d -l 1 -y echo echo "Press to continue" read answer CNT=3 while true do onparams -a -d $LOGICAL_DBS CNT=`expr $CNT + 1` echo "Log $CNT added" if [ $CNT = $TOTAL_LOGS ] then break fi done ontape -s -L 0 echo onmode -m