Configure your Oracle source database and create a dedicated migration user before starting your migration. How much you need to configure depends on what you plan to do:
Schema ingestion and assessment only (EDB Postgres AI agent): You don't need to make database-level changes. You only need to specify a migration user with read access to Oracle data dictionary views — specifically those granted via
SELECT_CATALOG_ROLEorSELECT ANY DICTIONARY— and theCREATE TABLEprivilege. The assessment script uses theCREATE TABLEprivilege to create temporary tables during execution. No permanent changes are made to your database. If your goal is to, for example, evaluate a large Oracle estate before committing to migration, skip directly to Configuring the migration user.Data migration (DMS agent): Requires additional database-level configuration —
ARCHIVELOGmode, supplemental logging, dedicated tablespaces, and expanded LogMiner privileges on the migration user. Complete all sections on this page.
If you plan to run both schema assessment and data migration, complete all sections. The migration user you create here serves both agents.
Prerequisites
- Identify your Oracle architecture (CDB/PDB multitenant vs. non-CDB).
- Collect the names of the schemas and tables you want to migrate.
Configuring the database
Data migration only
This section is required for data migration. If you are performing schema assessment only, skip to Configuring the migration user.
Enabling ARCHIVELOG mode
Migration tools require the database to be in ARCHIVELOG mode to ensure that data changes are captured during the transfer.
Connect to the database as
SYSDBAto perform administrative tasks:Connect to the Root Container (CDB$ROOT) using the CDB service name:
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<CDB_NAME> as sysdba
For example:
sqlplus sys/password123@//localhost:1521/ORCLCDB as sysdba
Connect to the Database Instance using the Service Name or SID:
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<SID_OR_SERVICE> as sysdba
For example:
sqlplus sys/password123@//localhost:1521/ORCL as sysdba
Verify the status:
archive log list;If the status is
NOARCHIVELOG, you must enable it.Configure the Fast Recovery Area (FRA) and enable logging:
Tip
- Create a directory for Fast Recovery Area (FRA) in advance.
- Ensure the
db_recovery_file_dest_sizeis large enough to hold at least 24 hours of redo logs during peak migration loads to prevent the database from hanging.
ALTER SYSTEM SET db_recovery_file_dest_size = <RECOVERY_FILE_DEST_SIZE> SCOPE=BOTH; ALTER SYSTEM SET db_recovery_file_dest = '<RECOVERY_FILE_DEST>' SCOPE=BOTH;
Note
Setting
db_recovery_file_destanddb_recovery_file_dest_sizeconfigures Oracle's FRA, which is a required storage location for the archived logs Debezium reads.These parameters are critical for database stability. Always consult your DBA before setting them in a production environment.
Restart the database and enable
ARCHIVELOG:SHUTDOWN IMMEDIATE; STARTUP MOUNT; ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN;
Confirm the change:
archive log list;
Enabling supplemental logging
Supplemental logging ensures that the redo logs contain enough information for the DMS agent to identify changed rows.
Connect to the database as
SYSDBAto perform administrative tasks:Connect to the Root Container (CDB$ROOT) using the CDB service name:
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<CDB_NAME> as sysdba
Connect to the Database Instance using the Service Name or SID:
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<SID_OR_SERVICE> as sysdba
Enable supplemental logging:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
Optionally, ensure adequate redo log space
Undersized redo logs cause frequent log switching, which can slow down or destabilize the migration. If your redo logs are small relative to your database's change volume, increase their size and count before starting the migration.
More information...
The data migration process consists of two main phases: a consistent snapshot of the data, followed by a continuous stream of changes. This change stream is powered by LogMiner and the Oracle database redo logs.
The lifetime of a change in the redo logs is limited. It's determined by the size and number of the logs, as well as the database's change throughput. Redo logs that are too small can cause frequent log switching, which negatively impacts migration performance.
Connect to the root container or database instance as
SYSDBA:Connect to the root container:
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<CDB_NAME> as sysdba
Connect to the database instance:
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<SID_OR_SERVICE> as sysdba
To view the current log file configuration, run the following SQL queries:
SELECT GROUP#, TYPE, MEMBER FROM V_$LOGFILE;
OutputGROUP# TYPE MEMBER ---------- ------- -------------------------------------------------- 1 ONLINE /opt/oracle/oradata/ORCLCDB/redo03.log 2 ONLINE /opt/oracle/oradata/ORCLCDB/redo01.log 3 ONLINE /opt/oracle/oradata/ORCLCDB/redo04.logSELECT GROUP#, ARCHIVED, BYTES/1024/1024 MB, STATUS FROM V_$LOG;
OutputGROUP# ARC MB STATUS ---------- --- --- ---------------- 1 YES 2000 INACTIVE 3 YES 2000 INACTIVE 3 NO 2000 CURRENTFor example, the output might show three log groups, each with a size of 2000MB, which may be too small for many production environments.
If needed, you can adjust the redo logs using commands like these:
ALTER DATABASE ADD LOGFILE GROUP 4 ('/opt/oracle/oradata/ORCLCDB/redo04.log') SIZE 8G; ALTER DATABASE ADD LOGFILE GROUP 5 ('/opt/oracle/oradata/ORCLCDB/redo05.log') SIZE 8G; ALTER DATABASE ADD LOGFILE GROUP 6 ('/opt/oracle/oradata/ORCLCDB/redo06.log') SIZE 8G; ALTER DATABASE ADD LOGFILE GROUP 7 ('/opt/oracle/oradata/ORCLCDB/redo07.log') SIZE 8G; ALTER SYSTEM ARCHIVE LOG CURRENT; ALTER SYSTEM CHECKPOINT; ALTER SYSTEM ARCHIVE LOG CURRENT; ALTER SYSTEM CHECKPOINT; ALTER SYSTEM ARCHIVE LOG CURRENT; ALTER SYSTEM CHECKPOINT; ALTER DATABASE DROP LOGFILE GROUP 1; ALTER DATABASE DROP LOGFILE GROUP 2; ALTER DATABASE DROP LOGFILE GROUP 3;
These commands create four 8GB redo log groups, each with a single redo log file.
Note
Always consult your DBA to determine the appropriate redo log size for your production environment.
Configuring tables
Data migration only
This section is required for data migration. If you are performing schema assessment only, skip to Configuring the migration user.
Enabling table-level supplemental logging
While database-level logging (enabled in the previous step) provides the foundation, you must also specify which individual tables require full column logging. This ensures that the DMS agent receives a before and after image of every row change.
Note
For Oracle, the terms schema and user are used interchangeably. When you run the SQL commands for data migration, to avoid errors, be sure to set the schema name to the correct user account.
For Oracle XE compatibility restrictions, see limitations.
More information...
Supplemental logging refers to the capture of additional information in Oracle redo logs, such as before state. This extra redo log information is needed for log-based applications like EDB DMS to capture change events. See Oracle's Supplemental Logging documentation for more information.
To use Debezium for data migration, you must enable supplemental logging at both the database and table levels. This is crucial for Debezium to correctly capture change data:
Database-level supplemental logging is the foundation for change data capture (CDC). It ensures that every change message includes a tracking number, which is typically the primary key of the modified row. This allows you to uniquely identify which specific record was changed. Without this, Debezium can't link a change event to its source row.
Table-level supplemental logging provides the detailed information. It ensures that the change message includes a before image of the entire row, that is, a complete copy of all columns before the change occurred. This is especially useful for understanding exactly what was changed, as Debezium can compare the before and after states. Without this, Debezium captures only the updated column and not the full context of the change.
Connect to the database:
Table-level logging must be enabled within the Pluggable Database (PDB) where your data resides. Connect to the PDB where your data resides using the CDB service name as
SYSDBA:sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<PDB_NAME> as sysdba
Connect to the Database Instance using the Service Name or SID:
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<SERVICE_NAME_OR_SID> as sysdba
Enable logging for your specific tables. You must run this command for every table you intend to migrate:
ALTER TABLE <SCHEMA_NAME>.<TABLE_NAME> ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
For example:
ALTER TABLE HR_APP.EMPLOYEES ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS; ALTER TABLE FINANCE_APP.SALARIES ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
Generating commands for a whole schema
If you have dozens of tables, don't run them manually. You can generate the SQL commands for an entire schema by running this query (replace YOUR_SCHEMA_1 with your schema name):
SELECT 'ALTER TABLE ' || owner || '.' || table_name || ' ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;' FROM dba_tables WHERE owner = 'YOUR_SCHEMA_1';
Copy the output and execute it to update the entire schema at once.
Preparing tablespaces for the migration user
The Data Migration Service (DMS) and the underlying Debezium engine require dedicated tablespaces to store internal metadata, log-mining details, and tracking offsets. This keeps migration-related overhead separate from your application data.
Initial size: 25MB is the minimum for testing. Production environments typically require 512MB or more.
File paths: Always consult your Database Administrator (DBA) to determine the correct directory for .dbf files on your server.
In a multitenant environment, you must create a tablespace in the Root Container (CDB) for global log mining and a tablespace in the Pluggable Database (PDB) for table-specific tracking.
Connect as sysdba to the CDB:
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<CDB_NAME> as sysdba;
Create the CDB tablespace:
CREATE TABLESPACE <TS_NAME> DATAFILE '<CDB_PATH>/<TS_NAME>.dbf' SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
Switch to the PDB:
ALTER SESSION SET CONTAINER = <PDB_NAME>;
Create the PDB tablespace:
CREATE TABLESPACE <TS_NAME> DATAFILE '<PDB_PATH>/<TS_NAME>.dbf' SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
Tip
Using the same name for both tablespaces (for example,
LOGMINER_TBS) simplifies configuration later.
Create a tablespace to handle both log mining and metadata tracking.
CREATE TABLESPACE <TS_NAME> DATAFILE '<PATH>/<TS_NAME>.dbf' SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
More information...
To perform data migration, both DMS and its underlying Debezium library require a dedicated user. Before creating this user, set up the required tablespaces.
For CDB architecture, you need two tablespaces:
- CDB-level tablespace — This tablespace is for Debezium's internal processes. It's used for log mining and other management operations that must run at the container database level.
- PDB-level tablespace — This one is for Debezium operations that are specific to your pluggable database. It handles processes related to the individual tables you're capturing within that PDB.
Configuring the migration user
To simplify the migration process, we recommend creating a single Common User (C## for multitenant CDB/PDB configurations) or a dedicated system user (for non-CDB configurations). This unified user handles both schema assessment via the EDB Postgres AI agent and live data migration via the DMS agent.
Connect to the root container or database instance as SYSDBA:
Connect to the Root Container (CDB$ROOT) using the CDB service name:
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<CDB_NAME> as sysdba
For example:
sqlplus sys/password123@//localhost:1521/ORCLCDB as sysdba
Connect to the Database Instance using the Service Name or SID:
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<SID_OR_SERVICE> as sysdba
Create a new user for migrations:
CREATE USER <C##_MIGRATION_USER> IDENTIFIED BY <MIGRATION_USER_PASSWORD> DEFAULT TABLESPACE <TS_NAME> QUOTA UNLIMITED ON <TS_NAME> CONTAINER=ALL;
CREATE USER <MIGRATION_USER> IDENTIFIED BY <MIGRATION_USER_PASSWORD> DEFAULT TABLESPACE <TS_NAME> QUOTA UNLIMITED ON <TS_NAME>;
Grant all of the following privileges:
-- Grant core session and container privileges -- These grants are required for schema ingestion and assessment via the EDB Postgres AI agent. GRANT CREATE SESSION TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SET CONTAINER TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ON V_$DATABASE TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT CONNECT TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT_CATALOG_ROLE TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT CREATE TABLE TO <C##_MIGRATION_USER> CONTAINER=ALL; -- Grant migration and log mining permissions -- These additional grants are required for data migration via the DMS agent. GRANT FLASHBACK ANY TABLE TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ANY TABLE TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT EXECUTE_CATALOG_ROLE TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ANY TRANSACTION TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ANY DICTIONARY TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT LOGMINING TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT LOCK ANY TABLE TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT CREATE SEQUENCE TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT EXECUTE ON DBMS_LOGMNR TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT EXECUTE ON DBMS_LOGMNR_D TO <C##_MIGRATION_USER> CONTAINER=ALL; -- Grant access to system views. -- Note: several of these views are also accessible via SELECT_CATALOG_ROLE, -- granted above. The explicit grants are intentional to ensure compatibility -- across Oracle patch levels and to make the required access unambiguous. GRANT SELECT ON V_$LOGMNR_LOGS TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ON V_$LOGMNR_CONTENTS TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ON V_$LOGFILE TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ON V_$ARCHIVED_LOG TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ON V_$ARCHIVE_DEST_STATUS TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ON V_$TRANSACTION TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ON V_$VERSION TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ON V_$INSTANCE TO <C##_MIGRATION_USER> CONTAINER=ALL; GRANT SELECT ON V_$LICENSE TO <C##_MIGRATION_USER> CONTAINER=ALL; ALTER USER <C##_MIGRATION_USER> QUOTA UNLIMITED ON <TS_NAME> CONTAINER=ALL;
Switch to the PDB:
ALTER SESSION SET CONTAINER = <PDB_NAME>;
Set the default tablespace for the user:
ALTER USER <C##_MIGRATION_USER> DEFAULT TABLESPACE <TS_NAME>;
-- Grant core session privileges -- These grants are required for schema ingestion and assessment via the EDB Postgres AI agent. GRANT CREATE SESSION TO <MIGRATION_USER>; GRANT SELECT ON V_$DATABASE to <MIGRATION_USER>; GRANT CONNECT TO <MIGRATION_USER>; GRANT SELECT_CATALOG_ROLE TO <MIGRATION_USER>; GRANT CREATE TABLE TO <MIGRATION_USER>; -- Grant migration and log mining permissions -- These additional grants are required for data migration via the DMS agent. GRANT FLASHBACK ANY TABLE TO <MIGRATION_USER>; GRANT SELECT ANY TABLE TO <MIGRATION_USER>; GRANT EXECUTE_CATALOG_ROLE TO <MIGRATION_USER>; GRANT SELECT ANY TRANSACTION TO <MIGRATION_USER>; GRANT SELECT ANY DICTIONARY TO <MIGRATION_USER>; GRANT LOGMINING TO <MIGRATION_USER>; GRANT LOCK ANY TABLE TO <MIGRATION_USER>; GRANT CREATE SEQUENCE TO <MIGRATION_USER>; GRANT EXECUTE ON DBMS_LOGMNR TO <MIGRATION_USER>; GRANT EXECUTE ON DBMS_LOGMNR_D TO <MIGRATION_USER>; -- Grant access to system views. -- Note: several of these views are also accessible via SELECT_CATALOG_ROLE, -- granted above. The explicit grants are intentional to ensure compatibility -- across Oracle patch levels and to make the required access unambiguous. GRANT SELECT ON V_$LOGMNR_LOGS TO <MIGRATION_USER>; GRANT SELECT ON V_$LOGMNR_CONTENTS TO <MIGRATION_USER>; GRANT SELECT ON V_$LOGFILE TO <MIGRATION_USER>; GRANT SELECT ON V_$ARCHIVED_LOG TO <MIGRATION_USER>; GRANT SELECT ON V_$ARCHIVE_DEST_STATUS TO <MIGRATION_USER>; GRANT SELECT ON V_$TRANSACTION TO <MIGRATION_USER>; GRANT SELECT ON V_$VERSION TO <MIGRATION_USER>; GRANT SELECT ON V_$INSTANCE TO <MIGRATION_USER>; GRANT SELECT ON V_$LICENSE TO <MIGRATION_USER>; ALTER USER <MIGRATION_USER> QUOTA UNLIMITED ON <TS_NAME>;
Oracle 11g compatibility
The
GRANT LOGMININGprivilege was introduced in Oracle 12c. If you are using Oracle 11g, skip this grant. The DMS agent can still perform migrations on Oracle 11g without this privilege.Verify the migration user can see your source tables from the CDB root. If this returns no rows, the grants weren't applied with
CONTAINER=ALL— regrant all privileges as shown above.Connect as the migration user to the CDB root:
sqlplus <C##_MIGRATION_USER>/<MIGRATION_USER_PASSWORD>@//<HOST>:<PORT>/<CDB_NAME>
Then verify your source tables are visible:
SELECT owner, table_name FROM cdb_tables WHERE owner = '<SCHEMA_NAME>';
This step does not apply to non-CDB configurations.
Grant
SELECTon source tables:Switch to the PDB, still as
SYSDBA:ALTER SESSION SET CONTAINER = <PDB_NAME>
Ensure you are connected to the database instance as sysdba.
sqlplus sys/<PASSWD>@//<HOST>:<PORT>/<SID_OR_SERVICE> as sysdba
Grant SELECT permissions to your specific tables. You must run this command for every table you intend to migrate:
GRANT SELECT ON <SCHEMA_NAME>.<TABLE_NAME> TO <C##_MIGRATION_USER/MIGRATION_USER>
Set the default tablespace:
Change the default tablespace in both the CDB and the PDB:
-- In the CDB ROOT ALTER SESSION SET CONTAINER = CDB$ROOT; ALTER USER <C##_MIGRATION_USER> DEFAULT TABLESPACE <TS_NAME>; -- In the PDB ALTER SESSION SET CONTAINER = <PDB_NAME>; ALTER USER <C##_MIGRATION_USER> DEFAULT TABLESPACE <TS_NAME>;
ALTER USER <MIGRATION_USER> DEFAULT TABLESPACE <TS_NAME>;
Exit sql, and perform a quick connection test with your migration user:
sqlplus <C##_MIGRATION_USER>@//<HOST>:<PORT>/<PDB_NAME>
sqlplus <MIGRATION_USER>/<MIGRATION_USER_PASSWORD>@//<HOST>:<PORT>/<SID_OR_SERVICE>
Verify the migration user can read data from the source tables:
SELECT * FROM <SCHEMA_NAME>.<TABLE_NAME> WHERE ROWNUM <= 5;
SELECT * FROM <SCHEMA_NAME>.<TABLE_NAME> WHERE ROWNUM <= 5;
Validating your database and user configurations
Data migration only
This validation script is recommended for data migration. It doesn't cover schema assessment requirements.
Ensure your database configurations and created user meet all requirements to function with the agents:
Navigate to the EDB DMS agent folder in
/opt/cdcagent/reader/.Create an array that contains the name of all the tables that need to be migrated in
<schema_name>.<table_name>format. For example:arr=(test1.table1 test1.table2 test1.table3 test1.table4)
Run the script with the necessary parameters. For example:
ODB_SYSDBA_USERNAME=sys ODB_SYSDBA_PASSWORD=password ODB_HOST=localhost ODB_PORT=1521 ORACLE_SERVICENAME=ORCLPDB1 ODB_DBZ_USERNAME=C##MIG_USER2 ODB_DBZ_PASSWORD=migrator_password LOG_MINER_TBS_NAME=LOGMINER_TBS ./oracleConfigValidation.sh "${arr[@]}"
Note
Set
ORACLE_SERVICENAMEto the PDB service name.ODB_SYSDBA_USERNAME=sys ODB_SYSDBA_PASSWORD=password ODB_HOST=localhost ODB_PORT=1521 ORACLE_SERVICENAME=ORCL ODB_DBZ_USERNAME=MIG_USER2 ODB_DBZ_PASSWORD=migrator_password LOG_MINER_TBS_NAME=LOGMINER_TBS ./oracleConfigValidation.sh "${arr[@]}"
Note
Set
ORACLE_SERVICENAMEto the SID or service name.You get a response similar to the following:
*** [Transporter] - Validate system user connectivity [Pass] Provide username and password of system user can connect to database. *** [Transporter] - Validate debezium user connectivity [Pass] Provide username and password of debezium user can connect to database. *** [Transporter] - Validate Archive Log mode [Pass] Database log mode is Archive Mode. *** [Transporter] - Validate fast recovery area parameters [Pass] Recovery area path was set. [Pass] Recovery area size limit meets requirements. [Pass] Recovery area remaining size meets requirements. *** [Transporter] - Validate if database supplemental logging is enabled [Pass] Supplemental logging check for database is passed. *** [Transporter] - Validate if table supplemental logging is enabled [Pass] All source tables enable supplemental logging. *** [Transporter] - Validate redo log count&size [Pass] Redo log count meets the requirements. [Pass] Redo log size meets the requirements. [Pass] Redo logs are all active. *** [Transporter] - Validate if tablespace for migration with Limited Privileges were created [Pass] LOGMINER_TBS tablespace has enough datafiles. [Pass] LogMiner DataFile Size meet the requirements. [Pass] LogMiner DataFile Max Size meet the requirements. [Pass] LogMiner DataFile are auto-extendable. *** [Transporter] - Validate if user for migration with Limited Privileges were created Oracle version is 19, which is 12c or newer. [Pass] This user has all sys privileges that migration needs. [Pass] This user has all role privileges that migration needs. [Pass] This user has all select privilege on specific tables that migration needs. [Pass] This user has all execute privilege on specific tables that migration needs. *** [Transporter] - Validate if user for migration with LOGMINER_TBS tablespace [Pass] User for migration use LOGMINER_TBS tablespace.
Your database is ready for CDC migration.
Note
Address any [Failed] or [Suggestion] statuses by modifying the source database settings as recommended here. [Failed] checks are blocking issues that you must resolve before the DMS can execute the data migration. [Suggestion] checks allow migration but can negatively affect performance if left unaddressed.
More information
See the Debezium Oracle Connector documentation to understand how Debezium captures changes from Oracle redo logs and the specific database configurations it requires.
See Oracle's Enabling the Fast Recovery Area.