Help Center/DataArts Studio/FAQs/DataArts Migration (Real-Time Jobs)/How Do I Grant the Log Archiving, Query, and Parsing Permissions of an Oracle Data Source?
Updated on 2026-03-20 GMT+08:00
How Do I Grant the Log Archiving, Query, and Parsing Permissions of an Oracle Data Source?
Symptom
The default permissions of the Oracle data source are insufficient for executing real-time processing migration jobs.
Possible Cause
- The log archiving function must be enabled for the Oracle database. It is recommended that archived logs be retained for at least three days.
- The permissions for querying Oracle tables or parsing logs are missing.
Solution
- Enable log archiving.
- Log in to the Oracle database as user sysdba.
- Run the SQL command ARCHIVE LOG LIST to query the archiving status of the current database. The following information indicates that log archiving is disabled:
Database log mode No Archive Mode #Log archiving is disabled. Automatic archival Disabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 1 Current log sequence 2
- Run the SQL command SHUTDOWN IMMEDIATE to shut down the database.
- Run the SQL command STARTUP MOUNT to start the database in MOUNT state.
- Run the SQL command ALTER DATABASE ARCHIVELOG to enable archiving mode.
- Run the SQL command ARCHIVE LOG LIST to query the archiving status. The following information indicates that log archiving is enabled:
Databaselogmode Archive Mode #Log archiving is enabled. Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 1 Next log sequence to archive 2 Currentlogsequence 2
- Run the SQL command ALTER DATABASE OPEN to start the database.
- Enable supplementary logs for the Oracle database and tables to be migrated.
- Run the following SQL statement to enable supplemental logs for the database:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
- Enable supplemental logs for the tables to be synchronized in real time.
ALTER TABLE "schema_name"."table_name" ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
After the setting is successful, run the following SQL statement. If ALL_COLUMN_LOGGING is returned, supplemental logs are enabled for the tables:
SELECT 'KEY', LOG_GROUP_TYPE FROM ALL_LOG_GROUPS WHERE OWNER = 'schema_name' AND TABLE_NAME = 'table_name'; "KEY" LOG_GROUP_TYPE KEY ALL_COLUMN_LOGGING
- Run the following SQL statement to enable supplemental logs for the database:
- Grant required permissions to an Oracle user.
- If the CDB mode is not enabled for Oracle 19, refer to the commands for 11g. If the CDB mode is enabled for Oracle 19, run the following commands to grant permissions to a user:
sqlplus sys/password@//localhost:1521/ORCLCDB as sysdba CREATE USER migrationuser IDENTIFIED BY mgrationuserPWD DEFAULT TABLESPACE logminer_tbs QUOTA UNLIMITED ON logminer_tbs CONTAINER=ALL; GRANT CREATE SESSION TO migrationuser CONTAINER=ALL; GRANT SET CONTAINER TO migrationuser CONTAINER=ALL; GRANT SELECT ON V_$DATABASE to migrationuser CONTAINER=ALL; GRANT FLASHBACK ANY TABLE TO mrationuser CONTAINER=ALL; GRANT SELECT ANY TABLE TO migrationuser CONTAINER=ALL; GRANT SELECT_CATALOG_ROLE TO migrationuser CONTAINER=ALL; GRANT EXECUTE_CATALOG_ROLE TO migrationuser CONTAINER=ALL; GRANT SELECT ANY TRANSACTION TO migrationuser CONTAINER=ALL; GRANT ANALYZE ANY TO migrationuser CONTAINER=ALL; GRANT LOGMINING TO migrationuser CONTAINER=ALL; GRANT CREATE TABLE TO migrationuser CONTAINER=ALL; GRANT CREATE SEQUENCE TO migrationuser CONTAINER=ALL; GRANT EXECUTE ON DBMS_LOGMNR TO migrationuser CONTAINER=ALL; GRANT EXECUTE ON DBMS_LOGMNR_D TO migrationuser CONTAINER=ALL; GRANT SELECT ON V_$LOG TO migrationuser CONTAINER=ALL; GRANT SELECT ON V_$LOG_HISTORY TO migrationuser CONTAINER=ALL; GRANT SELECT ON V_$LOGMNR_LOGS TO migrationuser CONTAINER=ALL; GRANT SELECT ON V_$LOGMNR_CONTENTS TO migrationuser CONTAINER=ALL; GRANT SELECT ON V_$LOGMNR_PARAMETERS TO migrationuser CONTAINER=ALL; GRANT SELECT ON V_$LOGFILE TO migrationuser CONTAINER=ALL; GRANT SELECT ON V_$ARCHIVED_LOG TO migrationuser CONTAINER=ALL; GRANT SELECT ON V_$ARCHIVE_DEST_STATUS TO migrationuser CONTAINER=ALL; exit;
- Reference commands for granting permissions to a user in Oracle 11g:
sqlplus sys/password@host:port/SID AS SYSDBA; CREATE USER migrationuser IDENTIFIED BY mgrationuserPDW DEFAULT TABLESPACE LOGMINER_TBS QUOTA UNLIMITED ON LOGMINER_TBS; GRANT CREATE SESSION TO migrationuser; GRANT SELECT ON V_$DATABASE to migrationuser; GRANT FLASHBACK ANY TABLE TO migrationuser; GRANT SELECT ANY TABLE TO migrationuser; GRANT SELECT_CATALOG_ROLE TO migrationuser; GRANT EXECUTE_CATALOG_ROLE TO migrationuser; GRANT SELECT ANY TRANSACTION TO migrationuser; GRANT ANALYZE ANY TO migrationuser; GRANT CREATE TABLE TO migrationuser; GRANT LOCK ANY TABLE TO migrationuser; GRANT ALTER ANY TABLE TO migrationuser; GRANT CREATE SEQUENCE TO migrationuser; GRANT EXECUTE ON DBMS_LOGMNR TO migrationuser; GRANT EXECUTE ON DBMS_LOGMNR_D TO migrationuser; GRANT SELECT ON V_$LOG TO migrationuser; GRANT SELECT ON V_$LOG_HISTORY TO migrationuser; GRANT SELECT ON V_$LOGMNR_LOGS TO migrationuser; GRANT SELECT ON V_$LOGMNR_CONTENTS TO migrationuser; GRANT SELECT ON V_$LOGMNR_PARAMETERS TO migrationuser; GRANT SELECT ON V_$LOGFILE TO migrationuser; GRANT SELECT ON V_$ARCHIVED_LOG TO migrationuser; GRANT SELECT ON V_$ARCHIVE_DEST_STATUS TO migrationuser; exit
- Read-only permission on the standby database:
sqlplus sys/password@host:port/SID AS SYSDBA; CREATE USER migrationuser IDENTIFIED BY mgrationuserPwd DEFAULT TABLESPACE LOGMINER_TBS QUOTA UNLIMITED ON LOGMINER_TBS; GRANT CREATE SESSION TO migrationuser; GRANT SET CONTAINER TO migrationuser; // This permission is required only in CDB mode. GRANT SELECT ON V_$DATABASE to migrationuser; GRANT SELECT ANY TABLE TO migrationuser; GRANT SELECT_CATALOG_ROLE TO migrationuser; GRANT EXECUTE_CATALOG_ROLE TO migrationuser; // This permission allows the connector to write data dictionaries to Oracle redo logs, which is required for tracing schema changes. GRANT SELECT ANY TRANSACTION TO migrationuser; GRANT LOGMINING TO migrationuser; // This permission is required only for 12c and later. GRANT EXECUTE ON DBMS_LOGMNR TO migrationuser; // This permission is required for 10c and 11C, but not for 12c and later. GRANT EXECUTE ON DBMS_LOGMNR_D TO migrationuser; // This permission is required for 10c and 11C, but not for 12c and later. // The following are the query permissions of log views. GRANT SELECT ON V_$LOG TO migrationuser; GRANT SELECT ON V_$LOG_HISTORY TO migrationuser; GRANT SELECT ON V_$LOGMNR_LOGS TO migrationuser; GRANT SELECT ON V_$LOGMNR_CONTENTS TO migrationuser; GRANT SELECT ON V_$LOGMNR_PARAMETERS TO migrationuser; GRANT SELECT ON V_$LOGFILE TO migrationuser; GRANT SELECT ON V_$ARCHIVED_LOG TO migrationuser;
- If the CDB mode is not enabled for Oracle 19, refer to the commands for 11g. If the CDB mode is enabled for Oracle 19, run the following commands to grant permissions to a user:
Parent topic:DataArts Migration (Real-Time Jobs)
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot
