Db2 for i as Target
Fivetran HVR supports integrating changes into Db2 for i database. This section describes the configuration requirements for integrating changes (using Integrate and refresh) into Db2 for i location. For the list of supported Db2 for i versions, into which HVR can integrate changes, see Integrate changes into location in Capabilities.
Pre-Requisites
- The default library (current_schema) of the HVR database User must exist.
- Journaling must be enabled for the default library (current_schema), so that the table(s) created in it are automatically journaled.
Grants for Integrate and Refresh
This section lists the grants required for integrating changes into Db2 for i database.
To read and change the replicated tables, the HVR database User must be granted the following privilege:
grant select, insert, update, delete on tbl to hvruser;
Alternatively, you can run the following command from AS/400 console:
GRTOBJAUT OBJ(HVR/*ALL) OBJTYPE(*FILE) USER(HVRUSER) AUT(*CHANGE)
To use the default library (current_schema) and to create and drop HVR state tables in it, the HVR database User must be granted the following privilege:
grant createin, dropin, usage on schema current_schema to hvruser;
Alternatively, you can run the following command from AS/400 console:
GRTOBJAUT OBJ(HVR) OBJTYPE(*CURLIB) USER(HVRUSER) AUT(*CHANGE)
The HVR database User should have permissions to read the following system catalogs:
- qsys2.systables
- qsys2.syscolumns
- qsys2.systypes
- qsys2.syscst
- qsys2.syscstcol
- qsys2.sysindexes
- qsys2.syskeys
- sysibm.sysdummy1
- sysibm.sqlstatistics
According to IBM documentation, the tables and views in the catalogs are shipped with the
select
privilege to PUBLIC. This privilege may be revoked and theselect
privilege granted to individual users. For example, to grant theselect
privilege on table columns in qsys2.syscolumns schema, use the following statement:grant select on qsys2.syscolumns to hvruser;
Intermediate Directory
This option in the HVR UI allows you to specify a directory path for storing intermediate (temporary) files generated during Compare. These files are created during both "direct file compare" and "online compare" operations.
Using an intermediate directory can enhance performance by ensuring that temporary files are stored in a location optimized for the system's data processing needs.
This setting is particularly relevant for target file locations, as it determines where the intermediate files are placed during the Compare operation. If this option is not enabled, the intermediate files are stored by default in the integratedir/_hvr_intermediate directory, where integratedir is the replication DIRECTORY (File_Path) defined for the target file location.
This option is equivalent to the location property Intermediate_Directory.
Intermediate Directory is Local
This option in HVR UI specifies that the Intermediate Directory will be created on the local drive of the file location's server.
This setting is crucial for optimizing performance, as it reduces network latency and avoids potential permission issues associated with remote storage. By storing intermediate files locally, HVR can process data more efficiently, taking advantage of the speed and reliability of local storage.
This option is particularly beneficial when the HVR Agent has access to ample local storage, enabling it to handle large data volumes without relying on networked storage solutions.
This option is equivalent to the location property Intermediate_Directory_Is_Local.