Entering content frameProcedure documentation Restarting a Reorganization Locate the document in its SAP Library structure

Use

You can restart a reorganization with SAPDBA for Oracle:

In certain circumstances, you can reset the reorganization, which means setting the database back to how it was before the reorganization. We recommend that you only reset the reorganization if you do not want to restart it. SAPDBA only displays the Reset option in the reorganization menu if a reset is possible.

Prerequisites

You can use SAPDBA to do this as described in "Procedure" below or find it yourself on disk as follows (these are default locations):

See the example below. To find the extension, refer to the documentation for the procedure that you want to restart. You can also find this information in SAPDBA Scripts and Files.

Example

The log 0011281141.rsi refers to reorganization of a single table or index on 28 th November 2000 at 11:41. In this example on a UNIX system, you can find the restart file restart.rsi and scripts in the directory <SAPDATA_HOME>/sapreorg/012281141 .

Procedure

Caution

If you overwrite the default answer [N] to the question: Error in... - Do you want to continue<Y/N> [N] with Y(es) and continue despite the warnings, you are responsible for the consequences. SAPDBA continues the processing as if the error never occurred.

  1. If the reorganization terminated abnormally, identify and fix the error, using the log described above in "Prerequisites". To find the log:
    1. Choose Show/Cleanup ® Show log files/profiles ® SAPDBA log files.
    2. Select the log <timestamp>.<extension> written during the operation that failed, and examine it to find the cause of the error.
    3. If required, find the restart file.

For more information about the log and the restart file, see "Prerequisites" above.

Caution

Always make sure you have found the correct log and restart file before you restart a reorganization.

  1. If the reorganization terminated abnormally, identify when the error occurred and decide how to proceed:

When the error occurred

How to proceed

Preparation phase, that is, during the generation of the reorganization scripts

Repeat the reorganization from the beginning, but do not try to restart or reset it.

Nothing has been altered in the database and a restart is not possible because not all the required scripts are present.

Initial processing of scripts before constraints have been deleted and tables renamed

Restart the reorganization.

Initial processing of scripts after constraints have been deleted and tables renamed

Restart the reorganization.

Reset the reorganization if you do not want to restart it.

Later processing of scripts, when tables, indexes, or tablespaces have already been deleted

Restart the reorganization.

You can not reset the reorganization.

  1. From the SAPDBA main menu choose Reorganization ® Restart.
  2. Enter the Working directory, which is the same as you used to start the reorganization originally.
  3. Enter the Restart directory.
  4. The default value for the Restart subdirectory is the <timestamp> directory of the last operation performed. If required, change this to the directory for the reorganization that you want to start.

    SAPDBA displays a short description of the operation in the function field.

  5. To see which scripts are to be processed by the restart, select Show restart plan. If in doubt, we recommend you to use this option and look closely at the restart plan.
  6. If you want to reset the reorganization – only possible if indexes or tablespaces have not already been deleted – choose Reset.
  7. If possible, SAPDBA resets the database to the state it was in before the failed reorganization. For example, SAPDBA sets tables that were renamed back to their original names and recreates deleted constraints. SAPDBA automatically runs the con<TSP>sql and ren<TSP>.sql scripts during a reset.

    Note

    Resetting a reorganization is usually only worthwhile when you do not want to restart the reorganization. If, despite this, you still want to restart after the reset, then you must manually set back all the ‘Y’ status indicators to ‘N’ in the restart plan before restarting.

  8. Choose Restart to restart the reorganization immediately or Restart in Batch if you want to restart it in the background or later on.

SAPDBA restarts the reorganization.

Result

On successful completion, SAPDBA displays a confirmation message.

Caution

Depending on the type of reorganization that you restarted, you might need to back up the database or at least the reorganized tablespaces. Refer to the documentation on the procedure that you are restarting.

Leaving content frame