Reorganization of a Tablespace 
SAPDBA actions to reorganize a tablespace (without data file reorganization) (script name):
Preparation Phase
Main Phase
1. If necessary, temporarily renames the tables to be reorganized or to be affected by the reorganization (
nam<TSP>.sql , see HideTab option in the SAPDBA: Reorganization Menu).2. Only when exporting to tape (due to interactive export mode):
Deletes all the index statistics (
3. Exports all tables and indexes of the tablespace (
exp<TSP>.sh or unl<TSP>.sh and if necessary exc<TSP>.sh ; not with Create table ... as select); see also Parallel Export/Import.4. If necessary, performs a test import to check the readability of the export dump files (
imx<TSP>.sh , see CheckExp option in the SAPDBA: Reorganization Menu).5. Deletes the tables and indexes (
dro<TSP>.sql ); not with Create table ... as select.6. Merges all the remaining adjoining freespace fragments of the entire database using Oracle functions.
7. Recovery of the tables, if necessary with comments. With Create table ... as select the old table is deleted in this step and the new table is renamed with the old name (
tab<TSP>.sql ).8. Imports the table files, indexes, grants, comments and constraints (
imp<TSP>.sh or ldr<TSP>.sh and if necessary imp<TSP>.sh , ind<TSP>.sql , con<TSP>.sql , grants.sql ).9. If necessary, sets back the names of the tables temporarily renamed (under step 1) for data protection (
ren<TSP>.sql , see HideTab option).