Database Reference
In-Depth Information
cupied by data in an Oracle database is spread over tablespaces, which them-
selves are spread over data files. Data files have a given size determined dur-
ing tablespace creation. One approach is to allocate a small size to the data
files initially and configure them to autoextend when additional space is required.
However, these data files do not shrink automatically if data contained in them is
deleted. After executing the purge scripts a certain amount of space will be freed
up from the [PREFIX]_SOAINFRA tablespace. However, the freed space is not
visible on disk, because the size of the data files belonging to that tablespace
is not decreased. You can execute the script discussed earlier to measure the
free size in the tablespaces to get a rough indication of the amount of free space
made available within the database by the purge operations. You can reclaim
disk space from the database using some common techniques as follows:
Deallocate unused space
Enable database row movement
Rebuild indexes and coalesces
Shrink and compact segment space
Each of the preceding activities can be applied by using the following commands
in their respective order:
ALTER TABLE <TABLE_NAME> DEALLOCATE UNUSED;
ALTER TABLE <TABLE_NAME> ENABLE ROW MOVEMENT;
ALTER TABLE <TABLE_NAME> SHRINK SPACE COMPACT;
ALTER TABLE <TABLE_NAME> SHRINK SPACE;
ALTER TABLE <TABLE_NAME> DISABLE ROW MOVEMENT;
The code bundle of this chapter contains a ReadMe.txt file containing details
to execute scripts to reclaim disk space from the database tablespaces after run-
ning the purging operation. We recommend engaging your Oracle DBA in any
database related administration activities.
Database partitioning
Database partitioning (not to be confused with metadata repository partitions) is
a feature specific to the Oracle database that allows a table, index, or index-or-
Search WWH ::




Custom Search