Entering content frameObject documentation SAPDBA Scripts and Files Locate the document in its SAP Library structure

Definition

SAPDBA generates scripts containing the instructions required to perform functions such as export, import, and reorganization. SAPDBA automatically starts each required script.

For more information on a script, refer to the section that describes the corresponding function. If an error occurs, you can use the Restart function to resume the reorganization or the export or import. If this attempt also fails, you can start the required scripts manually. See "Starting the Scripts" below.

SAPDBA stores all the scripts (and also the named pipes in case of compression) in subdirectories of the working directory. This is generally the directory <SAPDATA_HOME>/sapreorg or <SAPREORG> with the corresponding <timestamp> directories, which specify the date and time of the executed operation.

The export dump files (possibly compressed) are stored in <timestamp> subdirectories of the dump directory or on tape (as defined in Export dump destination). The default value for the dump directory is specified by one of the following:

If several export dump destinations were defined, there are a corresponding number of export dump files, export and import shell scripts, and parameter files. See "Information in the Export Dump Destination – Script Names" below.

Structure

Overview of SAPDBA Scripts and Files

Name

Use

alt<TSP>.sql

Deletion of index analysis. Only before exporting tables and their data, reorganizing lists of objects and reorganizing tablespaces with or without data files.

cssvg<DBSID>.sql

Script for creating constraints, grants, synonyms, sequences, and views.

con<TSP>.sql

Script for creating constraints.

drc<TSP>.sql

Script used during reorganization of tablespaces that deletes the constraints.

dro<TSP>.sql

Script that contains the DROP commands required during a reorganization.

grants.sql

Script for defining grants. It is only generated during the export of table and index definitions (structure export).

ind<TSP>.sql

Script for creating indexes. When an export with data is performed, this script is not used in certain cases.

inx<TSP>.sql

SQL script created during a test import. It is not used in reorganizations.

nam<TSP>.sql

Script for temporarily renaming tables during a reorganization.

rnm<TSP>.sql

Script for temporarily renaming a table during the a reorganization, with delayed deletion of the data (deferred mode).

ren<TSP>.sql

Script containing the necessary rename commands if the data file assignment of a tablespace is changed (move or rename). It can also be used to reset temporary renaming of tables during reorganizations.

swi<TSP>.sql

Script used during a reorganization with data files that triggers certain security mechanisms (such as redo log file switch, backup of the control file).

tab<TSP>.sql

Script for creating tables.

tsp<TSP>.sql

Script used to create tablespaces during the reorganization of tablespaces with data files.

exc<TSP>.sh

Script for compressing (compress) or splitting (BRTOOLS) export dump files.

exp<TSP>.sh

Oracle export of tables and their data

exc<TSP>.par

Parameter file for BRTOOLS

exp<TSP>.par

Parameter file for export and import

exp<TSP>.dmp

Export file or named pipe (if you compress data or split it with BRTOOLS) that contains tables with data.

exp<TSP>.dmp.Z

Compressed export file

exp<TSP>.dmp.<m>

exp<TSP>.dmp.Z.<m>

Export dump files can be split into several smaller files <m> with BRTOOLS.

imc<TSP>.sh

Script for decompressing or merging (BRTOOLS) split export dump files for the Oracle import.

imp<TSP>.sh

Oracle import of tables and their data (including grants)

imx<TSP>.sh

Shellscript for test import (dump file check)

del<TSP>.sh

Script containing operating system commands for deleting old files, links, and directories and commands for creating new directories and links in case of a reorganization with data files or a change to the data file assignment of a tablespace.

Note

The following scripts are not generated when only indexes are involved in an export or reorganization:

exc|exp<TSP>.sh, imp|imc<TSP>.sh, tab<TSP>.sql, grants.sql, exp<TSP>.dmp, exp<TSP>.dmp.Z, exp<TSP>.par,
imx<TSP>.sh, inx<TSP>.sql

Integration

Information in the Export Dump Destination – Script Names

Script names: exc|exp|imp|imc|imx<TSP>.<ext>

TSP : ID of the tablespace

ext: dmp|dmp.Z|sh|par|sql

All export dump files are saved in the specified directory. If you export to tape, only one export dump file is generated for all the tables to be exported.

Script names: exc|exp|imp|imc|imx|<TSP>_<n>.<ext>

TSP : ID of the tablespace of the first table to be edited

n : Number of targets defined in Export dump destination

ext: dmp|dmp.Z|sh|par|sql

Depending on the degree of parallelism – see Parallel Export and Import – both cases can be edited either sequentially or in parallel.

Use

Starting the Scripts

When an export, import, or reorganization process is terminated, you can use the restart functionality of SAPDBA to repeat the process starting at the corresponding location. You only have to resort to alternative possibilities for starting the individual scripts if such an attempt fails.

If you start the scripts using one of the options specified below, you must adhere to the order in which you call the scripts. Refer to the relevant information in the log written during the corresponding process and in the restart file.

Note

Only use the options for starting the individual scripts described in this section in an emergency.

Starting Individual SQL Scripts with SAPDBA

Starting SQL Scripts Manually with SQLPLUS

Starting Shell Scripts for Oracle Export and Import

Leaving content frame