Clean Full Oracle Tablespace: Step-by-Step
When the Oracle tablespace is full, you can clean it up with the following steps:
- Check the usage status of the tablespace:
- Retrieve the tablespace names and their corresponding usage percentages from the database table “dba_tablespace_usage_metrics.”
- Clean up temporary files in the tablespace.
- Resize the database temporary file named ‘temp_file_name’ to xxx megabytes.
- Clean up log files in the table space.
- Retrieve the group number and member information from the v$logfile view.
Then, alter the database to drop the logfile group specified by the group number. - Clean up the rollback segments in the tablespace.
- Retrieve the name of the rollback segment from the database and adjust its storage by setting an optimal size of xxxM.
- cleaning up data files in the tablespace
- Resize the database data file named ‘data_file_name’ to xxx megabytes.
- Clean up unused objects and indexes in the table space.
- Get the owner and segment name from the dba_segments where the tablespace name is ‘tablespace_name’.
Remove the table table_name and the index index_name.
Please make sure to back up important data before cleaning up the table space, and proceed with caution based on the actual situation.