IMPORT

Syntax

IMPORT {record | *} [IGNORE_DUPS]   [AS new_table_name] [WHERE conditions];

Description

The IMPORT command:

  • creates database spaces.

  • creates nonexisting tables and indexes.

  • appends non-duplicate rows to records.

  • creates views if the export file was created using EXPORT * and imported using IMPORT *.

WARNING:

All duplicate row-checking depends on the existence of a unique index. If no unique indexes are created before loading the data, there is a potential for duplicate data.

In the IMPORT statement, the AS clause is only valid if you specify a table name.

Using * with AS or WHERE is allowed in cases where the imported data file consists only of a single table. For example,

IMPORT * AS table_name

If the data file consists of the more than one table when using * AS or WHERE, the system returns the following error message:

Error: The Input File file_name contains number_of_records records.

The table name that you specify immediately after the AS command modifier must not exceed 18 characters (including the ps_ prefix). If you do specify a table_name that exceeds 18 characters, the following error appears: Error: Unable to process create statement.

See WHERE.

Records defined using IMPORT can have a maximum of 500 columns with multiple long columns. The number of long columns allowed is determined by the limitations for long columns set by the database platform. Refer to your database vendor documentation for restrictions on the number of long columns allowed for the platform.

There are two variations of IMPORT that you can use:

  • REPLACE_ALL

  • REPLACE_DATA

Parameters

All except OUTPUT.

INPUT is a required parameter.

Note:

IGNORE_DUPS is only valid in bootstrap mode.

Example

To import a single record from an export file, use an IMPORT command for that record. For example:

SET INPUT file_name;
IMPORT PS_JOB;

To import all PeopleSoft records from an export file, including views, enter:

SET INPUT file_name;
IMPORT *;

Globalization Considerations

PeopleSoft Data Mover offers a base-language-independent method for moving application data between databases. PeopleSoft Data Mover loads a single DAT file, detects the target database base language, and inserts the data into the correct base or related language table.

If Oracle provides a software fix, you don't need to swap the base language before importing it into a database with a different base language. For example, suppose that a fix is sent with the base language English (ENG) and the related language Japanese (JAP). In this case, you can import this file directly into a database where the base language is JAP and the related language is ENG.

Upon EXPORT, the system adds the LANGUAGE_CD (language code) to the generated DAT file. For example:

SET BASE_LANGUAGE ENG

Then, when you use the IMPORT command to import the generated DAT file, the system detects the LANGUAGE_CD in the DAT file and compares it with the LANGUAGE_CD in the target database to determine how to swap the base language and related language tables.

Note:

Base language is the database base language. It can be any PeopleSoft-supported language.

Consider the following points when running the IMPORT command:

  • This feature is enabled whenever you import a DAT file.

  • Running the IMPORT command may have an unavoidable adverse affect on performance.

Related Topics