ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
Logminer Dictionary related procedures used to create a logminer dictionary
Extracts the LogMiner data dictionary to either the redo log files or to a flat file. This information is saved in preparation for future analysis of redo log files using the LogMiner tool.
dbms_logmnr_d.build(
dictionary_filename IN VARCHAR2 DEFAULT '',
dictionary_location IN VARCHAR2 DEFAULT '', -- path or directory name
options IN NUMBER DEFAULT 0);
-- the database must be in archivelog mode with supplemental logging enabled
SELECT log_mode, supplemental_log_data_min, supplemental_log_data_pk, supplemental_log_data_ui, supplemental_log_data_fk, supplemental_log_data_all, supplemental_log_data_pl
FROM v$database;
-- store in flat file
exec dbms_logmnr_d.build('mined_log_data.log', 'CTEMP', dbms_logmnr_d.store_in_flat_file);
-- store in redo log stream
exec dbms_logmnr_d.build(options=>dbms_logmnr_d.store_in_redo_logs);
Code from /rdbms/admin/utllmup.sql
Reformatted for clarity only
DECLARE
rowcnt NUMBER;
BEGIN
SELECT COUNT(1)
INTO rowcnt
FROM sys.v$database v
WHERE v.log_mode = 'ARCHIVELOG'
AND v.supplemental_log_data_min != 'NO';
IF 0 != rowcnt THEN
dbms_logmnr_d.build(options=>4);
END IF;
END;
/