Home> Database> Oracle> body text

How to clear oracle table space

青灯夜游
Release: 2022-02-22 17:58:07
Original
29271 people have browsed it

In Oracle, you can use the "drop tablespace" statement to clear the table space, the syntax is "drop tablespace tab_name [including contents][cascade constraints]".

How to clear oracle table space

The operating environment of this tutorial: Windows 7 system, Oracle 11g version, Dell G3 computer.

oracle clears table space

Oracle’s operation of deleting table space often occurs when part of the database business is split, which will cause unnecessary Delete the table space and corresponding data files to release the hardware space of the current database.

Deleting a table space can be done directly through OEM enterprise management or SQL commands. When Oracle deletes a table space, it is not necessary to delete the data files first and then delete the table space. You can choose to delete the data files together when deleting the table space.

Oracle delete tablespace syntax structure:

drop tablespace tab_name [including contents][cascade constraints]
Copy after login

Syntax analysis:

  • drop tablespace: Delete the keyword of the table space, tab_name represents the name of the table space.

  • [including contents]: Indicates that when deleting the table space, delete the data files in the table space together.

  • [cascade constraints]: Indicates that when the table space is deleted, the integrity of the table space is also deleted. For example, the foreign keys of the table, triggers, etc. are the integrity constraints of the table.

Case, delete the student table space, and delete the data files and integrity of the table space

drop tablespace student including contents cascade constraints;
Copy after login

Check the table space again and find that The student tablespace no longer exists, as shown below:

How to clear oracle table space

## Recommended tutorial: "

Oracle Tutorial"

The above is the detailed content of How to clear oracle table space. 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!