Oracle7 Server Utilities

Contents Index Home Previous Next

Using Export

Before Using Export

To use Export, the script CATEXP.SQL or CATALOG.SQL (which runs CATEXP.SQL) must be run after the database has been created.

Additional Information: The actual names of the script files depend on your operating system. The script file names and the method for running them are described in your Oracle operating system-specific documentation.

CATEXP.SQL or CATALOG.SQL only needs to be run once. Once run, it need not be run before future exports. The following operations are performed to prepare the database for Export.

Before running Export, ensure that there is enough disk or tape storage space to write the export file to. If there is not enough space, Export will terminate with a write-failure error. You can use table sizes to estimate the maximum space needed. Table sizes can be found in the USER_SEGMENTS view in the Oracle data dictionary (see the Oracle7 Server Administrator's Guide for more information).

Invoking Export

You can invoke Export in three ways:

The username and password can also be specified in the parameter file, although for security reasons, this is not recommended.

If you omit username/password, Export will prompt you for it.

Getting Online Help

Export provides online help. Enter EXP HELP=Y on the command line to see a help screen like the one shown in Figure 1 - 2.

Figure 1 - 2. Export Help Screen

The Parameter File

The parameter file allows you to specify Export parameters in a file where they can easily be modified or reused. Create the parameter file using any flat file text editor. The command line option PARFILE=<filename> tells Export to read the parameters from the specified file rather than from the command line. For example:

EXP PARFILE=filename
EXP username/password PARFILE=filename

The syntax for parameter file specifications is:

KEYWORD=value

or

KEYWORD=(value) or KEYWORD=(value1, value2, ...)

The following is an example of a partial parameter file listing:

FULL=Y
FILE=DBA.DMP
GRANTS=Y
INDEXES=Y
CONSISTENT=Y
...

Additional Information: The maximum size of the parameter file may be limited and operating system file naming conventions will apply. See your Oracle operating system-specific documentation for more information.

Comments in the Parameter File

You can add comments to the parameter file by preceding them with the # sign. All characters to the right of the # sign are ignored.

Table Name Restrictions

Table names specified on the command line cannot include a # sign, unless the table name is enclosed in quotation marks. Similarly, in the parameter file, if a table has a # sign in the name, the rest of the line is interpreted as a comment unless the table name is enclosed in quotation marks.

Additional Information: Some operating systems require single vs. double quote marks, or vice versa. See your Oracle operating system-specific documentation.

For example, if the parameter file contains the line:

TABLES=(EMP#, DEPT, MYDATA)

nothing on the line after EMP# is seen as input by Export. As a result, DEPT and MYDATA are not exported.

Attention: When the name is specified in quotation marks, it is case-sensitive. The name must therefore exactly match the table name stored in the database. By default, database names are stored as uppercase.


Contents Index Home Previous Next