The Oracle LogMiner Capture requires special user privileges and preparation to access and read the Oracle Recovery Logs using the Oracle LogMiner API.
Enable LogMiner functionality
- ALTER DATABASE ADD SUPPLEMENTAL LOG DATA provides the minimal level of database metadata required by the Oracle LogMiner.
The following GRANTS are required :
- GRANT LOGMINING TO <sqdata_user>; (only required for Oracle 12 and above)
- EXECUTE authority:
- GRANT EXECUTE_CATALOG_ROLE TO <sqdata_user>;
- GRANT EXECUTE DBMS_LOGMNR TO <sqdata_user>;
- GRANT EXECUTE DBMS_LOGMNR_D TO <sqdata_user>;
- SELECT authority:
- GRANT SELECT ON V$LOGFILE TO <sqdata_user>;
- GRANT SELECT ON V$ARCHIVED_LOG TO <sqdata_user>;
- GRANT SELECT ON V$LOG TO <sqdata_user>;
- GRANT SELECT ON V$DATABASE TO <sqdata_user>;
- GRANT SELECT ON V$LOG_HIST TO <sqdata_user>;
- GRANT SELECT ON V$LOGMNR_CONTENTS TO <sqdata_user>;
- GRANT SELECT ON V$INSTANCE TO <sqdata_user>;
- GRANT SELECT ON V$THREAD TO <sqdata_user>;
- GRANT SELECT ANY TRANSACTION TO <sqdata_user>; authority to allow for querying the Oracle FLASHBACK_QUERY_TRANSACTION view
- GRANT SELECT MAX(SCN_BAS) from SYS.SMON_SCN_TIME TO <sqdata_user>; (9i only)
Note:
- The LogMiner Capture requires Oracle client access (same requirements as sqlplus)
- Each Oracle table to be captured also requires:
ALTER TABLE <schema.tablename> ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;