This section describes the requirements, access privileges, and other features of HVR when using DB2 for Linux, UNIX and Windows (LUW) for replication.
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.
For instructions to quickly setup replication using DB2 for Linux, UNIX and Windows, see Quick Start for HVR - DB2 for LUW.
HVR supports the following editions of DB2 for Linux, UNIX and Windows:
- Server Edition
- Advanced Enterprise Server Edition
- Express-C Edition
For information about compatibility and supported versions of DB2 for Linux, UNIX and Windows with HVR platforms, see Platform Compatibility Matrix.
HVR requires DB2 client to be installed on the machine from which HVR connects to DB2. The DB2 client should have an instance to store the data required for the remote connection. For information about the supported DB2 client versions, refer to the HVR release notes (hvr.rel) available in hvr_home directory or the download page.
To setup the DB2 client, use the following commands to catalog the TCP/IP node and the remote database:To test the connection with DB2 server, use the following command: For more information about configuring DB2 client, refer to IBM Knowledge Center.
This section lists and describes the connection details required for creating DB2 for Linux, UNIX and Windows location in HVR. HVR uses SQL Call Level Interface to connect, read and write data to DB2 for Linux, UNIX and Windows location.
The directory path of the DB2 installation.
The name of the DB2 instance.
The name of the DB2 database.
The username to connect HVR to DB2 Database.
The password of the User to connect HVR to DB2 Database.
HVR allows you to create hub database in DB2 for Linux, UNIX and Windows. The hub database is a small database which HVR uses to control its replication activities. This database stores HVR catalog tables that hold all specifications of replication such as the names of the replicated databases, the list of replicated tables, and the replication direction.
Grants for Hub
To capture changes from source database or to integrate changes into target database, the following privileges are required:
The User should have permission to create and drop HVR catalog tables.
HVR supports capturing changes from DB2 for Linux, UNIX and Windows. For the list of supported DB2 for Linux, UNIX and Windows versions, from which HVR can capture changes, see Capture changes from location in Capabilities.
HVR supports capture from the following table types in DB2 for Linux, UNIX and Windows:
- Regular Tables
- Multidimensional Clustering (MDC) Tables
- Insert Time Clustering (ITC) Tables
- Uncompressed Tables
- Row Compressed Tables (both static and adaptive)
- Value Compressed Tables (both static and adaptive)
HVR uses the db2ReadLog API to read the DB2 transaction logs. For this the database user needs to have authorization SYSADM or DBADM.
HVR supports supplemental logging for log-based capture from DB for Linux, UNIX and Windows.
Supplemental logging can be enabled while executing HVR Initialize by selecting option Supplemental Logging (option -ol).
Alternatively, executing the following command on replicated tables has the same effect.
To alter a table, the User should have one of the privileges ( alter , control or alterin ) or else the User should have SYSADM or DBADM authority.
While executing HVR Initialize, if supplemental logging is enabled, HVR also executes (only if required by DB2 to reorganize the tables for better performance) the following:
To enable "archive logging" in db2 , define the database configuration parameters logarchmeth1 and logarchmeth2.
For logarchmeth1, you must set value to either logretain or disk and, for logarchmeth2, set value to either off or disk. For example:
The user executing this command should be part of SYSADM , SYSCTRL or SYSMAINT. This does not have to be the HVR database user.
Integrate and Refresh Target
HVR supports integrating changes into DB2 for Linux, UNIX and Windows location. This section describes the configuration requirements for integrating changes (using Integrate) into DB2 for Linux, UNIX and Windows location. For the list of supported DB2 for Linux, UNIX and Windows versions, into which HVR can integrate changes, see Integrate changes into location in Capabilities.
The User should have permission to read and change replicated tables.
The User should have permission to load data.
The User should have permission to create and drop HVR state tables.
Burst Integrate and Bulk Refresh
Compare and Refresh Source
The User should have permission to read replicated tables