Utilities 7-15
dbload: Load Data from a Command File
The next command imports the stores5 database from tape into the auckland
dbspace. The database is created with unbuffered logging. The command
suppresses the echo of the SQL statements and continues processing unless
fatal errors occur.
dbimport -cq -d auckland -l -t /dev/rmt0 -b 16 -s 24000 stores5
dbload: Load Data from a Command File
The dbload utility transfers data from one or more ASCII files into one or
more existing tables. The dbload utility offers four advantages over the
LOAD statement:
■ You can create the data that dbload will load, unrestricted by the
format or the arrangement of data in an existing input file. The
dbload command file can accommodate data from entirely different
database management systems.
■ You can specify a starting point in the load by directing dbload to
read but ignore x number of rows.
■ You can specify a batch size so that after every x number of rows are
inserted, the insert is committed.
■ You can limit the number of bad rows read, beyond which dbload
ends.
The cost of dbload flexibility is time and effort spent creating the dbload
command file, which is required for dbload operation. The ASCII input files
are not specified as part of the dbload command line. Neither are the tables
into which the data is inserted. This information is contained within the
command file.
The presence of indexes greatly affects the speed with which the dbload
utility loads data. For best performance, drop any indexes on the tables
receiving the data before you run dbload. You can create new indexes after
dbload has finished.