#!/bin/ksh export ORACLE_SID=${1} res=`sqlplus -s expman/expdp@${ORACLE_SID} <<-EOF SET ECHO OFF NEWP 0 SPA 0 PAGES 0 FEED OFF HEAD OFF TRIMS ON TAB OFF column bytes format 9999 select trim(round(sum(bytes)/1024/1024/1024)) from dba_extents; exit; EOF` echo "${ORACLE_SID} DB Size is -${res}-." if [[ ${res} -ge 10 ]] then echo "${ORACLE_SID} DB greater than 10GB......" else echo "${ORACLE_SID} DB less than 10GB......" fi