Skip to main content
The steps in this guide for configuring an Oracle database are necessary to use the Oracle connector. These steps are based on advice in the Oracle Database Administration documentation.
  • Setting up Oracle for streaming may require a database restart, depending on the archive log configuration.
  • Streaming has been tested against a multitenancy configuration with a container database, and for non-CDB database sources. If you need any additional advice and guidance, contact support.

Prerequisites

To complete the steps detailed in this guide, you’ll need:
  • Access to the SYSDBA account. Many of the steps require administrator privileges.
  • An understanding of which database and schemas you will be targeting for streaming.
  • A list of tables that you want to monitor and capture changes for.

Configuring your Oracle database for streaming

First confirm the state of the Database log mode. This mode can be viewed by running the following command:
Example output:
If the output value for Database log mode is No Archive Mode and the Automatic archival is disabled, you will need to adjust these settings to enable archiving of logs, as follows.
  1. Enable the database archive log by running the SQL statements below:
  2. To adjust the size of the recovery file destination or the path to this destination, run the following SQL statements:
  3. Enable SUPPLEMENTAL logging for any tables you would like to monitor and consume changes from, using the following commands:
    To enable supplemental logging for your selected tables, you may need to log in with a different user who has access to the correct schemas and tables.
    LogMiner requires table or column names that are 30 characters or less. The LogMiner utility (DBMS_LOGMNR) doesn’t support long table or column names when supplemental logging is enabled. For more information, read the Oracle documentation related to your database version.
  4. Create a new TABLESPACE with these specific size and auto extend settings:
The preparation work is now complete. The next step is to create a common user account and grant the necessary permissions to enable the user to perform streaming operations. These steps are covered in the next section.

Setting up permissions

Create a common user account in the database. This user account will be used by the for the monitoring and consumption of changes as they occur within the database. To continue with the setup, a user account with SYSDBA administrative privilege is required.
  • If you follow this method of setting up permissions, it assumes the use of a multitenancy configuration with a container database, and at least one connectable database. If you don’t intend to use a multitenancy configuration, refer to Setting up permissions - Non-CDB environment.
  • Common user accounts are created in cdb$root and must use the convention: c##<name> or C##<name>. The user c##cdcuser is used throughout in this guide.
  1. Create a new user following the recommended naming convention:
  2. A number of permissions will need to be granted to this user to enable correct monitoring of the archive logs. These are detailed below:
Once all the appropriate permissions have been granted, this user is now ready to be used for a streaming pipeline.

Setting up permissions in a non-CDB environment

First, create a local user account within the non-CDB database. This user account will be used by the for the monitoring and consumption of changes as they occur in the database. To continue with the set up, a user account with SYSDBA administrative privilege will be required.
The local user cdcuser is used throughout this guide.
  1. Create a new user following the recommended naming convention:
  2. A number of permissions will need to be granted to this user to enable correct monitoring of the archive logs. These are detailed below:
Once all the appropriate permissions have been granted, this user is now ready to be used for a streaming pipeline in a non-CDB environment.
In Oracle Database 19c (19.1), the continuous_mine option for the dbms_logmnr.start_logmnr package has been deprecated and is no longer available. However, it’s important to note that Matillion’s streaming offering does not rely on the continuous_mine functionality of LogMiner. Therefore, Matillion’s streaming solution remains unaffected by this deprecation.

Descriptions of grants

The following table provides additional context for each role.
Role nameDescription
CREATE SESSIONAllows the connector to establish a connection with the Oracle database.
SET CONTAINEREnables the connector to switch between pluggable databases. This is necessary only when the Oracle setup supports container database (CDB) functionality.
SELECT ON V_$DATABASEAllows the connector to retrieve data from the V$DATABASE table.
FLASHBACK ANY TABLEAllows the connector to execute Flashback queries, used for the initial data snapshot process.
SELECT ANY TABLEGrants the connector permission to read data from any table.
SELECT_CATALOG_ROLEProvides access to the data dictionary for the connector, essential for Oracle LogMiner sessions.
EXECUTE_CATALOG_ROLEAllows the connector to write the data dictionary to the Oracle redo logs, enabling tracking of schema modifications.
SELECT ANY TRANSACTIONEnables the snapshot process to conduct a Flashback snapshot query on any transaction. This grant is necessary alongside FLASHBACK ANY TABLE.
LOGMININGThis role is applicable in newer Oracle versions, granting comprehensive access to Oracle LogMiner and its associated packages. In older Oracle versions lacking this role, this grant can be disregarded.
CREATE TABLEPermits the connector to create a flush table within its default tablespace. The flush table facilitates explicit control over flushing LGWR internal buffers to disk.
LOCK ANY TABLEAllows the connector to lock tables during schema snapshots. If snapshot locks are disabled through configuration, this grant can be ignored.
CREATE SEQUENCEAllows the connector to create a sequence within its default tablespace.
EXECUTE ON DBMS_LOGMNRAllows the connector to execute methods within the DBMS_LOGMNR package, crucial for interaction with Oracle LogMiner. In newer Oracle versions, this is granted via the LOGMINING role, but in older versions, explicit granting is necessary.
EXECUTE ON DBMS_LOGMNR_DAllows the connector to execute methods within the DBMS_LOGMNR_D package, vital for interaction with Oracle LogMiner. In newer Oracle versions, this is granted via the LOGMINING role, but in older versions, explicit granting is necessary.
SELECT ONV_$…Allows the connector to read these specific tables. The connector must be able to read information about the Oracle redo and archive logs, and the current transaction state, to prepare the Oracle LogMiner session. Without these grants, the connector can’t operate.