Delete the Oracle tablespace and corresponding data files under Aix and the space is not released.

Source: Internet
Author: User

Delete the Oracle tablespace and corresponding data files under Aix and the space is not released.

During routine Oracle database maintenance today, because a file system has reached 82% and a new partition table space is created, the first two partitions of the partition table are deleted, delete the corresponding tablespace and data file (about 15 GB) and use the following statement:

Alter table tm_bus_site_his drop partition p_site200806_a;

...

Drop tablespace tm_index200805_a including contents and datafiles cascade constraints;

...

After deletion, we found that the file system is still 82% and the occupied storage space is still not released. Why?

Search for the following explanation from the Internet:

In general, there will be no rm drop and no space is released.
This is generally because a process writes data to a file or a process is accessing a file.
In this case, the rm file will not release space.

To understand such a problem, you need to understand the operation content of rm.
A file contains data and pointer, And the pointer is in the header of the file system.
Deleting an operating system file is essentially similar to the oracle drop table.
After the pointer is processed, the space occupied by part of the file data can be written into the new content.
The reason why rm is not released is that a process is using this file, which causes the operating system to think that this file is not actually released. Therefore, the df or bdf space statistics are incorrect.

Generally, the operating system can be restarted, umount and mount the file system.
This is not a good method.

The recommended operations are as follows:
1. Download an lsof software and install it on google.
2. Find the process in which the file is being deleted
Lsof | grep deleted
3. kill the corresponding process space and release it.

Other suggestions:
1. When clearing log files such as alert. log listerner. log, it is best to use the "> file" operation instead of rm.
2. It is best to use backup... delete input to clear archived logs.
3. If the rm does not release space in your operating system, check the system problem with sa, at the same time, you can use lsof to check whether the process is using this file before rm.
4. There are many ways to solve the problem. It is best not to restart the database or the operating system.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.