HP 3000 Manuals

GENERATE LOAD [ ALLBASE/SQL Database Administration Guide ] MPE/iX 5.5 Documentation


ALLBASE/SQL Database Administration Guide

GENERATE LOAD 

Generates schema files to UNLOAD and LOAD one or more tables in a
DBEnvironment.

Scope 

SQLGEN Only

SQLGEN Syntax 

>> [GEN[ERATE]] LOAD  Unload Schema File Name or '//' to STOP command >>

UnloadSchemaFile  Load Schema File Name or '//' to STOP command >>

LoadSchemaFile  Prefix for Unloaded Data File Names >> UNLDPrefix  UPDATE

STATISTICS after Loading (n/y)?  {N[O] }  Internal or External Format
                                 {Y[ES]}

(Int/Ext) >> {INT[ERNAL]}  NULL Indicator (?)  >> NullIndicator  Prefix
             {EXT[ERNAL]}

for DESCRIPTION File Names >> DESCPrefix  Owner Name >> OwnerName  Do you

wish to specify Table Names for each Owner (n/y)?  {N[O] } Table Name for
                                                   {Y[ES]}

Owner OwnerName >> TableName 

Parameters 

UnloadSchemaFile        is the name of the schema file where SQLGEN
                        places the commands that UNLOAD the data into
                        data files.

LoadSchemaFile          is the name of the schema file where SQLGEN
                        places the commands that LOAD the data back into
                        tables.

UNLDPrefix              is the prefix used to name files containing the
                        unloaded data (max:  11 bytes).

NO or YES               respond NO if no UPDATE is desired; respond YES
                        to UPDATE STATISTICS after the LOAD.

INTERNAL or EXTERNAL    indicates the format you want the UNLOAD/LOAD to
                        use.

NULLIndicator           is the symbol you choose to use for the NULL
                        indicator.  The default is a question mark
                        (external format only).

DESCPrefix              is the prefix used to name description files
                        (external format only; max:  11 bytes).

OwnerName               is the name of the owner whose tables you wish to
                        LOAD/UNLOAD.

NO or YES               respond NO to select all table names for the
                        owner; respond YES to specify certain tables for
                        the named owner.

TableName               is the name of a table you wish to UNLOAD/LOAD.

Description 

   *   GENERATE LOAD builds two command files.  One contains commands for
       unloading data from selected tables into files.  The other
       contains commands for loading the data in the files back into
       tables.

   *   EXTERNAL or INTERNAL format can be selected and used.  Optionally,
       you can UPDATE STATISTICS after the LOAD.

   *   LOAD EXTERNAL requires a prefix for naming description files and a
       NULL indicator.

Example 

     >> load 

     ALLBASE/SQL Command Generator for LOAD

     Unload Schema File Name or '//' to STOP command >>puruld 
     Load Schema File Name or '//' to STOP command >> purld 
     Prefix for Unloaded Data File Names >> purch 
     UPDATE STATISTICS after Loading (n/y)?  yes 
     Internal Format or External Format (Int/Ext) >> int 

     Please enter Owner Names. Type @ for all, ? for a list of
     Owner Names, or RETURN to quit.

     Owner Name >> purchdb 
     Do you wish to specify Table Names for each Owner(n/y)? n 

     Generating [Int] commands for PURCHDB.INVENTORY
     Generating [Int] commands for PURCHDB.ORDERITEMS
                 .                            .
     Owner Name >>   Return  
     >>

UNLOAD Schema File Produced 

     UNLOAD TO INTERNAL purch1 FROM PURCHDB.INVENTORY;

     UNLOAD TO INTERNAL purch2 FROM PURCHDB.ORDERITEMS;

     UNLOAD TO INTERNAL purch3 FROM PURCHDB.ORDERS;
               .                       .
     COMMIT WORK;

LOAD Schema File Produced 

     SET AUTOCOMMIT ON;

     LOAD FROM INTERNAL purch1 TO PURCHDB.INVENTORY;

     UPDATE STATISTICS FOR TABLE PURCHDB.INVENTORY;

     LOAD FROM INTERNAL purch2 TO PURCHDB.ORDERITEMS;

     UPDATE STATISTICS FOR TABLE PURCHDB.ORDERITEMS;
                  .                     .
     COMMIT WORK;



MPE/iX 5.5 Documentation