Restart File for Export/Import 

The name of a restart file follows the naming convention: <ORACLE_HOME>/sapreorg/<timestamp>/restart.<ext> .

Function ID <ext> : shows the SAPDBA function that the scripts in this file were written for.

Possible Function IDs for an Export/Import

exd

Export/import of tables with indexes and data

exs

Export/import of tables and index definitions (structure export)

exg

Export/import of constraints, synonyms, sequences, views and grants (structure export)

These values are identical with the extension of the corresponding export log <ORACLE_HOME>/sapreorg/<timestamp>.<ext> .

Logs with the following extensions are also created during the import:

imd

Log for importing tables with indexes and data

ims

Log for structure import (table and index definitions, constraints, synonyms, sequences, views and grants)

 

The restart file contains the scripts that are processed during an export or an import, e.g. a selection of the following scripts:

alt<TSP>.sql , exp<TSP>.sh , exc<TSP>.sh , tab<TSP>.sql , imp<TSP>.sh , imc<TSP>.sh , ind<TSP>.sql , con<TSP>.sql , grants.sql , cssvg<DBSID>.sql, imx<TSP>.sh, inx<TSP>.sql, unl<TSP>.sh, ldr<TSP>.sh.

 

For an overview of the scripts used by SAPDBA please see the section SAPDBA Scripts and Files. Also note the changes to the scripts when you use the tools SAP unload/SAP load and SAP unload/SQL*Loader (see SAP Unload/Load, SQL*Loader).

Script Indicators

When you start the respective operation (export or import), the scripts in the restart file are processed one by one. The flag by each script tells you whether the script was processed successfully or not. The following flags for the scripts in the restart file are possible:

Y

Script processed successfully

N

Script not yet processed / incorrectly processed. Before the export is started, all scripts either have this indicator or the indicator I.

I

Script is only processed for the import, not during the export. When the import is started for the very first time, these scripts are automatically marked with N by SAPDBA so that they can be included in the process (only applies to a data import, and not to a structure import).

S

The data import was already started, but could not be correctly terminated due to an external error (e.g. power failure, or termination by a kill command).Scripts marked with S are automatically processed again when there is a restart.

 

When using SAPunload/load or ORACLE SQL*Loader the same indicators (apart from ‘l’) also appear in the parameter file ldr<TSP>.par .

Scripts marked with N are always processed during an export/import and are assigned the indicator Y after the process has been finished successfully. The import shell scripts are assigned the indicator S during the import. When using the loader program the table that is being loaded is indicated by ‘S’ in the parameter file ldr<TSP>.par.

When restarting the loader (SAP Loader or ORACLE SQL*Loader) only the table indicated with ‘S’ in the parameter file will be deleted in which the loading process aborted. In contrast to this, all tables belonging to the script indicated with ‘S’ will be deleted before a restart of the ORACLE import.

During an export, all necessary import scripts are created and included in the corresponding restart file (function ID exd , exs , or exg ). However, the respective import scripts are marked with I and are therefore not processed during the export. The indicator is not changed to N until the import process is started, so that SAPDBA includes these scripts in the process.

Never change the sequence of the scripts in the restart file! It defines the flow of the corresponding export/import operations.

In contrast to a reorganization, the command DROP TABLE and not the ORACLE command TRUNCATE is used to delete the contents of tables which were already incompletely imported (since indexes also have to be deleted here) when a data import is restarted (with ORACLE Import, SAP load or SQL*Loader).

This means that indicator Y has to be reset to N manually in the restart file for scripts tab<TSP>.sql before a data import is restarted.

It is no longer necessary to manually delete the incompletely imported tables as in earlier SAPDBA versions (up to and including 3.0C).