==>cat tns_entry_list
DB1
Db2
Db3
db4
==>cat find_max_dbfs.ksh
#!/bin/ksh
for tns_entry in `cat tns_entry_list`
do
echo “–”
echo “——— TNS ENTRY ${tns_entry} ———-”
/oracle/app/oracle/product/9.2.0.8/bin/sqlplus monioring_user/monitoring_password@${tns_entry} << EOF
@/export/home/oracle/paresh/find_max_dbfs.sql
EOF
done
oracle@dbmonitor*-/export/home/oracle/paresh
==>cat find_max_dbfs.sql
set lines 120 pages 200
col “-?db_files_value” format a20
col “MAXDATAFILES” format 9999999999999999
col “USED MAXDATAFILES” format 99999999999999
select ‘-?’ || x.value as “-?db_files_value”, y.records_total “MAXDATAFILES”, y.records_used “USED MAXDATAFILES”,
from (select value from v$parameter where name = ‘db_files’) x,
(select records_total, records_used from v$controlfile_record_section where type = ‘DATAFILE’) y;
oracle@dbmonitor*-/export/home/oracle/paresh
==>