Loading tables from a Db2 for z/OS data source

You can select and load Db2 for z/OS tables individually. Consider the performance considerations and restrictions for this type of table.

About this task

  • Loading can take a long time (for example minutes or hours) depending on the amount of data in the original Db2 for z/OS tables.
  • The disk throughput can be volatile, depending on the disk configuration, the placement of datasets, the number of parallel I/O operations, and so on. To a large extent, the throughput depends on the following factors:
    • Partitioning of tables in your Db2 subsystem. In Db2 for z/OS, this determines the degree of parallelism that is used internally by the Db2 Unload Utilities.
    • Number of DATE, TIME, and TIMESTAMP columns in your original table. The conversion of the values in such columns is CPU-intensive.
    • Compression of data in Db2 for z/OS.
    • Number of available processors.
    • Workload Manager (WLM) configuration.
    • Workload on the IBM® Z server.
    • Workload on the Data Gate for watsonx instances.
Restrictions:
  • During a load process, you cannot close Cloud Pak for Data or the database connection before the loading is finished.
  • If you change the partitioning type of the table space of a Db2 for z/OS table (for example, from segmented to partitioned by growth), you can no longer load the corresponding table in your Data Gate for watsonx instance. The operation fails. Therefore, you must remove the table from the instance and redefine it after changing the partitioning type.
  • After a load, a replication-enabled Data Gate for watsonx table goes into Suspended state if someone has stopped replication during the load.

    Suspended means that the table is skipped when incremental updates are applied. To make this table part of the synchronization process again, you must reload it.

  • You cannot use the lock mode All tables. For more information, see step 7.
  • You can load no more than 100 synchronization-enabled tables concurrently. If you want to load more than 100 synchronization-enabled tables, you must issue multiple requests.

