IBM 000-8697 User Manual

Page of 702
Data Consistency, Recovery, and Migration
4-61
Using UNLOAD with LOAD or dbload
Create and Edit the Schema File First
Use dbschema to create a schema file for the database or table that will
receive the data, if it does not yet exist.
After the schema file is created, you can edit the file with a system editor. By
editing the schema file, you can change access privileges, object (table, index,
or view) ownership, lock mode, or initial and next extent sizes. Otherwise, all
privileges and ownership remain unchanged.
The dbschema utility gives all
SERIAL
fields included in
CREATE TABLE
state-
ments a starting value of 1. If this is not acceptable, you must edit the schema
file.
Verify Adequate Disk Space for Data
Use the
UNLOAD
statement to unload a table or specific columns in a table to
one or more
ASCII
 files.
You specify the output filename for each ASCII file as part of the
UNLOAD
statement syntax. Ensure that adequate disk space is available to store the
ASCII files. Otherwise, an error is returned.
Move Files
Move the ASCII input files and the schema file to the new host machine (or
to the new directory if you are exporting to an
IBM I
nformix
SE
 database
server).
Create the New Database or Tables
If the new database or table does not yet exist, create it.
To create a database, either run the schema file or execute the
CREATE
DATABASE
statement. To create a table, either run the schema file or execute
the
CREATE TABLE
 statement.
Users might need to modify their
DBPATH
 environment variable setting to
reflect the new database location.