| 12345678910111213141516171819202122232425 |
- #!/bin/ksh
- function get_db_size
- {
- 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 9999999999999
- select round(sum(bytes)/1024/1024/1024) from dba_extents;
- exit
- EOF`
- echo ${res}
- }
- # ---------------
- export ORACLE_SID=${1}
- if [[ `get_db_size` -ge 10000000000 ]]
- # if [[ 100 -ge 101 ]]
- then
- echo "${ORACLE_SID} DB greater than 10GB......"
- else
- echo "${ORACLE_SID} DB less than 10GB......"
- fi
|