TEMPORARY TABLESPACE - EXTENT MANAGMENT LOCAL
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: TEMPORARY TABLESPACE - EXTENT MANAGMENT LOCAL

  1. #1
    Join Date
    Jan 2002
    Location
    India
    Posts
    105
    Can anyone tell me the exact difference between the two fields BYTES_CACHED AND BYTES_USED of V$TEMP_EXTENT_POOL

    I need to find out the %used or % free space of the temporary tablespace which is locally managed.

  2. #2
    Join Date
    Mar 2002
    Posts
    171
    Use this script to get your results:


    SELECT Substr(df.tablespace_name,1,20) "Tablespace Name",
    Substr(df.file_name,1,40) "File Name",
    Round(df.bytes/1024/1024,2) "Size (M)",
    Round(e.used_bytes/1024/1024,2) "Used (M)",
    Round(f.free_bytes/1024/1024,2) "Free (M)",
    Rpad(' '|| Rpad ('X',Round(e.used_bytes*10/df.bytes,0), 'X'),11,'-') "% Used"
    FROM DBA_DATA_FILES DF,
    (SELECT file_id,
    Sum(Decode(bytes,NULL,0,bytes)) used_bytes
    FROM dba_extents
    GROUP by file_id) E,
    (SELECT Max(bytes) free_bytes,
    file_id
    FROM dba_free_space
    GROUP BY file_id) f
    WHERE e.file_id (+) = df.file_id
    AND df.file_id = f.file_id (+)
    ORDER BY df.tablespace_name,
    df.file_name
    /

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width