Progress
Database Administration
Guide and Reference


Loading Table Contents With the Bulk Loader Qualifier

PROUTIL with the BULKLOAD qualifier allows you to load data tables into a database. Using contents files and bulk loader description (.fd) files, the Bulk Loader loads large amounts of data faster than the regular Data Administration or Data Dictionary Load utility.

The Bulk Loader can also load table data in formats other than contents files. For information about other file formats PROUTIL can load, see the IMPORT Statement in the Progress Programming Handbook .

The Bulk Loader bypasses any CREATE TRIGGER statements and deactivates all indexes it encounters.

Follow these steps to load table contents with the Bulk Loader utility:

  1. Create a Bulk Loader description file using the Data Administration tool, Data Dictionary, or a text editor. If you use the Data Dictionary or Data Administration tool, it automatically writes the description file. If you use a text editor, you must create the file.
  2. Using a text editor to modify a description file that the Bulk Loader has created allows you to customize the file to suit your needs. For more information see the "Creating a Bulk Loader Description File" section.

  3. Verify that the table definitions are in the database.
  4. Run the Bulk Loader utility using the PROUTIL BULKLOAD command:
  5. proutil db-name [ -yy n ] -C bulkload fd-file [ -Bn ]  
    

    db-name

    Specifies the database you are using.

    -yy n

    Indicates the start of a 100-year period iin which any two-digit DATE value is defined; n specifies a four-digit year (1900, for example) that determines the start of the 100-year period. The default is 1950, but the -yy n value must match the -yy n value used when the data was dumped.

    fd-file

    Identifies the bulk loader description file you are using.

    -Bn

    Blocks in DataBase Buffers startup parameter; n specifies the number of blocks.

See "Database Administration Utilities," for information about the PROUTIL utility and the BULKLOAD qualifier.

NOTE: On a minimally configured PC, you might encounter memory problems when using the Bulk Loader utility. To work around these problems, split the description file into several smaller files.

Figure 13–3 shows a description file created with the Data Administration tool.

Figure 13–3: Dictionary-created Description File Example

In this example, customer is the name of the database table, customer.d is the name of the data file you want to load, and customer.e is the name of an error file that the Bulk Loader creates if errors occur during the bulk load. The field names in the customer table are Cust-num, Name, Address, etc.

The Bulk Loader utility checks the description file to determine which data file contains the customer table’s dumped records. In this example, it is customer.d.

The order of the fields in the description file must match the order of the fields in the data (.d) file. If they do not match, the Bulk Loader attempts to load data into the wrong fields.

The Bulk Loader utility automatically deactivates a data table’s indexes, so you must run the Index Rebuild utility after the Bulk Loader loads the data files. If the Bulk Loader encounters duplicate key values during a load, it continues to load the data file’s records. You must manually correct the data before you run the Index Rebuild utility.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095