#!/usr/bin/ksh #set -xv # Program : smenu_lst_disk.sh # Author : Bernard Polarski # note : The resize datafiles part is from Jonathan Lewis book Practical Oracle 8i HOST=`hostname` PAR1=$1 PAR2=$2 . $SBIN/scripts/passwd.env . ${GET_PASSWD} $S_USER $ORACLE_SID if [ "x-$CONNECT_STRING" = "x-" ];then echo "could no get a the password of $S_USER" exit 0 fi TMP=$SBIN/tmp FOUT=$TMP/tmp_dsc$ORACLE_SID.txt if [ "$PAR1" = "-h" ];then cat < : List candidate shrink datafiles lstd -s : show SQL statement to shink datafiles, default is all unless TBS name is given lstd -e : List datafile in autoextend that cannot extend anymore lstd -es : Show statement to set off datafiles that cannot extend anymore lstd -ck : List last checkpoint time for each datafile EOF elif [ "$PAR1" = "-ck" ];then sqlplus -s "$CONNECT_STRING" < maxbytes) b where a.file_name = b.file_name / EOF elif [ "$PAR1" = "-e" ];then sqlplus -s "$CONNECT_STRING" < maxbytes; EOF elif [ "$PAR1" = "-m" ];then if [ -n "$PAR2" ];then WHERE_TBS=" where tablespace_name = upper('$PAR2') " fi sqlplus -s "$CONNECT_STRING" <