Basic Oracle Concepts and Programming Question:

How To View the Data Files in the Current Database?

Tweet Share WhatsApp

Answer:

If you want to get a list of all tablespaces used in the current database instance, you can use the DBA_TABLESPACES view as shown in the following SQL script example:

SQL> connect SYSTEM/globalguideline
Connected.

SQL> col tablespace_name format a16;
SQL> col file_name format a36;
SQL> SELECT TABLESPACE_NAME, FILE_NAME, BYTES
2 FROM DBA_DATA_FILES;
<pre>TABLESPACE_NAME FILE_NAME BYTES
--------------- ------------------------------- ---------
USERS ORACLEXEORADATAXEUSERS.DBF 104857600
SYSAUX ORACLEXEORADATAXESYSAUX.DBF 461373440
UNDO ORACLEXEORADATAXEUNDO.DBF 94371840
SYSTEM ORACLEXEORADATAXESYSTEM.DBF 356515840</pre>

Download Oracle Database PDF Read All 430 Oracle Database Questions
Previous QuestionNext Question
What Are the Predefined Tablespaces in a Database?How To Create a new Oracle Data File?