Requirements for DB2 for z/OS

Last updated on Feb 24, 2021

  Since    v5.5.5/6  

Contents

DB2 for z/OS
Capture Hub Integrate

This section describes the requirements, access privileges, and other features of HVR when using 'DB2 for z/OS' for replication. For information about compatibility and supported versions of DB2 for z/OS with HVR platforms, see Platform Compatibility Matrix.

For the Capabilities supported by HVR on DB2 for z/OS, see Capabilities for DB2 for z/OS.

For information about the supported data types and mapping of data types in source DBMS to the corresponding data types in target DBMS or file format, see Data Type Mapping.

HVR does not support the DB2 data sharing feature - Sysplex.

Introduction

To capture from DB2 for z/OS, HVR needs to be installed on a separate machine(either 64-bit Linux on Intel or 64-bit Windows on Intel or 64-bit AIX on PowerPC) from which HVR will access DB2 on z/OS machine. Additionally, the HVR stored procedures need to be installed on DB2 for z/OS machine for accessing DB2 log files. For steps to install the stored procedures on DB2 for z/OS machine, refer to section Installing HVR Capture Stored Procedures on DB2 for z/OS.

HVR requires DB2 Connect for connecting to DB2 for z/OS. For information about the supported DB2 Connect versions, refer to the HVR release notes (hvr.rel) available in hvr_home directory or the download page.

Prerequisites for HVR Machine

HVR requires DB2 client or DB2 server or DB2 Connect to be installed on the machine from which HVR connects to DB2 on z/OS. The DB2 client should have an instance to store the data required for the remote connection.

To setup the DB2 client or DB2 server or DB2 Connect, use the following commands to catalog the TCP/IP node and the remote database:

db2 catalog tcpip node nodename remote hostname server portnumber
db2 catalog database databasename at node nodename

  • nodename is the local nickname for the remote machine that contains the database you want to catalog.
  • hostname is the name of the host/node where the target database resides.
  • databasename is the name of the database you want to catalog.

For more information about configuring DB2 client or DB2 server or DB2 Connect, refer to IBM documentation.

To test the connection with DB2 server on the z/OS machine, use the following command:

db2 connect to databasename user username

Location Connection

This section lists and describes the connection details required for creating DB2 for z/OS location in HVR. HVR connects, reads and writes data to DB2 for Linux, UNIX and Windows location using SQL Call Level Interface via db2Connect.

Field

Description

Database Connection

INSTHOME

The directory path of the DB2 installation on HVR machine.
Example: /db2/11.1

DB2INSTANCE

The name of the DB2 instance.
Example: mydb2inst

Database

The database alias for DB2 for z/OS.
Example: mydb2alias

User

The username to connect HVR to Database.
Example: hvruser

Password

The password of the User.

Capture

HVR supports capturing changes from DB2 for z/OS. This section describes the configuration requirements for capturing changes from DB2 for z/OS location. For the list of supported DB2 for z/OS versions, from which HVR can capture changes, see Capture changes from location in Capabilities.

HVR uses IFI 306 via HVR stored procedures to capture data from DB2 for z/OS locatioin.

Table Types

HVR supports capture from the following table types in DB2 for z/OS:

  • Regular Tables
  • Compressed Tables
  • Partitioned Tables
  • History Tables   Since    v5.7.5/7  
  • Archive Tables   Since    v5.7.5/7  

Grants for Capture

The following grants are required for capturing changes from DB2 for z/OS:

  1. To create stored procedures, the User must be granted createin privilege on the schema.

    grant createin on schema myschema to authid;

  2. To read information from the transaction log, the User must be granted monitor2 privilege.

    grant monitor2 to hvruser;

  3. To execute stored procedures created by the authid user, the User must be granted execute on procedure privilege for the stored procedures - hvr.hvrcaplg and hvr.hvrcapnw.

    grant execute on procedure hvr.hvrcaplg to hvruser
    grant execute on procedure hvr.hvrcapnw to hvruser;

  4. To fetch information about the DB2 for z/OS installation, the User must be granted select privilege for the following SYSIBM tables.

    grant select on table sysibm.sysauxrels to hvruser;

    grant select on table sysibm.syscolumns to hvruser;

    grant select on table sysibm.sysdatabase to hvruser;

    grant select on table sysibm.sysforeignkeys to hvruser;

    grant select on table sysibm.sysindexes to hvruser;

    grant select on table sysibm.syskeys to hvruser;

    grant select on table sysibm.sysparms to hvruser;

    grant select on table sysibm.sysrels to hvruser;

    grant select on table sysibm.sysroutines to hvruser;

    grant select on table sysibm.syssynonyms to hvruser;

    grant select on table sysibm.systablepart to hvruser;

    grant select on table sysibm.systables to hvruser;

Supplemental Logging

Supplemental logging can be enabled by defining action HVR Initialize /Supplemental Logging or by using the command hvrinit -ol.

To enable supplemental logging, the User should be either owner of the replicated tables or have DBADM or SYSADM or SYSCTRL authority.

Alternatively, executing the following command on replicated tables has the same effect:

alter table tablename data capture changes;

Integrate and Refresh Target

HVR supports integrating changes into DB2 for z/OS location. This section describes the configuration requirements for integrating changes (using Integrate and Refresh ) into DB2 for z/OS location. For the list of supported DB2 for z/OS versions, into which HVR can integrate changes, see Integrate changes into location in Capabilities.

Grants for Integrate and Refresh Target

The following grants are required for integrating changes into DB2 for z/OS:

  1. To read and change the replicated tables, the User must be granted selectinsert, update, and delete privileges.

    grant select, insert, update, delete on table myschema.mytable to hvruser;

  2. To create and drop HVR state tables, the User must be granted createtab privilege.

    grant createtab on database mydatabase to hvruser;

  3. To fetch information about the DB2 for z/OS installation, the User must be granted select privilege for the following SYSIBM tables:

    grant select on table sysibm.sysauxrels to hvruser;

    grant select on table sysibm.syscolauth to hvruser;

    grant select on table sysibm.syscolumns to hvruser;

    grant select on table sysibm.sysdatabase to hvruser;

    grant select on table sysibm.sysforeignkeys to hvruser;

    grant select on table sysibm.sysindexes to hvruser;

    grant select on table sysibm.syskeys to hvruser;

    grant select on table sysibm.sysparms to hvruser;

    grant select on table sysibm.sysrels to hvruser;

    grant select on table sysibm.sysroutines to hvruser;

    grant select on table sysibm.syssynonyms to hvruser;

    grant select on table sysibm.systabauth to hvruser;

    grant select on table sysibm.systablepart to hvruser;

    grant select on table sysibm.systables to hvruser;

Compare and Refresh Source

HVR supports compare and refresh (source location) in DB2 for z/OS location. This section describes the configuration requirements for performing HVR Compare and HVR Refresh (source location) in DB2 for z/OS location.

Grants for Compare and Refresh Source

The following grant is required for performing HVR Compare and HVR Refresh (source location) in DB2 for z/OS:

To read from the replicated tables, the User must be granted select privilege.

grant select on table myschema.mytable to hvruser;