- 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
SYSDBAaccount. 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 theDatabase log mode. This mode can be viewed by running the following command:
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.
-
Enable the database archive log by running the SQL statements below:
-
To adjust the size of the recovery file destination or the path to this destination, run the following SQL statements:
-
Enable
SUPPLEMENTALlogging 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. -
Create a new
TABLESPACEwith these specific size and auto extend settings:
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 withSYSDBA 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$rootand must use the convention:c##<name>orC##<name>. The userc##cdcuseris used throughout in this guide.
-
Create a new user following the recommended naming convention:
-
A number of permissions will need to be granted to this user to enable correct monitoring of the archive logs. These are detailed below:
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 withSYSDBA administrative privilege will be required.
The local user
cdcuser is used throughout this guide.-
Create a new user following the recommended naming convention:
-
A number of permissions will need to be granted to this user to enable correct monitoring of the archive logs. These are detailed below:
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 name | Description |
|---|---|
| CREATE SESSION | Allows the connector to establish a connection with the Oracle database. |
| SET CONTAINER | Enables the connector to switch between pluggable databases. This is necessary only when the Oracle setup supports container database (CDB) functionality. |
| SELECT ON V_$DATABASE | Allows the connector to retrieve data from the V$DATABASE table. |
| FLASHBACK ANY TABLE | Allows the connector to execute Flashback queries, used for the initial data snapshot process. |
| SELECT ANY TABLE | Grants the connector permission to read data from any table. |
| SELECT_CATALOG_ROLE | Provides access to the data dictionary for the connector, essential for Oracle LogMiner sessions. |
| EXECUTE_CATALOG_ROLE | Allows the connector to write the data dictionary to the Oracle redo logs, enabling tracking of schema modifications. |
| SELECT ANY TRANSACTION | Enables the snapshot process to conduct a Flashback snapshot query on any transaction. This grant is necessary alongside FLASHBACK ANY TABLE. |
| LOGMINING | This 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 TABLE | Permits 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 TABLE | Allows the connector to lock tables during schema snapshots. If snapshot locks are disabled through configuration, this grant can be ignored. |
| CREATE SEQUENCE | Allows the connector to create a sequence within its default tablespace. |
| EXECUTE ON DBMS_LOGMNR | Allows 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_D | Allows 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. |

