Home  >  Article  >  Database  >  How to query the table spaces in Oracle

How to query the table spaces in Oracle

青灯夜游
青灯夜游Original
2022-01-07 16:46:5410580browse

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;".

How to query the table spaces in Oracle

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn