
ORACLE DATABASE ADMINISTRATOR
Determine used and free space in a tablespace
Sunitha S 03.20.2003
Rating: -4.58- (out of 5)




|
This small Oracle script can be executed as a script file from the
SQL*Plus prompt and reports the total size, used space, free space
and percentage of used and free space in all the tablespaces in a
database. Very useful for DBAs! The user executing this script should have the select privilege on the dba_free_space and dba_data_files views. The script has been tested on Oracle 8i enterprise and standard editions.
Reader Feedback
Paul S. writes: I find it frustrating to find a freespace tip that does not
take into account the fact that if tablespace has no freespace then it
in not listed in the table. The simple solution is to place an outer
join in the where clause, as use nvl like so:
Note changes on lines 5, 6, 7, 8, & 16.
For More Information
- Feedback: E-mail the editor with your thoughts about this tip.
- More tips: Hundreds of free Oracle tips and scripts.
- Tip contest: Have an Oracle tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize -- submit your tip today!
- Ask the Experts: Our SQL, database design, Oracle, SQL Server, DB2, metadata, and data warehousing gurus are waiting to answer your toughest questions.
- Forums: Ask your technical Oracle questions--or help out your peers by answering them--in our active forums.
- Best Web Links: Oracle tips, tutorials, and scripts from around the Web.
To continue reading for free, register below or login
To read more you must become a member of SearchOracle.com
');
// -->

/ul>
 |

|
|
 |
|
 |