Database

Check Freespace in Tablespace

Sometimes you want to see your freespace in your tablespace.

Here we are

column total_space format 9,999,999,999,999
column freespace format 9,999,999,999

(select tablespace,
datafile total_space,
freespace freespace
from
(select tablespace_name tablespace
from dba_tablespaces where status=’ONLINE’) a,
(select tablespace_name tablespace1, sum(bytes) datafile
from dba_data_files group by tablespace_name) b,
(select tablespace_name tablespace2, sum(bytes) freespace
from dba_free_space group by tablespace_name) c
where tablespace=tablespace1 and
tablespace1=tablespace2(+));

Advertisements

Discussion

No comments yet.

Leave a Reply

Please log in using one of these methods to post your comment:

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

Archives

Twitter Updates

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

%d bloggers like this: