Hello everyone,
Quick question in regards to the Oracle Database application monitor for SAM, in particular the "used space in Tablespace (%)" component monitor within the Oracle Database template.
The default query for that component monitor is posted below. I am trying to have it check ALL the tablespaces, not just 'SYSTEM'. So I removed the AND fs.tablespace_name = 'SYSTEM' portion of the query and assumed that would force it to look at all the tablespaces. What it seems to be doing now is only looking at the first (alphabetically) tablespace that comes up in that query.
Has anyone else dealt with this or know of way to modify the following query to have it cycle/check all the tablespaces?
SELECT Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% Used",
df.tablespace_name "Tablespace"
FROM dba_free_space fs,
(SELECT tablespace_name,SUM(bytes) bytes
FROM dba_data_files
GROUP BY tablespace_name) df
WHERE fs.tablespace_name = df.tablespace_name
AND fs.tablespace_name = 'SYSTEM'
GROUP BY df.tablespace_name,df.bytes