I have this server with the following system:
Windows 2003 R2 Ent Edition SP 2 Oracle 1.0.2.0.4.0 Databases: 5
The databases have their archivelogs located in flash recovery area as shown by the NAME column of v$recovery_file_dest and also by invoking "show parameter db_recovery_file_dest" from sqlplus. I'd like to monitor the space usage of archivelog of each database using a SQL or PLSQL script.
If I invoke a query below:
SET LINESIZE 145
SET PAGESIZE 9999
COLUMN name FORMAT a30 HEADING 'Name'
COLUMN space_limit FORMAT 99,999,999,999,999 HEADING 'Space Limit'
COLUMN space_used FORMAT 99,999,999,999,999 HEADING 'Space Used'
COLUMN space_used_pct FORMAT 999.99 HEADING '% Used'
COLUMN space_reclaimable FORMAT 99,999,999,999,999 HEADING 'Space Reclaimable'
COLUMN pct_reclaimable FORMAT 999.99 HEADING '% Reclaimable'
COLUMN number_of_files FORMAT 999,999 HEADING 'Number of Files'
prompt
prompt Current location, disk quota, space in use, space reclaimable by deleting files,
prompt and number of files in the Flash Recovery Area.
prompt
SELECT
name
, space_limit
, space_used
, ROUND((space_used / space_limit)*100, 2) space_used_pct
, space_reclaimable
, ROUND((space_reclaimable / space_limit)*100, 2) pct_reclaimable
, number_of_files
FROM
v$recovery_file_dest
ORDER BY
name
/
I would get an output like this:
Name Space Limit Space Used % Used Space Reclaimable % Reclaimable Number of Files
------------------------------ ------------------- ------------------- ------- ------------------- ------------- ---------------
D:\oracle\product\10.2.0\flash 107,374,182,400 34,239,603,712 31.89 0 .00 804
_recovery_area\DBNAME
My question is: How do I integrate the results of each similar query from each database into one output?
The output would look like this:
Name Space Limit Space Used % Used Space Reclaimable % Reclaimable Number of Files
------------------------------ ------------------- ------------------- ------- ------------------- ------------- ---------------
D:\oracle\product\10.2.0\flash 107,374,182,400 34,239,603,712 31.89 0 .00 804
_recovery_area\DBNAME1
D:\oracle\product\10.2.0\flash 107,374,182,400 34,239,603,712 31.89 0 .00 804
_recovery_area\DBNAME2
D:\oracle\product\10.2.0\flash 107,374,182,400 34,239,603,712 31.89 0 .00 804
_recovery_area\DBNAME3