Capture From Oracle Using Direct Redo Access
In this capture method (Capture_Method=DIRECT), Fivetran HVR reads transaction log records directly from the DBMS log file using the file I/O. This method is very fast in capturing changes from the Oracle database. The DIRECT log read method requires that the HVR Agent is installed on the source database machine.
Oracle parameter DB_BLOCK_CHECKSUM=OFF is not supported by log-based capture. Values TYPICAL (the default) and FULL (unnecessarily high) are supported by HVR.
Native Access to Redo Files
HVR's capture job needs permission to read Oracle's redo and archive files at the Operating System level. There are three different ways that this can be done;
- Install HVR so it runs as Oracle's user (e.g. oracle).
- Install HVR under a username (e.g. hvr) which is a member of Oracle's default Operating System group (typically either oinstall or dba).
- On Unix and Linux the default group of user oracle can be seen in the 4th field of its line in /etc/passwd. The HVR user be made a member of that group by adding its name to file /etc/group (e.g. line oinstall:x:101:oracle,hvr).
- On Windows, right-click My Computer and select Manage ▶ Local Users and Groups ▶ Groups ▶ ora_dba ▶ Add to Group ▶ Add.
Note that adding HVR's user to group dba will also give HVR sysdba privilege.
- Create special Access Control Lists (ACLs) on these files so that HVR's user can read them.
On Linux, the following commands can be run as user oracle to allow user hvr to see redo files in $ORACLE_HOME/oradata/SID and archive files in $ORACLE_HOME/ora_arch. Note that an extra "default ACL" is needed for the archive directory, so that future archive files will also inherit the directory's permissions.
$ setfacl -R -m u:hvr:rx $ORACLE_HOME/oradata $ setfacl -R -m u:hvr:rx,d:u:hvr:rx $ORACLE_HOME/ora_arch
On Solaris, an extra command is needed to initialize the "default ACL":
$ setfacl -m u:hvr:rx $ORACLE_HOME/oradata $ setfacl -m u:hvr:rx $ORACLE_HOME/oradata/SID $ setfacl -m u:hvr:rx $ORACLE_HOME/oradata/SID/* $ setfacl -m d:u::rwx,d:g::rx,d:o:,d:m:rwx $ORACLE_HOME/ora_arch $ setfacl -m u:hvr:rx,d:u:hvr:rx $ORACLE_HOME/ora_arch $ setfacl -m u:hvr:rx,d:u:hvr:rx $ORACLE_HOME/ora_arch/* $ setfacl -m u:hvr:rx $ORACLE_HOME/ora_arch/*/
Sometimes a Unix file system must be mounted in /etc/fstab with option acl otherwise ACLs are not allowed. On Linux, the user root can use command mount –o remount,acl to change this dynamically.
Extra Grants For Accessing Redo Files Over TNS
For certain Oracle versions (11.2.0.2 and 11.2.0.3), HVR reads the redo and archive files directly through its SQL connection, provided those files are on ASM storage or the connection to the source database is over TNS.
The HVR database User must be granted the privileges mentioned in section Grants for Log-Based Capture and additionally select any transaction
privilege for HVR to read the redo and archive files directly through its SQL connection.