Syntax of the dbimport command

The dbimport command imports previously exported data into another database.

Read syntax diagramSkip visual syntax diagram
             V          |                          (1)   
>>-dbimport----+------+-+--| Input-File Location |-------------->
               +- -c--+                                  
               +- -D--+                                  
               +- -nv-+                                  
               +- -q--+                                  
               '- -X--'                                  

>--| Create Options |------+-----------+--database-------------><
                           +- -V-------+             
                           '- -version-'             

  1. See dbimport input-file location options
  2. See dbimport create options
Element Purpose Key Considerations
-c Completes importing data even when certain nonfatal errors occur For more information, see dbimport errors and warnings.
-D Specifies a default extent size of 16 KB for the first and subsequent extents during the import operation, if the extent sizes are not specified in the CREATE TABLE statement. This option is ignored if the extent sizes are specified in the CREATE TABLE statement.

Default values help to ensure that enough space is available in the dbspace that is designated for the import operation. This option prevents the automatic calculation of extent sizes during the import operation, and is useful especially in the following situations:

  • When importing tables that contain columns with large maximum row sizes, such as LVARCHAR columns.
  • When importing data after the dbexport command was run without the -ss option. The -ss option specifies server-specific information about extent sizes.
-nv While the dbimport -nv command is running, tables with foreign-key constraints that ALTER TABLE ADD CONSTRAINT creates in enabled or filtering mode are not checked for violations, as if you had also specified NOVALIDATE By bypassing the checking of referential constraints, this option can reduce migration time for very large tables that already conform to their foreign-key constraints. The NOVALIDATE mode does not persist after the ALTER TABLE ADD CONSTRAINT statement has completed.
-q Suppresses the display of error messages, warnings, and generated SQL data-definition statements None.
-V Displays the software version number and the serial number None.
-version Extends the -V option to display additional information about the build operating system, build number, and build date None.
-X Recognizes HEX binary data in character fields None.
database Declares the name of the database to create If you want to use more than the simple name of the database, see Database Name .
The dbimport utility can use files from the following location options:
  • All input files are on disk.
  • All input files are on tape.
  • The schema file is on disk, and the data files are on tape.
Important: Do not put comments into your input file. Comments might cause unpredictable results when the dbimport utility reads them.
The dbimport utility supports the following tasks for an imported Informix® database server:
  • Specify the dbspace where the database will reside
  • Create an ANSI-compliant database with unbuffered logging
  • Create a database that supports explicit transactions (with buffered or unbuffered logging)
  • Create an unlogged database
  • Create a database with the NLS case-insensitive property for NCHAR and NVARCHAR strings.
  • Process all ALTER TABLE ADD CONSTRAINT and SET CONSTRAINTS statements in the .sql file of the exported database that define enabled or filtering referential constraints so that any foreign-key constraints that are not specified as DISABLED are in ENABLED NOVALIDATE or in FILTERING NOVALIDATE mode.
Note: If you specify the -nv option, the .sql file of the exported database is not modified, but any foreign-key constraints that ALTER TABLE ADD CONSTRAINT or SET CONSTRAINTS statements enable are processed without checking each row of the table for violations. The ENABLED, or FILTERING WITH ERROR, or FILTERING WITHOUT ERROR constraint mode specifications are implemented instead as the ENABLED NOVALIDATE, or FILTERING WITH ERROR NOVALIDATE or FILTERING WITHOUT ERROR NOVALIDATE modes. After the foreign-key constraints have been enabled without checking for violations, their modes automatically revert to whatever the .sql file specified so that subsequent DML operations on the tables enforce referential integrity.

The user who runs the dbimport utility is granted the DBA privilege on the newly created database. The dbimport process locks each table as it is being loaded and unlocks the table when the loading is complete.

Global Language Support: When the GLS environment variables are set correctly, as the IBM® Informix GLS User's Guide describes, dbimport can import data into database server versions that support GLS.

Copyright© 2020 HCL Technologies Limited