Size and space temporary tablespaces


SELECT a.tablespace_name, total_bytes/1024/1024 AS "Total, MB", used_mbytes AS "Used, MB",
  (total_bytes/1024/1024 - used_mbytes) AS "Free, MB" FROM
    (SELECT tablespace_name, SUM(bytes_used + bytes_free) AS total_bytes
      FROM v$temp_space_header GROUP BY tablespace_name) a,
    (SELECT tablespace_name, used_blocks*8/1024 AS used_mbytes FROM v$sort_segment) b
WHERE a.tablespace_name=b.tablespace_name;

TABLESPACE_NAME Free, MB   Used, MB Total, MB
TEMP   1200

500

2000

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: