Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see LOADPLUS for DB2 13.1.

SHRLEVEL considerations


The SHRLEVEL option specifies the level of access that Db2 has to the objects that you are loading during LOADPLUS processing:

  • With SHRLEVEL NONE, the objects that you are loading are stopped and unavailable during load processing.
  • With SHRLEVEL REFERENCE, the objects that you are loading are available in read-only status during load processing.
  • With SHRLEVEL CHANGE, the objects that you are loading are available in RW status during load processing.

Use the following table to determine which SHRLEVEL option to specify:

Type of access to your data during the load process

Additional site or application requirements

SHRLEVEL option

Do not need access

Not applicable

SHRLEVEL NONE

Read-only access

  • Want very limited outage (which occurs during the rename or FASTSWITCH process)
  • Want to replace existing data

LOAD REPLACE SHRLEVEL REFERENCE

  • Want very limited outage (which occurs during the rename or FASTSWITCH process)
  • Do not want to replace existing data

LOAD RESUME YES SHRLEVEL REFERENCE

Read/write access

  • Want very limited outage to the table space (LOAD REPLACE) or partition (LOAD RESUME YES PART n REPLACE)
  • Want a full replacement of the data in the table space or partition

    Full replacement includes replacing inserts, updates, and deletes to the base table space or partition that occur during the load process.

LOAD REPLACE SHRLEVEL CHANGE

or

LOAD RESUME YES SHRLEVEL CHANGE PART n REPLACE

  • Want no outage to the table space
  • Want to retain all insert, update, and delete operations that affect the table during the load process
  • Do not want to replace existing data

SQLAPPLY load (LOAD RESUME YES SHRLEVEL CHANGE SQLAPPLY)

SHRLEVEL CHANGE considerations

You can specify SHRLEVEL CHANGE with LOAD REPLACE, LOAD RESUME YES PART n REPLACE, or LOAD RESUME YES (without PART n REPLACE). The load process differs based on these options.

Restrictions on SHRLEVEL CHANGE LOAD REPLACE

The following restrictions apply when you specify SHRLEVEL CHANGE and you are replacing one or more partitions.

LOADPLUS terminates when any of the following conditions exists and you specify SHRLEVEL CHANGE with LOAD REPLACE:

Important

See also the restrictions on the REPLACE option (REPLACE).

  • You are running a load job that invokes DSNUTILB. LOADPLUS issues message BMC50178E and terminates with return code 8.
  • Partitions are added to a partition-by-growth table space (other than by LOADPLUS) while you are loading that table space. LOADPLUS issues messages BMC50225E and BMC50010U and terminates with return code 16.

LOADPLUS terminates when any of the following conditions exists and you specify SHRLEVEL CHANGE with LOAD RESUME YES PART n REPLACE:

Important

See also the restrictions on the PART n REPLACE option (INTO-TABLE).

  • Nonpartitioning indexes exist on the table space.
  • You are loading a partition-by-growth table space.
  • You are running a load job that invokes DSNUTILB. LOADPLUS issues message BMC50178E and terminates with return code 8. 

Considerations for an SQLAPPLY load

The following considerations apply when you are running an SQLAPPLY load job (SHRLEVEL CHANGE LOAD RESUME YES). 

LOB and XML data

LOADPLUS invokes DSNUTILB when you use SQLAPPLY to load LOB or XML data.

DSNUTILB load jobs

The following table describes the restrictions that apply to certain options when invoking DSNUTILB for an SQLAPPLY load job:

Option

Restriction

APCOLLECTION

APCOMMIT

APMAXAGENTS

APMULTIROW

APOWNER

APRETRYLIM

APRETRYVAL

Ignores these options

ENFORCE CONSTRAINTS INFORI

ENFORCE CHECK CONSTRAINTS

ENFORCE RI

ENFORCE NO

Passes these options as ENFORCE CONSTRAINTS

KEEPDICTIONARY

Ignores this option

REUSE

Ignores this option

DB2 logs

Because this type of load uses insert processing, it writes to your Db2 logs unless your table space is defined as NOT LOGGED. With this additional activity, you might need to increase the size of your active logs. Refer to your IBM Db2 installation guide for guidelines to use when sizing your active logs.

Processing phases

For this type of load, LOADPLUS uses its single-phase load architecture to pass your data to High-speed Apply.

Work data sets

For this type of load, LOADPLUS does not require the SORTOUT and SYSUT1 data sets, and does not use them if they are specified.

SNAP dumps

When High-speed Apply generates a SNAP dump in response to an error, High-speed Apply tells the dump to an APTDUMP data set.

To enable this capability, you must include the following DD statement in your LOADPLUS JCL:

//APTDUMP DD SYSOUT=*

Table space organization

High-speed Apply loads your data by using SQL INSERT statements. Therefore, following an SQLAPPLY load, your table functions as a table whose data was inserted, not loaded. Because insert processing does not preserve the table’s free space and free pages, this type of load can affect the organization of your table. Consider reorganizing your table space following this type of load.

