Bootstrap FreeKB - Oracle Database - List Tablespaces
Oracle Database - List Tablespaces

Updated:   |  Oracle Database articles

Oracle storage logical data in tablespaces and physical data in datafiles

For example, here is a SQL command that will list a users tablespaces.

SQL> select tablespace_name, status, contents from user_tablespaces;

TABLESPACE_NAME                STATUS    CONTENTS
------------------------------ --------- ---------------------
SYSTEM                         ONLINE    PERMANENT
SYSAUX                         ONLINE    PERMANENT
UNDOTBS1                       ONLINE    UNDO
TEMP                           ONLINE    TEMPORARY
USERS                          ONLINE    PERMANENT

 

For example, here is a SQL command that will list DBA tablespaces.

SQL> select tablespace_name, status, contents from dba_tablespaces;

TABLESPACE_NAME                STATUS    CONTENTS
------------------------------ --------- ---------------------
SYSTEM                         ONLINE    PERMANENT
SYSAUX                         ONLINE    PERMANENT
UNDOTBS1                       ONLINE    UNDO
TEMP                           ONLINE    TEMPORARY
USERS                          ONLINE    PERMANENT

 

To list the tables in a tablespace.

SQL> select table_name from all_tables where tablespace_name = 'SYSTEM' order by table_name;
TABLE_NAME
--------------------------------------------------------------------------------
XS$PROXY_ROLE
XS$ROLESET
XS$ROLESET_ROLES
XS$ROLE_GRANT
XS$SECCLS
XS$SECCLS_H
XS$TENANT
XS$VERIFIERS
XS$WORKSPACE
XSDB$SCHEMA_ACL
XSTREAM$_DDL_CONFLICT_HANDLER

TABLE_NAME
--------------------------------------------------------------------------------
XSTREAM$_DML_CONFLICT_COLUMNS
XSTREAM$_DML_CONFLICT_HANDLER
XSTREAM$_HANDLE_COLLISIONS
XSTREAM$_MAP
XSTREAM$_PARAMETERS
XSTREAM$_PRIVILEGES
XSTREAM$_REPERROR_HANDLER
XSTREAM$_SERVER
XSTREAM$_SERVER_CONNECTION
XSTREAM$_SUBSET_RULES
XSTREAM$_SYSGEN_OBJS

TABLE_NAME
--------------------------------------------------------------------------------
_default_auditing_options_

958 rows selected.

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 9ce0da in the box below so that we can be sure you are a human.