Home > Database > Oracle > body text

How to query the table spaces in Oracle

青灯夜游
Release: 2022-01-13 09:01:46
Original
10652 people have browsed it

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;
Copy after login

Method 2: v$tablespace

select * from v$tablespace;
Copy after login

Delete table space

Delete empty table space, does not contain physical files

DROP TABLESPACE tablespace_name;
Copy after login

Delete empty tablespace, including physical files

DROP TABLESPACE tablespace_name INCLUDING DATAFILES;
Copy after login
Copy after login

Delete non-empty tablespace, not including physical files

DROP TABLESPACE tablespace_name INCLUDING DATAFILES;
Copy after login
Copy after login

Delete non-empty tablespace, including physical files

DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES;
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template