Moving or Renaming the Data Files of a Tablespace
Use
You can use SAPDBA for Oracle to move or rename the data files of a tablespace.
Prerequisites
You have configured and started SAPDBA. Refer to
Getting Started with SAPDBA.
You have completed the
Preparations for Reorganization, especially
Backing Up the Database for Reorganization.
You have
shut down the Oracle database and then
started it in restricted session mode.
SAPDBA logs the reorganization in
Central Log reorg<DBSID>.log.
Procedure
Choose Reorganization ® Move/rename data files of a tablespace.
Enter Tablespace name.
This is the name of the tablespace for which you want to move or rename the data files.
Enter the Working directory.
This is the working directory for the reorganization. The default is
<SAPDATA_HOME>/sapreorg
or
<SAPREORG>
, based on the environment variable
SAPREORG
. Logs and scripts are saved in this directory. For more information on
<SAPREORG>
, see
Environment Variables (UNIX) and
Environment Variables (Windows NT).Choose Start to prepare for the reorganization.
SAPDBA prepares for the reorganization by:
- Prompting to make sure that you
backed up the database
- Warning you if the SAP System is still running
Checking for freespace
Checking for space in the dump file if you are using the export/import method
<timestamp>
subdirectory in the working directory
<timestamp>.rmv
log
Scripts required to perform the reorganization
restart.rmv
file for restart in the
<timestamp>
subdirectory
- Reply to the prompts in the preparation phase as necessary.
SAPDBA prompts you to change the data file specification.
- Enter the number of the data file that you want to change and choose a new path on a file system or raw device.
SAPDBA performs the final checks and prompts you to start the reorganization.
- Choose how to start the reorganization:
- Immediately in the foreground
- In the
background
Not now, but possibly later
If you chose the
SYSTEM
tablespace or a tablespace with rollback segments, SAPDBA closes the database instance with
shutdown immediate
. The instance is then brought to mount status. After the reorganization, SAPDBA opens the database.For all other tablespaces, SAPDBA puts the tablespace offline but the database remains open. After the reorganization, SAPDBA puts the tablespace online.
Result
On successful completion, SAPDBA displays a confirmation message.
If there has been an error, SAPDBA displays the appropriate error message. You can
restart the reorganization after fixing the problem.After the reorganization, you must
back up the database. SAPDBA displays the backup menu on completion.