Oracle LogMiner
BladePipe uses LogMiner to synchronize the incremental data in Oracle. This article describes the preparations before data synchronization.
Step 1: Enable LogMiner
Non-RAC Oracle
- Log on to an Oracle database (e.g.,sqlplus) using a user with DBA permissions.
- Query the database log mode.
select dbid,name,log_mode from v$database;
- If
ARCHIVELOGis returned for log_mode, then skip the following steps. - If
NOARCHIVELOGis returned for log_mode, then continue the following steps.
-
Shut down the database.
shutdown immediate; -
Start up and mount the database.
startup mount; -
Enable ARCHIVELOG mode and open the database.
alter database archivelog;
alter database open read write;
RAC Oracle
-
Stop, start, and mount a database in the shell of one of the RAC Oracle nodes.
srvctl stop database -d <database name>
srvctl start database -d <database name> -o mount -
Log on to the database (e.g.,sqlplus) using an account with DBA permissions and enable ARCHIVELOG mode.
alter database archivelog; -
In the shell of one of the RAC Oracle nodes, restart the database.
srvctl stop database -d <database name>
srvctl start database -d <database name> -
Log on to the database (e.g.,sqlplus) using an account with DBA permissions and check if the database is in ARCHIVELOG mode.
select log_mode from v$database;
Step 2: Enable Supplemental Logging
-
Check if the supplemental logging is enabled at the database level.
tipIf 'YES' or 'Implicit' is returned for any of the following SQL fields, skip this step.
select supplemental_log_data_min min, supplemental_log_data_pk pk,supplemental_log_data_ui ui, supplemental_log_data_all all_cols from v$database; -
Enable minimal supplemental logging at the database level.
- Pluggable Database (PDB)
alter session set container=cdb$root;
alter database add supplemental log data; - Container Database (CDB)
alter database add supplemental log data;
- (Option 1, Recommended) Enable all column logging at the database level.
-
Pluggable Database (PDB)
alter session set container=cdb$root;
alter database add supplemental log data (all,primary key,unique) columns; -
Container Database (CDB)
alter database add supplemental log data (all,primary key,unique) columns;(Option 2) Enable supplemental logging at the table level in Step 3.
alter table <schema name>.<table name> add supplemental log data (all,primary key,unique) columns;