Oracle7 Server Utilities
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:
- assigns IMP_FULL_DATABASE to the DBA role
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:
- Enter the command IMP username/password PARFILE=filename. PARFILE is a file containing the Import parameters you typically use. If you use different parameters for different databases, you can have multiple PARFILES. This is the preferred method.
- Enter the command IMP username/password followed by various parameters you intend to use. Note that the number of parameters cannot exceed the maximum length of a command line on your operating system.
- Enter the command IMP username/password to begin an interactive session, and let Import prompt you for the information it needs. The interactive option does not provide as much functionality as the parameter-driven method. It exists only for backward compatibility.
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 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.