Procedure

  1. Make sure that the Cloud Pak for Data perspective is selected. If necessary, click Icon (button) to change the perspective to change the perspective.
  2. On the side bar, click Instances.
    You see the Service instances page. All instances are listed in the Name column.
  3. Locate the row representing the instance that you want to view. Click the Open instance icon icon in that row. You might have to scroll to the right.
    You see the dashboard of your instance.
  4. From the Table tab of the dashboard, select the tables that you want to load by selecting the appropriate check boxes in front of the table name (in the check boxes column that is labeled of the list).
    If the list of tables is long, you can use the search field above the list header. The field allows you to search for particular schema names or table names. Type the names in this field, either fully or partially, to display just the schemas or tables starting with or containing the search string.
  5. Click the Load button on the header of the tables list.
    The list on the Load Tables page contains a column Load Recommended. The information in this column is supposed to help you with the selection. Because table loads are long-running processes, you should only load or reload a table or partition when necessary.
    Important:
    • You can only select table partitions if the tables are partitioned by range or partitioned by growth, and if they were already loaded in the past. In all other cases, you can load only entire tables.
    • The information in the Load Recommended column might be inaccurate if Db2 real-time statistics are not up to date (RUNSTATS), or if incremental updates have been applied to the Data Gate table since the last load.
    The Load Recommended column contains one of the following statuses for each table or partition:
    No - data unchanged
    Table or partition data has not changed in Db2 for z/OS. Therefore, you need not load or reload the Data Gate table or partition.
    Yes - changed data
    A load or reload of the Data Gate table or partition is recommended because data changes have been applied to the original Db2 for z/OS tables.
    Unknown - no statistics
    A load or reload of the Data Gate table or partition is recommended because the current status of the table or partition cannot be determined. Therefore, it must be assumed that the table is out of sync. The reason might be that access to Db2 statistics is not available or that the last successful invocation of RUNSTATS was some time ago.
    Unknown - replication enabled
    Data changes have been detected since the last load of the Data Gate table, but the table is enabled for replication. The data changes are propagated asynchronously by the synchronization function, but it cannot be determined whether the table is already in sync. A reload is usually not required under this condition.
    Yes - enforced
    A partition with a value of Yes - enforced in the Load Recommended column will always be loaded if the entire Data Gate table is selected for loading. A possible reason is that the partition is in InitialLoadPending state because it has never been loaded before.
    If the list of tables and partitions is long, you can apply a filter to hide certain items from the display. To do so, select a different value from the Show recommended drop-down list. The following choices are available:
    All (default)
    Displays all Data Gate tables and partitions.
    All recommended
    Displays only the Data Gate tables and partitions for which a load or reload is recommended.
    No - data unchanged
    Displays only the Data Gate tables and partitions that need not be loaded or reloaded.
    Yes - changed data
    Displays only the Data Gate tables and partitions for which a load or reload is recommended because data in the original tables has changed.
    Unknown - no statistics
    Displays only the Data Gate tables and partitions for which a load or reload is recommended because the status cannot be determined.
    Yes - enforced
    Displays only the Data Gate tables and partitions for which a load or reload will be enforced.
  6. Select the appropriate tables.
    Select the check boxes in front of the table names.
    Select All
    Selects all tables and partitions that are shown on the Load Tables page.
    Deselect All
    Deselects all tables and partitions.
    Select Recommended
    Selects all Data Gate tables and partitions for which a load or reload is recommended in the Load Recommended column.
    Expand All
    Expands all table nodes so that the partitions come into view.
    Collapse All
    Collapses all table nodes so that the table partitions are hidden from view.
    Next Unknown
    Jumps to and selects the next Data Gate table or partition with a status of Unknown - no statistics in the Load Recommended column. This might prove useful if the list is crowded.
  7. Select Lock Db2 tables while loading if you want to protect (lock) the original tables or table partitions in the database against changes during the load operation:
    Current Table
    Protects just the Db2 source table of the Data Gate table that is currently being loaded.
    Data availability
    Newly loaded data in a table becomes available for applications when the load job for that table has been finished and when the entire operation has moved on to the next table.
    Error behavior
    If an error occurs while loading one of the tables in the set, the load job for that table is aborted, and the job proceeds with the next table you selected. Messages:
    • Message AQT20121E is returned if the load of all tables in the set failed.
    • Message AQT10420W is issued for each single table after a failure to load that table
    Current Partitions
    Protects the original Db2 for z/OS table-space partition of the Data Gate partition to be loaded against changes during the load. With this setting, a non-partitioned table is always locked completely.
    Note: Locks at partition level are not supported for Db2 for Linux®, UNIX, and Windows.
    Data availability
    Newly loaded data in a table partition becomes available for applications when the load job for that partition has been finished and when the entire operation has moved on to the next partition or table.
    Error behavior
    If an error occurs while loading a table partition, the load job for that partition is aborted, and the job proceeds with the next partition to be loaded. An error has no effect on other partitions or tables to be loaded; the job continues. Messages:
    • Message AQT20121E is returned if the load of all tables or all partitions of a partitioned table in the set failed.
    • Message AQT10421W is issued for each partition after a failure to load that partition.
    Special cases
    To avoid partially loaded tables, lock mode Current Table is applied during an initial load, even if you specified lock mode Current Partitions. For details, see the description of lock mode Current Table.

    If the reload of a partition that is enabled for replication fails, synchronization is disabled for the entire table even if the reload of the other table partitions succeeded.

    NONE
    No locking at all. However, only committed data is loaded into the Data Gate tables because the Db2 data is unloaded with isolation level CS and SKIP LOCKED DATA.
    Data availability
    Data availability is the same as for lock mode Current Partitions.
    Error behavior
    The error behavior is the same as for lock mode Current Partitions.

Results

The status of the selected tables on the Table tab of the dashboard changes to Loading. When the loading has finished, the status is Loaded. If the tables are loaded by the synchronization process, the status is Active when the loading has finished.
Trouble: If the load fails, first check whether DSNUTIL was started in Db2 for z/OS.
Attention: While the synchronization process is running, do not manually change the received data in the storage object from the watsonx.data user interface. Doing so breaks the synchronization process and compromises the integrity of the data.
FAQs
  • Partition change of the table space: If you change the partitioning type of the table space of a Db2 for z/OS table (for example, from segmented to partitioned by growth), you can no longer load the corresponding table as the operation will fail. Therefore, you must remove the table from the instance and redefine it after changing the partitioning type.
  • Suspended state: If someone has stopped the replication in the middle of a load, for example by stopping the connection, the state of the tables goes into the Suspended state. This means the table is skipped for any further changes. To make this table part of the synchronization process again, you must reload it.