The DB2 LOAD process

During the load phase , the load utility scans the input file for any invalid data rows that do not comply with the table definition; for example, if a table column is defined as INTEGER but the input data is stored as "abcd". Invalid data will not be loaded into the table. The rejected rows and warnings will be written to a dump file specified by the dumpfile modifier. Valid data is then written into the table. At the same time, table statistics (if the statistics option was specified) and index keys are also collected. If the savecount option is specified in the load command, points of consistency are recorded in the message file. Consistency points are established by the load utility. They are very useful when it comes to restarting the load operation. You can restart the load from the last successful consistency point.

During the build phase , indexes are produced based on the index keys collected during the load phase. The index keys are sorted during the load phase, and index statistics are collected (if the statistic option was specified).

In the load phase , the utility only rejects rows that do not comply with the column definitions. Rows that violated any unique constraint will be deleted in the delete phase. Note that only unique constraint violated rows are deleted. Other constraints are not checked during this phase or during any load phase. You have to manually check it after the load operation is complete. Refer to Section 12.5.7, Validating Data Against Constraints, for more information.

During the index copy phase , index data is copied from a system temporary table space to the original table space. This will only occur if a system temporary table space was specified for index creation during a load operation with the read access option specified (see section 12.5.2.5, Locking Considerations During a Load).

The Link 

Posted on Thursday, March 1, 2007 at 22:37 by Registered CommenterSamuel Selvan in | CommentsPost a Comment

Load Timestamp data in a flat file source column into a DB2 Timestamp target column

 Being in IT and all, this is a new journal, where I post (collect) information that pertains to stuff I find useful at work.

Load Timestamp data in a flat file source column into a DB2 Timestamp target column

To load data in a flat file into a DB2 target Timestamp column do the following:

  1. Set the datatype of the column in the Source Definition as String with a precision of 26.
  2. Set the datatype of the target column in the DB2 database table to Timestamp.
  3. Set the datatype of this column in the Target Definition to be Char with a precision of 26.
    Note:

    This is datatype setting is only used within the PowerCenter Designer.DB2 can implicitly convert from character datatype to Timestamp datatype.

     

    The implicit conversion in DB2 requires that the string passed by the PowerCenter session must be in the exact format required by the Timestamp column as specified in the territory and codepage used to create the database.

    To determine the format, execute the following command on the DB2 Command Line window:

    VALUES current timestamp

    Here is an example of the output:

    yyyy-mm-dd-hh.mi.ss.nnnnnn

Posted on Thursday, March 1, 2007 at 22:31 by Registered CommenterSamuel Selvan in | CommentsPost a Comment