Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

temp tablespace usage

ora_learner36Mar 23 2017 — edited Mar 23 2017

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

TablespaceSize (MB)Free (MB)Used(MB)% Free% Used
--------------------------------------------------------------------------------
TEMP222130222130100
TEMP2221302221395100
TEMP110001100-1919100
TEMP1100011000100

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.

This post has been answered by ora_learner36 on Mar 23 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2017
Added on Mar 23 2017
9 comments
4,012 views