Script for tablspace full sends a email
Dear all
i have seen this script
-- SQL script to get tablespace infomation
-- checkfree.sql
set heading off
set feedback off
set linesize 256
set tab off
col Name format a20
col "Data file" format a20
select
free.tablespace_name "Name",
df.file_name "Data file",
df.bytes "Size (bytes)",
TO_NUMBER(sum(free.bytes)) "Free (bytes)",
round(100*sum(free.blocks)/df.blocks) "(%)"
from dba_free_space free,
dba_data_files df
where free.file_id=df.file_id
group by free.tablespace_name,
df.file_name,
df.bytes,
df.blocks
order by 1;
/* Shell script to call */
/* $5 mean free percentage tablespace remain */
sqlplus system/manager @checkfree.sql | \
awk '$5 < 20 {print}' | mail -s "Tablespace near full" administrator@yourcompany.com
i just have to send the information of all the tablspace top the mention email ID how could i do it
or
the above script how could i do it ....i dont know the shell scripting so please help me to resolve this .......