ALTER TABLESPACE DB_TABLESPACE ADD DATAFILE '/opt/oracle/oradata/DB/DB_DATA$sigNO.dbf' SIZE 500M AUTOEXTEND ON NEXT 50M;
EOF
# we need send email to report the tablespace stats info to check whether add data file successful
sqlplus -s "/as sysdba" <<\EOF
col tablespace_name for a30
col file_name for a60
col auto_extend for a12
col tablespace_name justify center
col file_name justify center
col autoextend justify right
set linesize 200
set pagesize 500
@/opt/bocc/sql/chktabspstats.sql
EXIT
EOF
# out put the disk space useage
df -h
fi
#we will don't send email from there the crontab will do
# if [ `cat tablespace.alert|wc -l` -gt 0 ]
# then
# cat tablespace.alert >tablespace.tmp
# mailx -s "TABLESPACE ALERT for DB" YOUR_EMAIL_ADDRESS t < tablespace.alert
# fi
|
|