qexpt is a command line tool to export the database schema together with database data.
Enables a quick and clean database migration in case of necessity.
Syntax
qexpt [options] database
Options
|
-o [ --output ] arg (=.) |
Output directory |
|
--format arg (=fgl) |
Output format (fgl, xml, sql), the default is fgl |
|
--stdout |
Direct output to stdout |
|
-v [ --verbose ] |
Verbose output |
|
-V [ --version ] |
Print version |
|
-? [ --usage ] |
Show usage information |
|
-h [ --help ] |
Show help information |
| --dd-format arg (=none) | Download table data format (none, inplace, unl, csv); default is none |
| -e [ --encoding ] arg | Output encoding |
|
-d [ --database-driver ] arg |
Database driver |
|
-b [--database] arg |
List database schemas to export |
| -t [ --database-type ] arg | Database type (default is same as database driver) |
| -c [ --database-conn-str ] arg | Connection string for ODBC driver |
| -s [ --database-dsn ] arg | System DSN name for ODBC driver (alternative to connection string) |
| -u [ --database-user ] arg | User name for ODBC driver (alternative to connection string) |
| -p [ --database-pwd ] arg | User password for ODBC driver (alternative to connection string) |
| -n [ --no-keys ] | Skip writing primary and foreign keys |
| -i [ --no-indices ] | Skip writing indices |
| -l [ --late-foreign-key-decls ] | Declare foreign keys as separate constraints (fgl and sql) |
| --tables-only | Include tables, views, and synonyms only instead of all the database definitions and data. Note: If a synonym refers to the table from another database, it will be loaded to the schema as a full table, and all views will be loaded as a full table. |
| --system-tables | Include the system catalog tables in the schema. They are skipped by default. |
Here is an example of the command that exports the database schema to the "test1" folder in SQL format from an Informix database called "stores":
qexpt -o /home/informix/Desktop/test1 --format sql -d informix --database stores