Oracle7 Server Utilities

Contents Index Home Previous Next

Using Import

Before Using Import

To use Import, the script CATEXP.SQL must be run. After creating the database, do one of the following:

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

CATEXP.SQL only needs to be run once. Once run, it does not need to be run again before future imports. CATEXP.SQL performs the following operations to prepare the database for Import:

Note: You can import any export file into a Trusted Oracle7 database. For example, if you create an export file from an OS MAC database, you can import that file into a DBMS MAC database.

Invoking Import

You can invoke Import in three ways:

The username and password can also be specified in the parameter file, although, for security reasons, it is not recommended that you do so.

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

Getting Online Help

Import provides online help. Enter IMP HELP=Y on the command line to see a help screen like the one shown in Figure 2 - 2:

Figure 2 - 2. Import Help Screen

The Parameter File

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

For example:

IMP PARFILE=filename
IMP 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

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

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 a 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 quotes. See your Oracle operating system-specific documentation.

For example, if a parameter file contains the line

TABLES=(EMP#, DEPT, MYDATA)

then nothing after EMP# is seen as input by Import. As a result, DEPT and MYDATA are not imported.

The following modification fixes the problem:

TABLES=("EMP#", DEPT, MYDATA)

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


Contents Index Home Previous Next