#!/bin/sh # Program: markempty_ai # Purpose: This script marks all full AI extents as empty # Should be run after a full backup is complete # Syntax: markempty_ai # # Author: Adam Backman # Date Written: 06/09/98 # # Setup the generic variables SCRIPTS=${SCRIPTS-/u3/users/adamb/scripts} export SCRIPTS # Read the registry to setup the database specific variables . $SCRIPTS/live/read_registry $1 case $? in 2) echo "Database $1 is not in database registry" exit 1 ;; 3) echo "Database $1 is on $HOST not on this host" exit 1 ;; esac if [ $BKAIDIR = "NO_AI" ] then exit 0 fi while true do EXTENT_NAME=`_rfutil $DB_DIR/$DB -C aimage extent full` if [ $? = 0 ] then # Full extent available to mark as empty _rfutil $DB_DIR/$DB -C aimage extent empty $EXTENT_NAME 2>/dev/null 1>/dev/null if [ $? != 0 ] then echo "Could not empty $EXTENT_NAME" exit 1 else echo "Extent $EXTENT_NAME marked as empty" fi else # No more full extents echo "No full extents - procedure complete" break fi done # end of loop