how do see how much space is used and free in a tablespace

Answer Posted / anil kumar prajapati

olumn "Tablespace" format a13
column "Used MB" format 99,999,999
column "Free MB" format 99,999,999
column "Total MB" format 99,999,999
select
fs.tablespace_name "Tablespace",
(df.totalspace - fs.freespace) "Used MB",
fs.freespace "Free MB",
df.totalspace "Total MB",
round(100 * (fs.freespace / df.totalspace)) "Pct. Free"
from
(select
tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from
dba_data_files
group by
tablespace_name
) df,
(select
tablespace_name,
round(sum(bytes) / 1048576) FreeSpace
from
dba_free_space
group by
tablespace_name
) fs
where
df.tablespace_name = fs.tablespace_name;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the use of recording information about current session?

562


How do you open a cluster administrator? : sql server DBA

574


What purpose does the model database server? : sql server DBA

618


when we login sql editor using username and password then it says this error "could not resolve service name" then what can we do at client side.( here thing is tnsnames.ora file is ok till yesterday and worked well, but now it giving error.

1231


what is the diffrence between core dba and apps dba?

2079






Why would you use sql agent? : sql server DBA

572


How do you trace the traffic hitting a sql server? : sql server DBA

838


If you are given access to a sql server, how do you find if the sql instance is a named instance or a default instance? : sql server DBA

552


What is the difference between dropping a database and taking a database offline? : sql server DBA

571


what are the differences of where and if in SAS?

1660


internal architecture

1749


how can you process messages in order asynchronously?

551


You create a private database link and upon connection, fails with: ORA-2085: connects to . What is the problem? How would you go about resolving this error?

1533


How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database? : sql server DBA

650


Where would you look for errors from the database engine?

2344