Dear All,
Greetings!!!!!
I was checking the temp tablespace usage in my database with query shown below
SELECT /* + RULE */ df.tablespace_name tspace,
fs.bytes / (1024 * 1024),
SUM(df.bytes_free) / (1024 * 1024),
Round((SUM(fs.bytes) - df.bytes_free)/1024/1024),
Nvl(Round((SUM(fs.bytes) - df.bytes_used) * 100 / fs.bytes), 1),
Round((SUM(fs.bytes) - df.bytes_free) * 100 / fs.bytes)
FROM dba_temp_files fs,
(SELECT tablespace_name,bytes_free,bytes_used
FROM v$temp_space_header
GROUP BY tablespace_name,bytes_free,bytes_used) df
WHERE fs.tablespace_name = df.tablespace_name
GROUP BY df.tablespace_name,fs.bytes,df.bytes_free,df.bytes_used
ORDER BY 4 DESC
After running the query below query i got the output for "TEMP" tablespace is as shown below
| Tablespace | Size (MB) | Free (MB) | Used(MB) | % Free | % Used |
| ------------------------------ | ---------- | ---------- | ---------- | ---------- | ---------- |
| TEMP | 22213 | 0 | 22213 | 0 | 100 |
| TEMP | 22213 | 0 | 22213 | 95 | 100 |
| TEMP | 1100 | 0 | 1100 | -1919 | 100 |
| TEMP | 1100 | 0 | 1100 | 0 | 100 |
Could anyone explain me the output why there are four 'TEMP' tbs rows and % is -ve ?
I will be grateful to you for that.
your help will be appreciated, thanks in advance.
regards.