# Program: sub_enable_ai # Purpose: This script enables AI for the Database # Called by enable_ai # Author: Adam Backman # Date Written: 06/08/98 # # If there is no ai for a database then exit if [ $BKAIDIR = "NO_AI" ] then proutil $DB_DIR/$DB -C truncate bi -G 1 2>&1 >/dev/null rfutil $DB_DIR/$DB -C mark backedup -G 1 2>&1 >/dev/null echo "No after imaging enabled for this database" exit 0 fi #Check to see if the Database Server is down proutil $DB_DIR/$DB -C busy 2>/dev/null >/dev/null if [ $? != 0 ] # Database Server is up and running then echo "Database is in use. Cannot Enable After Image for the Database." exit 1 fi #Enable After Image for the Database proutil $DB_DIR/$DB -C truncate bi -G 1 2>&1 >/dev/null rfutil $DB_DIR/$DB -C mark backedup -G 1 2>&1 >/dev/null rfutil $DB_DIR/$DB -C aimage begin -G 1 2>&1 >/dev/null exit 0