How To View the Data Files in the Current Database?
Page 1 of 1
How To View the Data Files in the Current Database?
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/fyicenter
Connected.
SQL> col tablespace_name format a16;
SQL> col file_name format a36;
SQL> SELECT TABLESPACE_NAME, FILE_NAME, BYTES FROM DBA_DATA_FILES;
TABLESPACE_NAME FILE_NAME BYTES
---------------- ---------------------------------- ----------
USERS \ORACLEXE\ORADATA\XE\USERS.DBF 104857600
SYSAUX \ORACLEXE\ORADATA\XE\SYSAUX.DBF 461373440
UNDO \ORACLEXE\ORADATA\XE\UNDO.DBF 94371840
SYSTEM \ORACLEXE\ORADATA\XE\SYSTEM.DBF 356515840
DBA_TABLESPACES view as shown in the following SQL script example:
SQL> connect SYSTEM/fyicenter
Connected.
SQL> col tablespace_name format a16;
SQL> col file_name format a36;
SQL> SELECT TABLESPACE_NAME, FILE_NAME, BYTES FROM DBA_DATA_FILES;
TABLESPACE_NAME FILE_NAME BYTES
---------------- ---------------------------------- ----------
USERS \ORACLEXE\ORADATA\XE\USERS.DBF 104857600
SYSAUX \ORACLEXE\ORADATA\XE\SYSAUX.DBF 461373440
UNDO \ORACLEXE\ORADATA\XE\UNDO.DBF 94371840
SYSTEM \ORACLEXE\ORADATA\XE\SYSTEM.DBF 356515840
Similar topics
» How To View the Tablespaces in the Current Database?
» How Remove Data Files befor opening a Database?
» How To View Existing Locks on the Database?
» What Happens to the Data Files If a Tablespace Is Dropped?
» How a Tablespace Is Related to Data Files?
» How Remove Data Files befor opening a Database?
» How To View Existing Locks on the Database?
» What Happens to the Data Files If a Tablespace Is Dropped?
» How a Tablespace Is Related to Data Files?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Sun Jan 31, 2010 12:35 am by Micheal
» Accessing tables of other users in SQL
Sun Jan 31, 2010 12:34 am by Micheal
» Grouping commands in SQL
Sun Jan 31, 2010 12:32 am by Micheal
» Operations on Result Sets in SQL
Sun Jan 31, 2010 12:31 am by Micheal
» Subqueries in SQL
Sun Jan 31, 2010 12:30 am by Micheal
» Joining Relations in SQL
Sun Jan 31, 2010 12:28 am by Micheal
» Delete comand in SQL
Sun Jan 31, 2010 12:27 am by Micheal
» Update command in SQL
Sun Jan 31, 2010 12:26 am by Micheal
» Insert command in SQL
Sun Jan 31, 2010 12:23 am by Micheal