ORDER YES can help maintain the order of your table space and reduce the need to reorganize the table space. Specify ORDER YES if both of the following conditions exist:

  • You are adding new rows to an empty table space or to a table space with little or no free space.
  • You want the new records inserted in clustering key or partitioning key order.

Multiple table loads

For performance reasons with this type of load, LOADPLUS sorts multiple table data only if you specify ORDER YES.

Referential integrity

If you are loading multiple tables that have foreign key relationships between them, and you want your parent tables to load before their child tables, specify ORDER YES. This causes LOADPLUS to assign a table number based on the parent-child relationships and to sort your data by this assigned table number.

If you are loading multiple tables that are self-referential or that have circular relationships, LOADPLUS cannot determine the correct order. To maintain referential integrity in this case, order the data before running your load job, and specify ORDER NO on your LOAD command.

Important

An SQLAPPLY load uses Db2 to enforce referential integrity. Therefore, LOADPLUS ignores the ENFORCE option for an SQLAPPLY load.

Duplicate keys

When you run an SQLAPPLY load, LOADPLUS handles duplicates differently from other load types. For this type of load, if the input file contains duplicate rows, LOADPLUS loads the first one that it encounters and discards any subsequent ones.

Important

The record that LOADPLUS loads and the duplicate records that LOADPLUS discards might not be the ones that you expect. For example, if you specify ORDER YES, the sequence of the records that LOADPLUS loads might be different from the sequence of the records in your input file.

This type of load uses Db2 insert processing, and Db2 rejects a duplicate row in the first index in which it detects that the row is a duplicate. Therefore, LOADPLUS might not detect all indexes in which a row is a duplicate.

For this type of load, LOADPLUS detects and discards duplicates during insert processing in the COMBINED phase.

Copies

For an SQLAPPLY load, your table space is always available. Therefore, for this type of load, LOADPLUS does not create an image copy or DSN1COPY-type copy. If you include COPY YES in your LOAD command, LOADPLUS terminates.

Restart

If you restart an SQLAPPLY load, you must use the same input data that you used originally and it must be in the same order. For example, if you are loading concatenated data sets, these data sets must be in the same order as they were originally, and you must not include any additional data sets. Similarly, if LOADPLUS encountered duplicates during the original job, you should not remove them before you restart.

Warning

Data that is missing or that is in a different order in the restarted job than in the original job produces unpredictable results.

Statistics

For an SQLAPPLY load, LOADPLUS does not update BMC statistics tables or Db2 catalog statistics. However, because this type of load uses SQL insert processing, Db2 updates the real-time statistics tables as it would for any other Db2 application that uses SQL insert processing.

For an SQLAPPLY load, LOADPLUS generates a report that indicates the number of loaded rows and the number of rows that were discarded due to SQL errors. LOADPLUS provides this information by table space, partition, and table.

Important

For partition-by-growth table spaces, this report does not indicate how many rows were loaded into each partition. Use the information in this message only to ensure that the total number of rows loaded into the table space is correct.

Incompatible LOADPLUS command options

Some LOADPLUS command options are not available when you perform an SQLAPPLY load.

The following table describes the options that are not valid with this type of load and how LOADPLUS responds if your job contains these options:

Command option

LOADPLUS response

BMCSTATS

Ignores this option and issues message BMC50109I

CHECKPEND YES

Ignores this option

COPY NO COPYPEND YES

Ignores this option

COPY YES

Issues message BMC50115E and terminates

ENFORCE

Ignores this option

IDCACHE

Ignores this option

IDENTITYOVERRIDE

Ignores this option

IDERROR

Ignores this option

INDEX BUILDINDEX UPDATE

Ignores these options

LOBAVGPCT

Ignores this option

LOG NO

Issues message BMC50115E and terminates

MAXSORTS

Ignores this option

NLPCTFREE

Ignores this option

ORDER PRESORTED

Issues message BMC50115E and terminates

ORDER YES ASSOCIATE BYCLUSTERKEY

If referential integrity (RI) exists between the tables that you are loading, changes this option to ASSOCIATE BYTABLE (and issues message BMC50138I)

Otherwise, ignores this option

PART n REPLACE

Issues message BMC50115E and terminates

PART PREFORMAT

PREFORMAT

Ignores these options and issues message BMC50109I

PRELOAD LOAD

PRELOAD CONTINUE

Ignores these options

LOADPLUS always uses single-phase processing for an SQLAPPLY load.

PRELOAD PAUSE

PRELOAD ANALYZE

Issues message BMC50115E and terminates

REDEFINE

Ignores this option

SKIPIX

Issues message BMC50115E and terminates

SYNC

Ignores this option

TABLE tableName REPLACE

Issues message BMC50115E and terminates

TSSAMPLEPCT

Ignores this option

UNIQUECHECK

Ignores this option

UPDATEDB2STATS

Ignores this option and issues message BMC50109I

XMLAVGSIZE

Ignores this option


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*