Using SQLF Commands to Export and Import Data

The sqlf utility provides several commands that use the DdlUtils 1.1 API to export and import database schemas and table data. You can use these sqlf commands with SQLFire and other JDBC datasources.

These sqlf commands are used to write existing database information to files:
These sqlf commands are used to import database information from files:

When you migrate a third-party database schema to SQLFire, use sqlf write-schema-to-sql and then modify the SQL statements to include SQLFire-specific features such as table partitioning and replication. Then use an interactive sqlf session to execute the script in SQLFire. See run.

When you migrate a schema from one SQLFire system to another, use sqlf write-schema-to-xml or use sqlf write-schema-to-sql with the -dump-from-db option to include SQLFire-specific extensions in the DDL commands.

Note: Databases such as Oracle 11g contain system tables with data types that are incompatible with the DdlUtils 1.1 API. To export schemas or data from these databases, you must use the -schema-pattern option with the sqlf command to exclude schemas that contain incompatible data types. See sqlf write-schema-to-xml.

The sections that follow describe how to use the above sqlf commands to migrate a third-party database to SQLFire.