I'm running oracle9.2 on win2k. I need to do the following:
1) Run a script to monitor my storage percentage,number of extents of a tablespace, free space. After which i need to email this report to myself via MS outlook so that i have a record of this. The email shld be on a daily basis. This is the script i hv created:
SELECT upper(f.tablespace_name) "tablespace name",
d.Tot_grootte_Mb "tablespace size(M)",
d.Tot_grootte_Mb - f.total_bytes "used(M)",
to_char(round((d.Tot_grootte_Mb - f.total_bytes) / d.Tot_grootte_Mb * 100,2),'990.99') "cap(%)",
GROUP BY tablespace_name) f,
(SELECT dd.tablespace_name, round(SUM(dd.bytes)/(1024*1024),2) Tot_grootte_Mb
FROM sys.dba_data_files dd
GROUP BY dd.tablespace_name) d
WHERE d.tablespace_name = f.tablespace_name
ORDER BY 4 DESC;
Q1: How do i specify that the results get emailed to me?
2) For the above script, it would be neat if i could export the report into Excel or csv files. How do i this?
i will be using both email and Excel to manage all my monitoring so that i could have an "alert" + report for my manager. At the same time, i dont want to configure extra storage space for OEM to use as a management server, as i only had 1 server running oracle
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!