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

Explain about your sql server dba experience? : sql server DBA

550


how can a session indicate its interest in receiving alerts?

566


What are the different types of upgrades that can be performed in sql server? : sql server DBA

681


What types of replication are supported in sql server? : sql server DBA

604


What is the difference between the 2 operating modes of database mirroring? : sql server DBA

517






how can you implement fine-grained auditing?

606


what is grd?

639


What are the different authentication modes in sql server and how can you change authentication mode? : sql server DBA

558


suppose you want to audit specific activities on sensitive data. How can you achieve that?

550


What are the new features in sql server 2005 when compared to sql server 2000? : sql server DBA

615


Why would you use sql agent? : sql server DBA

580


What are the recovery models for a database? : sql server DBA

593


what are the benefits of flashback feature?

592


What is the importance of a recovery model? : sql server DBA

553


Draft one mock email requesting your non-technical management grant you downtime to (provide justification where applicable) complete the following tasks: (1) Generate statistics on a large table; (2) Generate an RDA – if you don't know what an RDA is please say so. (3) Rename datafiles.

1691