Method: 1. Query the "dba_tablespaces" data with the syntax "select * from dba_tablespaces;"; 2. Query the "v$tablespace" data with the syntax "select * from v$tablespace;".
The operating environment of this tutorial: Windows 7 system, Oracle 11g version, Dell G3 computer.
Oracle tablespaces (tablespaces) are a logical concept, and what actually stores data are data files (data files). An Oracle database can have one or more table spaces, and a table space corresponds to one or more physical database files.
Table space is the smallest unit for Oracle database recovery, housing many database entities, such as tables, views, indexes, clusters, rollback segments, temporary segments, etc.
oracle query all table spaces
Method 1: dba_tablespaces
select * from dba_tablespaces;
Method 2: v$tablespace
select * from v$tablespace;
Delete table space
Delete empty table space, does not contain physical files
DROP TABLESPACE tablespace_name;
Delete empty tablespace, including physical files
DROP TABLESPACE tablespace_name INCLUDING DATAFILES;
Delete non-empty tablespace, not including physical files
DROP TABLESPACE tablespace_name INCLUDING DATAFILES;
Delete non-empty tablespace, including physical files
DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES;
Recommended tutorial: "Oracle Tutorial"
The above is the detailed content of How to query the table spaces in Oracle. For more information, please follow other related articles on the PHP Chinese website!