Syntax of the dbexport command

The dbexport command unloads a database into text files that you can later import into another database. The command also creates a schema file.

dbexport { [ { | -c | -d | -no-data-tablestablenames | -no-data-tables-accessmethodsaccessmethods | -nw | -q | <Destination Options>(explicit id ) | -ss | -si | -X } ] database | [ { -V | -version } ] }
Element Purpose Key Considerations
-c Makes dbexport complete exporting unless a fatal error occurs References: For details on this option, see dbexport errors.
-d Makes dbexport export simple-large-object descriptors only, not simple-large-object data
-q Suppresses the display of error messages, warnings, and generated SQL data-definition statements None.
-ss Generates database server-specific information for all tables in the specified database References: For details on this option, see dbexport server-specific information.
-si Excludes the generation of index storage clauses for non-fragmented tables

The -si option is available only with the -ss option.

References: For details on this option, see dbexport server-specific information.
-X Recognizes HEX binary data in character fields None.
-no-data-tables Prevents data from being exported for the specified tables. Only the definitions of the specified tables are exported. Accepts a comma-separated list of names of tables for which data will not be exported.
Default behavior: Only the definition of the tsinstanceTable table is exported, not the data. The data and definitions of all other tables are exported.
-no-data-tables-accessmethods Prevents data from being unloaded using the specified access methods. Accepts a comma-separated list of names of access methods. Tables using those access methods are not unloaded.
Default value:
ts_rts_vtam, ts_vtam
Tables using ts_rts_vtam and ts_vtam access methods are not unloaded.
-nw Generates the SQL for creating a database without the specification of an owner 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.
database Specifies the name of the database that you want to export Additional information: If your locale is set to use multibyte characters, you can use multibyte characters for the database name.

References: If you want to use more than the simple name of the database, see Database Name .

You must have DBA privileges or log in as user informix to export a database.

Global Language Support: When the environment variables are set correctly, as described in the Informix® GLS User's Guide, dbexport can handle foreign characters in data and export the data from GLS databases. For more information, refer to Database renaming.

You can set the IFX_UNLOAD_EILSEQ_MODE environment variable to enable dbexport to use character data that is invalid for the locale specified in the environment.

You can use delimited identifiers with the dbexport utility. The utility detects database objects that are keywords, mixed case, or have special characters, and the utility places double quotes around them.

In addition to the data files and the schema file, dbexport creates a file of messages named dbexport.out in the current directory. This file contains error messages, warnings, and a display of the SQL data definition statements that it generates. The same material is also written to standard output unless you specify the -q option.

During export, the database is locked in exclusive mode. If dbexport cannot obtain an exclusive lock, it displays a diagnostic message and exits.
Tip: The dbexport utility can create files larger than 2 GB. To support such large files, make sure your operating system file-size limits are set sufficiently high. For example, on UNIX, set ulimit to unlimited.

Example

The following command exports the table definitions but no data for all the tables in the customer database.

dbexport -no-data-tables -no-data-tables-accessmethods customer

Example

The following command generates the schema and data for the customer database without the specification of an owner:

dbexport customer -nw