Oracle method to release and delete table space: 1. Use the "alter table your table name enable row movement;" statement to enable row movement, which allows rowid changes; 2. Use "alter table your table name enable row movement;" The statement "shrink space;" can be used to reclaim space.
The operating environment of this tutorial: Windows 10 system, Oracle version 12c, Dell G3 computer.
After using the ORACLE database for a period of time, it will inevitably face a reduction in space until it is not enough. At this time, you have two choices.
1. Increase hard drive space and purchase new storage. This involves the funds and the machine itself and whether there is an interface.
2. Delete some historical data to free up space.
If it is handled according to the second situation, there are two situations.
1. Directly delete the data of the entire table and use the TRUNCATE command. This is relatively simple and can release space immediately.
If you cannot delete the entire table data and can only delete part of the historical data, you need to use the second method.
2. Use the DELETE method and add the WHERE condition to delete some data. Part of the table space deleted by this method will not be released.
If you want to release this part of the space, you need to manually execute the following statement. It is also done in two steps.
1. Enable row movement. After this operation, rowid changes are allowed.
Execute statement: alter table your table name enable row movement;
2. Reclaim space.
Execute statement: alter table your table name shrink space;
Recommended tutorial: "Oracle Video Tutorial"
The above is the detailed content of How to release deleted table space in oracle. For more information, please follow other related articles on the PHP Chinese website!