Generic Oracle

Oracle database is a cross-platform Relational Database Management System (RDBMS) that can run on various hardware across operating systems including Windows Server, Unix, and various distributions of GNU/Linux. It is commonly referred to as Oracle database, OracleDB, or simply Oracle. The database software endorses transaction processing, business intelligence and different analytics applications, and used by both small and large enterprises to store and manage data.

Prerequisites


Perform the following steps to configure your Generic Oracle Source:

Set up Redo Logs for Replication

Note: You must have SYSDBA privileges to perform the following steps for setting up Redo logs.

Connect to your Oracle server in SQL Developer or any SQL client tool and run the following commands:

1. Enable ARCHIVELOG archival mode

Verify that the current archiving mode is ARCHIVELOG:

  SELECT LOG_MODE FROM V$DATABASE

If the archive mode is NOARCHIVELOG, enable it using the following commands:

  SHUTDOWN IMMEDIATE;
  STARTUP MOUNT;
  ALTER DATABASE ARCHIVELOG;
  ALTER DATABASE OPEN;

2. Configure Recovery Manager

Recovery Manager (RMAN) settings determine how long the database holds backlogs and archive logs.

  1. Connect to the RMAN by executing the following commands on the command prompt:

     RMAN
    
     CONNECT TARGET <username>` -- (to connect to your database)
    
       SHOW ALL; -- (to check the default settings)
    
  2. Configure the log retention policy to 7 days:

     CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    

3. Enable supplemental logging

Supplemental logging ensures that columns are logged in Redo log files which are required by LogMiner to read the activity history for a database.

  • Enable supplemental logging at a database level:

    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
    
  • Enable supplemental logging at a table level:

    ALTER TABLE <SCHEMA_NAME>.<TABLE_NAME> ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
    

4. Grant permissions to run LogMiner

LogMiner is used to read the archived Redo logs.

Run the following commands to grant the required permissions to it:

 GRANT SELECT ON SYS.V_$DATABASE TO <username>;
 GRANT SELECT ON SYS.V_$ARCHIVED_LOG TO <username>;
 GRANT SELECT ON SYS.V_$LOGMNR_CONTENTS TO <username>;
 GRANT EXECUTE ON DBMS_LOGMNR TO <username>;
 GRANT EXECUTE ON DBMS_LOGMNR_D TO <username>;
 GRANT SELECT ANY TRANSACTION TO <username>;
 GRANT EXECUTE_CATALOG_ROLE TO <username>;

If you are using Oracle database version 12, grant the following additional permission:

  GRANT LOGMINING TO <username>

Create a Database User and Grant Privileges

1. Create a database user (optional)

In order to create a database user, you must have the CREATE privilege.

To create a user, open your Oracle server in SQL Developer or any SQL client tool and enter the following command:

CREATE USER hevo IDENTIFIED BY <password>;
GRANT CREATE SESSION TO hevo; --permission needed to connect to the database

2. Grant privileges to the User

The database user specified in the Hevo Pipeline must have the SELECT privileges.

To assign this privilege, open your Oracle server in SQL Developer or any SQL client tool and enter the following commands:

  1. Check current privileges assigned to the user:

    select * from DBA_TAB_PRIVS where grantee = 'username';
    
  2. Grant access to all_views including system tables:

    GRANT SELECT ON all_views to <username>;
    
  3. Grant access to schemas of selected tables:

    GRANT SELECT ON <schema_name>.<table_name> to <username>;
    

Retrieve the Service Name

Service name represents an alias of the unique Oracle database to which Hevo connects.

To retrieve the Service Name, open your Oracle server in any SQL client tool as a database user with SYSDBA privilege and enter the following command:

select name from v$database;

Limitations

None.


Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Feb-22-2021 1.57 Added sections:
- Create a User and Grant Privileges
- Retrieve the Service Name
Last updated on 01 Jun 2021