db2Import API - Import data into a table, hierarchy, nickname or view
Authorization
- IMPORT using the INSERT option requires one of the following authorities:
- DATAACCESS
- CONTROL privilege on each participating table, view or nickname
- INSERT and SELECT privilege on each participating table or view
- IMPORT to an existing table using the INSERT_UPDATE option, requires
one of the following authorities:
- DATAACCESS
- CONTROL privilege on the table, view or nickname
- INSERT, SELECT, UPDATE and DELETE privilege on each participating table or view
- IMPORT to an existing table using the REPLACE or REPLACE_CREATE
option, requires one of the following authorities:
- DATAACCESS
- CONTROL privilege on the table or view
- INSERT, SELECT, and DELETE privilege on the table or view
- IMPORT to a new table using the CREATE or REPLACE_CREATE option,
requires one of the following authorities:
- DBADM
- CREATETAB authority on the database and USE privilege on the table
space, as well as one of:
- IMPLICIT_SCHEMA authority on the database, if the implicit or explicit schema name of the table does not exist
- CREATEIN privilege on the schema, if the schema name of the table refers to an existing schema
- IMPORT to a table or a hierarchy that does not exist using the
CREATE, or the REPLACE_CREATE option, requires one of the following authorities:
- DBADM
- CREATETAB authority on the database, and one of:
- IMPLICIT_SCHEMA authority on the database, if the schema name of the table does not exist
- CREATEIN privilege on the schema, if the schema of the table exists
- CONTROL privilege on every sub-table in the hierarchy, if the REPLACE_CREATE option on the entire hierarchy is used
- IMPORT to an existing hierarchy using the REPLACE option requires
one of the following authorities:
- DATAACCESS
- CONTROL privilege on every sub-table in the hierarchy
Required connection
Database. If implicit connect is enabled, a connection to the default database is established.
API include file
db2ApiDf.h
API and data structure syntax
SQL_API_RC SQL_API_FN
db2Import (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
typedef SQL_STRUCTURE db2ImportStruct
{
char *piDataFileName;
struct sqlu_media_list *piLobPathList;
struct sqldcol *piDataDescriptor;
struct sqlchar *piActionString;
char *piFileType;
struct sqlchar *piFileTypeMod;
char *piMsgFileName;
db2int16 iCallerAction;
struct db2ImportIn *piImportInfoIn;
struct db2ImportOut *poImportInfoOut;
db2int32 *piNullIndicators;
struct sqllob *piLongActionString;
} db2ImportStruct;
typedef SQL_STRUCTURE db2ImportIn
{
db2Uint64 iRowcount;
db2Uint64 iRestartcount;
db2Uint64 iSkipcount;
db2int32 *piCommitcount;
db2Uint32 iWarningcount;
db2Uint16 iNoTimeout;
db2Uint16 iAccessLevel;
db2Uint16 *piXmlParse;
struct db2DMUXmlValidate *piXmlValidate;
} db2ImportIn;
typedef SQL_STRUCTURE db2ImportOut
{
db2Uint64 oRowsRead;
db2Uint64 oRowsSkipped;
db2Uint64 oRowsInserted;
db2Uint64 oRowsUpdated;
db2Uint64 oRowsRejected;
db2Uint64 oRowsCommitted;
} db2ImportOut;
typedef SQL_STRUCTURE db2DMUXmlMapSchema
{
struct db2Char iMapFromSchema;
struct db2Char iMapToSchema;
} db2DMUXmlMapSchema;
typedef SQL_STRUCTURE db2DMUXmlValidateXds
{
struct db2Char *piDefaultSchema;
db2Uint32 iNumIgnoreSchemas;
struct db2Char *piIgnoreSchemas;
db2Uint32 iNumMapSchemas;
struct db2DMUXmlMapSchema *piMapSchemas;
} db2DMUXmlValidateXds;
typedef SQL_STRUCTURE db2DMUXmlValidateSchema
{
struct db2Char *piSchema;
} db2DMUXmlValidateSchema;
typedef SQL_STRUCTURE db2DMUXmlValidate
{
db2Uint16 iUsing;
struct db2DMUXmlValidateXds *piXdsArgs;
struct db2DMUXmlValidateSchema *piSchemaArgs;
} db2DMUXmlValidate;
SQL_API_RC SQL_API_FN
db2gImport (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
typedef SQL_STRUCTURE db2gImportStruct
{
char *piDataFileName;
struct sqlu_media_list *piLobPathList;
struct sqldcol *piDataDescriptor;
struct sqlchar *piActionString;
char *piFileType;
struct sqlchar *piFileTypeMod;
char *piMsgFileName;
db2int16 iCallerAction;
struct db2gImportIn *piImportInfoIn;
struct dbg2ImportOut *poImportInfoOut;
db2int32 *piNullIndicators;
db2Uint16 iDataFileNameLen;
db2Uint16 iFileTypeLen;
db2Uint16 iMsgFileNameLen;
struct sqllob *piLongActionString;
} db2gImportStruct;
typedef SQL_STRUCTURE db2gImportIn
{
db2Uint64 iRowcount;
db2Uint64 iRestartcount;
db2Uint64 iSkipcount;
db2int32 *piCommitcount;
db2Uint32 iWarningcount;
db2Uint16 iNoTimeout;
db2Uint16 iAccessLevel;
db2Uint16 *piXmlParse;
struct db2DMUXmlValidate *piXmlValidate;
} db2gImportIn;
typedef SQL_STRUCTURE db2gImportOut
{
db2Uint64 oRowsRead;
db2Uint64 oRowsSkipped;
db2Uint64 oRowsInserted;
db2Uint64 oRowsUpdated;
db2Uint64 oRowsRejected;
db2Uint64 oRowsCommitted;
} db2gImportOut;
db2Import API parameters
- versionNumber
- Input. Specifies the version and release level of the structure passed in as the second parameter pParmStruct.
- pParmStruct
- Input/Output. A pointer to the db2ImportStruct structure.
- pSqlca
- Output. A pointer to the sqlca structure.
db2ImportStruct data structure parameters
- piDataFileName
- Input. A string containing the path and the name of the external input file from which the data is to be imported.
- piLobPathList
- Input. Pointer to an sqlu_media_list with its media_type field set to SQLU_LOCAL_MEDIA, and its sqlu_media_entry structure listing paths on the client where the LOB files can be found. This parameter is not valid when you import to a nickname.
- piDataDescriptor
- Input. Pointer to an sqldcol structure containing
information about the columns being selected for import from the external
file. The value of the dcolmeth field determines
how the remainder of the information provided in this parameter is
interpreted by the import utility. Valid values for this parameter
are:
- SQL_METH_N
- Names. Selection of columns from the external input file is by column name.
- SQL_METH_P
- Positions. Selection of columns from the external input file is by column position.
- SQL_METH_L
- Locations. Selection of columns from the external input file is
by column location. The database manager rejects an import call with
a location pair that is invalid because of any one of the following
conditions:
- Either the beginning or the ending location is not in the range from 1 to the largest signed 2-byte integer.
- The ending location is smaller than the beginning location.
- The input column width defined by the location pair is not compatible with the type and the length of the target column.
A location pair with both locations equal to zero indicates that a nullable column is to be filled with NULLs.
- SQL_METH_D
- Default. If piDataDescriptor is NULL, or is set to SQL_METH_D, default selection of columns from the external input file is done. In this case, the number of columns and the column specification array are both ignored. For DEL or IXF files, the first n columns of data in the external input file are taken in their natural order, where n is the number of database columns into which the data is to be imported.
- piActionString
- Deprecated. Replaced by piLongActionString.
- piLongActionString
- Input. Pointer to an sqllob structure containing
a 4-byte long field, followed by an array of characters specifying
an action that affects the table. The character array is of the form:
{INSERT | INSERT_UPDATE | REPLACE | CREATE | REPLACE_CREATE} INTO {tname[(tcolumn-list)] | [{ALL TABLES | (tname[(tcolumn-list)][, tname[(tcolumn-list)]])}] [IN] HIERARCHY {STARTING tname | (tname[, tname])} [UNDER sub-table-name | AS ROOT TABLE]}
- INSERT
- Adds the imported data to the table without changing the existing table data.
- INSERT_UPDATE
- Adds the imported rows if their primary key values are not in the table, and uses them for update if their primary key values are found. This option is only valid if the target table has a primary key, and the specified (or implied) list of target columns being imported includes all columns for the primary key. This option cannot be applied to views.
- REPLACE
- Deletes all existing data from the table by truncating the table
object, and inserts the imported data. The table definition and the
index definitions are not changed. (Indexes are deleted and replaced
if indexixf is in FileTypeMod, and FileType is SQL_IXF.)
If the table is not already defined, an error is returned. Note: If an error occurs after the existing data is deleted, that data is lost.This parameter is not valid when you import to a nickname.
- CREATE
- Note: The CREATE parameter is deprecated and may be removed in a future release. For additional details, see
IMPORT command options CREATE and REPLACE_CREATE are deprecated
.Creates the table definition and the row contents using the information in the specified PC/IXF file, if the specified table is not defined. If the file was previously exported by Db2®, indexes are also created. If the specified table is already defined, an error is returned. This option is valid for the PC/IXF file format only. This parameter is not valid when you import to a nickname.
- REPLACE_CREATE
- Note: The REPLACE_CREATE parameter is deprecated and may be removed in a future release. For additional details, see
IMPORT command options CREATE and REPLACE_CREATE are deprecated
.Replaces the table contents using the PC/IXF row information in the PC/IXF file, if the specified table is defined. If the table is not already defined, the table definition and row contents are created using the information in the specified PC/IXF file. If the PC/IXF file was previously exported by Db2, indexes are also created. This option is valid for the PC/IXF file format only.Note: If an error occurs after the existing data is deleted, that data is lost.This parameter is not valid when you import to a nickname. - tname
- The name of the table, typed table, view, or object view into which the data is to be inserted. An alias for REPLACE, INSERT_UPDATE, or INSERT can be specified, except in the case of a server with a previous version of the Db2 product installed, when a qualified or unqualified name should be specified. If it is a view, it cannot be a read-only view.
- tcolumn-list
- A list of table or view column names into which the data is to be inserted. The column names must be separated by commas. If column names are not specified, column names as defined in the CREATE TABLE or the ALTER TABLE statement are used. If no column list is specified for typed tables, data is inserted into all columns within each sub-table.
- sub-table-name
- Specifies a parent table when creating one or more sub-tables under the CREATE option.
- ALL TABLES
- An implicit keyword for hierarchy only. When importing a hierarchy, the default is to import all tables specified in the traversal-order-list.
- HIERARCHY
- Specifies that hierarchical data is to be imported.
- STARTING
- Keyword for hierarchy only. Specifies that the default order, starting from a given sub-table name, is to be used.
- UNDER
- Keyword for hierarchy and CREATE only. Specifies that the new hierarchy, sub-hierarchy, or sub-table is to be created under a given sub-table.
- AS ROOT TABLE
- Keyword for hierarchy and CREATE only. Specifies that the new hierarchy, sub-hierarchy, or sub-table is to be created as a stand-alone hierarchy.
The tname and the tcolumn-list parameters correspond to the tablename and the colname lists of SQL INSERT statements, and have the same restrictions.
The columns in tcolumn-list and the external columns (either specified or implied) are matched according to their position in the list or the structure (data from the first column specified in the sqldcol structure is inserted into the table or view field corresponding to the first element of the tcolumn-list).
If unequal numbers of columns are specified, the number of columns actually processed is the lesser of the two numbers. This could result in an error (because there are no values to place in some non-nullable table fields) or an informational message (because some external file columns are ignored).
This parameter is not valid when you import to a nickname.
- piFileType
- Input. A string that indicates the format of the data within the
external file. Supported external file formats are:
- SQL_ASC
- Non-delimited ASCII.
- SQL_DEL
- Delimited ASCII, for exchange with dBase, BASIC, and the IBM® Personal Decision Series programs, and many other database managers and file managers.
- SQL_IXF
- PC version of the Integration Exchange Format, the preferred method for exporting data from a table so that it can be imported later into the same table or into another database manager table.
- piFileTypeMod
- Input. A pointer to a structure containing a 2-byte long field,
followed by an array of characters that specify one or more processing
options. If this pointer is NULL, or the structure pointed to has
zero characters, this action is interpreted as selection of a default
specification.
Not all options can be used with all of the supported file types. See related link "File type modifiers for the import utility".
- piMsgFileName
- Input. A string containing the destination for error, warning, and informational messages returned by the utility. It can be the path and the name of an operating system file or a standard device. If the file already exists, it is appended to. If it does not exist, a file is created.
- iCallerAction
- Input. An action requested by the caller. Valid values are:
- SQLU_INITIAL
- Initial call. This value must be used on the first call to the API. If the initial call or any subsequent call returns and requires the calling application to perform some action before completing the requested import operation, the caller action must be set to one of the following values:
- SQLU_CONTINUE
- Continue processing. This value can only be used on subsequent calls to the API, after the initial call has returned with the utility requesting user input (for example, to respond to an end of tape condition). It specifies that the user action requested by the utility has completed, and the utility can continue processing the initial request.
- SQLU_TERMINATE
- Terminate processing. This value can only be used on subsequent calls to the API, after the initial call has returned with the utility requesting user input (for example, to respond to an end of tape condition). It specifies that the user action requested by the utility was not performed, and the utility is to terminate processing the initial request.
- piImportInfoIn
- Input. Pointer to the db2ImportIn structure.
- poImportInfoOut
- Output. Pointer to the db2ImportOut structure.
- piNullIndicators
- Input. For ASC files only. An array of integers that indicate whether or not the column data is nullable. The number of elements in this array must match the number of columns in the input file; there is a one-to-one ordered correspondence between the elements of this array and the columns being imported from the data file. Therefore, the number of elements must equal the dcolnum field of the piDataDescriptor parameter. Each element of the array contains a number identifying a column in the data file that is to be used as a null indicator field, or a zero indicating that the table column is not nullable. If the element is not zero, the identified column in the data file must contain a Y or an N. A Y indicates that the table column data is NULL, and N indicates that the table column data is not NULL.
- piXmlPathList
- Input. Pointer to an sqlu_media_list with its media_type field set to SQLU_LOCAL_MEDIA, and its sqlu_media_entry structure listing paths on the client where the XML files can be found.
db2ImportIn data structure parameters
- iRowcount
- Input. The number of physical records to be loaded. Allows a user to load only the first iRowcount rows in a file. If iRowcount is 0, import will attempt to process all the rows from the file.
- iRestartcount
- Input. The number of records to skip before starting to insert or update records. Functionally equivalent to iSkipcount parameter. iRestartcount and iSkipcount parameters are mutually exclusive.
- iSkipcount
- Input. The number of records to skip before starting to insert or update records. Functionally equivalent to iRestartcount.
- piCommitcount
- Input. The number of records to import before committing them to the database. A commit is performed whenever piCommitcount records are imported. A NULL value specifies the default commit count value, which is zero for offline import and AUTOMATIC for online import. Commitcount AUTOMATIC is specified by passing in the value DB2IMPORT_COMMIT_AUTO.
- iWarningcount
- Input. Stops the import operation after iWarningcount warnings. Set this parameter if no warnings are expected, but verification
that the correct file and table are being used is required. If the
import file or the target table is specified incorrectly, the import
utility will generate a warning for each row that it attempts to import,
which will cause the import to fail.
If iWarningcount is 0, or this option is not specified, the import operation will continue regardless of the number of warnings issued.
- iNoTimeout
- Input. Specifies that the import utility will not time out while
waiting for locks. This option supersedes the locktimeout database configuration parameter. Other applications are not affected.
Valid values are:
- DB2IMPORT_LOCKTIMEOUT
- Indicates that the value of the locktimeout configuration parameter is respected.
- DB2IMPORT_NO_LOCKTIMEOUT
- Indicates there is no timeout.
- iAccessLevel
- Input. Specifies the access level. Valid values are:
- - SQLU_ALLOW_NO_ACCESS
- Specifies that the import utility locks the table exclusively.
- - SQLU_ALLOW_WRITE_ACCESS
- Specifies that the data in the table should still be accessible to readers and writers while the import is in progress.
An intent exclusive (IX) lock on the target table is acquired when the first row is inserted. This allows concurrent readers and writers to access table data. Online mode is not compatible with the REPLACE, CREATE, or REPLACE_CREATE import options. Online mode is not supported in conjunction with buffered inserts. The import operation will periodically commit inserted data to prevent lock escalation to a table lock and to avoid running out of active log space. These commits will be performed even if the piCommitCount parameter was not used. During each commit, import will lose its IX table lock, and will attempt to reacquire it after the commit. This parameter is required when you import to a nickname and piCommitCount parameter must be specified with a valid number (AUTOMATIC is not considered a valid option).
- piXmlParse
- Input. Type of parsing that should occur for XML documents. Valid
values found in the db2ApiDf header file in the include directory, are:
- DB2DMU_XMLPARSE_PRESERVE_WS
- Whitespace should be preserved.
- DB2DMU_XMLPARSE_STRIP_WS
- Whitespace should be stripped.
- piXmlValidate
- Input. Pointer to the db2DMUXmlValidate structure. Indicates that XML schema validation should occur for XML documents.
db2ImportOut data structure parameters
- oRowsRead
- Output. Number of records read from the file during import.
- oRowsSkipped
- Output. Number of records skipped before inserting or updating begins.
- oRowsInserted
- Output. Number of rows inserted into the target table.
- oRowsUpdated
- Output. Number of rows in the target table updated with information from the imported records (records whose primary key value already exists in the table).
- oRowsRejected
- Output. Number of records that could not be imported.
- oRowsCommitted
- Output. Number of records imported successfully and committed to the database.
db2DMUXmlMapSchema data structure parameters
- iMapFromSchema
- Input. The SQL identifier of the XML schema to map from.
- iMapToSchema
- Input. The SQL identifier of the XML schema to map to.
db2DMUXmlValidateXds data structure parameters
- piDefaultSchema
- Input. The SQL identifier of the XML schema that should be used for validation when an XDS does not contain an SCH attribute.
- iNumIgnoreSchemas
- Input. The number of XML schemas that will be ignored during XML schema validation if they are referred to by an SCH attribute in XDS.
- piIgnoreSchemas
- Input. The list of XML schemas that will be ignored during XML schema validation if they are referred to by an SCH attribute in XDS.
- iNumMapSchemas
- Input. The number of XML schemas that will be mapped during XML schema validation. The first schema in the schema map pair represents a schema that is referred to by an SCH attribute in an XDS. The second schema in the pair represents the schema that should be used to perform schema validation.
- piMapSchemas
- Input. The list of XML schema pairs, where each pair represents a mapping of one schema to a different one. The first schema in the pair represents a schema that is referred to by an SCH attribute in an XDS. The second schema in the pair represents the schema that should be used to perform schema validation.
db2DMUXmlValidateSchema data structure parameters
- piSchema
- Input. The SQL identifier of the XML schema to use.
db2DMUXmlValidate data structure parameters
- iUsing
- Input. A specification of what to use to perform XML schema validation.
Valid values found in the db2ApiDf header file
in the include directory, are:
- - DB2DMU_XMLVAL_XDS
- Validation should occur according to the XDS. This corresponds to the CLP "XMLVALIDATE USING XDS" clause.
- - DB2DMU_XMLVAL_SCHEMA
- Validation should occur according to a specified schema. This corresponds to the CLP "XMLVALIDATE USING SCHEMA" clause.
- - DB2DMU_XMLVAL_SCHEMALOC_HINTS
- Validation should occur according to schemaLocation hints found within the XML document. This corresponds to the "XMLVALIDATE USING SCHEMALOCATION HINTS" clause.
- piXdsArgs
- Input. Pointer to a db2DMUXmlValidateXds structure,
representing arguments that correspond to the CLP "XMLVALIDATE USING
XDS" clause.
This parameter applies only when the iUsing parameter in the same structure is set to DB2DMU_XMLVAL_XDS.
- piSchemaArgs
- Input. Pointer to a db2DMUXmlValidateSchema structure, representing arguments that correspond to the CLP "XMLVALIDATE
USING SCHEMA" clause.
This parameter applies only when the iUsing parameter in the same structure is set to DB2DMU_XMLVAL_SCHEMA.
db2gImportStruct data structure specific parameters
- iDataFileNameLen
- Input. Specifies the length in bytes of piDataFileName parameter.
- iFileTypeLen
- Input. Specifies the length in bytes of piFileType parameter.
- iMsgFileNameLen
- Input. Specifies the length in bytes of piMsgFileName parameter.
Usage notes
- Close all open cursors that were defined with the WITH HOLD clause, and commit the data changes by executing the COMMIT statement.
- Roll back the data changes by executing the ROLLBACK statement.
The import utility adds rows to the target table using the SQL INSERT statement.
- If it is likely that subsequent INSERT statements can be successful, a warning message is written to the message file, and processing continues.
- If it is likely that subsequent INSERT statements will fail, and there is potential for database damage, an error message is written to the message file, and processing halts.
The utility performs an automatic COMMIT after the old rows are deleted during a REPLACE or a REPLACE_CREATE operation. Therefore, if the system fails, or the application interrupts the database manager after the table object is truncated, all of the old data is lost. Ensure that the old data is no longer needed before using these options.
If the log becomes full during a CREATE, REPLACE, or REPLACE_CREATE operation, the utility performs an automatic COMMIT on inserted records. If the system fails, or the application interrupts the database manager after an automatic COMMIT, a table with partial data remains in the database. Use the REPLACE or the REPLACE_CREATE option to rerun the whole import operation, or use INSERT with the iRestartcount parameter set to the number of rows successfully imported.
By default, automatic COMMITs are not performed for the INSERT or the INSERT_UPDATE option. They are, however, performed if the *piCommitcount parameter is not zero. A full log results in a ROLLBACK.
Whenever the import utility performs a COMMIT, two messages are written to the message file: one indicates the number of records to be committed, and the other is written after a successful COMMIT. When restarting the import operation after a failure, specify the number of records to skip, as determined from the last successful COMMIT.
The import utility accepts input data with minor incompatibility problems (for example, character data can be imported using padding or truncation, and numeric data can be imported with a different numeric data type), but data with major incompatibility problems is not accepted.
- Drop all foreign keys in which the table is a parent.
- Run the import utility.
- Alter the table to re-create the foreign keys.
If an error occurs while recreating the foreign keys, modify the data to maintain referential integrity.
Referential constraints and foreign key definitions are not preserved when creating tables from PC/IXF files. (Primary key definitions are preserved if the data was previously exported using SELECT *.)
Importing to a remote database requires enough disk space on the server for a copy of the input data file, the output message file, and potential growth in the size of the database.
If an import operation is run against a remote database, and the output message file is very long (more than 60 KB), the message file returned to the user on the client may be missing messages from the middle of the import operation. The first 30 KB of message information and the last 30 KB of message information are always retained.
Non-default values for piDataDescriptor, or specifying an explicit list of table columns in piLongActionString, makes importing to a remote database slower.
The database table or hierarchy must exist before data in the ASC or DEL file formats can be imported; however, if the table does not already exist, IMPORT CREATE or IMPORT REPLACE_CREATE creates the table when it imports data from a PC/IXF file. For typed tables, IMPORT CREATE can create the type hierarchy and the table hierarchy as well.
PC/IXF import should be used to move data (including hierarchical data) between databases. If character data containing row separators is exported to a delimited ASCII (DEL) file and processed by a text transfer program, fields containing the row separators will shrink or expand.
The data in ASC and DEL files is assumed to be in the code page of the client application performing the import. PC/IXF files, which allow for different code pages, are recommended when importing data in different code pages. If the PC/IXF file and the import utility are in the same code page, processing occurs as for a regular application. If the two differ, and the FORCEIN option is specified, the import utility assumes that data in the PC/IXF file has the same code page as the application performing the import. This occurs even if there is a conversion table for the two code pages. If the two differ, the FORCEIN option is not specified, and there is a conversion table, all data in the PC/IXF file will be converted from the file code page to the application code page. If the two differ, the FORCEIN option is not specified, and there is no conversion table, the import operation will fail. This applies only to PC/IXF files on Db2 for AIX® clients.
For table objects on an 8KB page that are close to the limit of 1012 columns, import of PC/IXF data files may cause Db2 to return an error, because the maximum size of an SQL statement was exceeded. This situation can occur only if the columns are of type CHAR, VARCHAR, or CLOB. The restriction does not apply to import of DEL or ASC files.
Db2 Connect can be used to import data to DRDA servers such as Db2 for OS/390®, Db2 for VM and VSE, and Db2 for OS/400®. Only PC/IXF import (INSERT option) is supported. The restartcnt parameter, but not the commitcnt parameter, is also supported.
When using the CREATE option with typed tables, create every sub-table defined in the PC/IXF file; sub-table definitions cannot be altered. When using options other than CREATE with typed tables, the traversal order list enables one to specify the traverse order; therefore, the traversal order list must match the one used during the export operation. For the PC/IXF file format, one need only specify the target sub-table name, and use the traverse order stored in the file. The import utility can be used to recover a table previously exported to a PC/IXF file. The table returns to the state it was in when exported.
Data cannot be imported to a system table, a declared temporary table, a created temporary table, or a summary table.
Views cannot be created through the import utility.
- Importing logically split PC/IXF files is not supported.
- Importing bad format PC/IXF files is not supported.
Federated considerations
When using the db2Import API and the INSERT, UPDATE, or INSERT_UPDATE parameters, you must ensure that you have CONTROL privilege on the participating nickname. You must ensure that the nickname you want to use when doing an import operation already exists.