Oracle DBMS_LOGMNR_D
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible. I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
Purpose Logminer Dictionary related procedures used to create a logminer dictionary
AUTHID DEFINER
Constants
Name Data Type Value
MARK_SAFE_MINE_POINT INTEGER 8
STORE_IN_FLAT_FILE INTEGER 1
STORE_IN_REDO_LOGS INTEGER 2
Dependencies
COL$ GV$LOGMNR_SESSION TAB$
DBMS_ASSERT IND$ TS$
DBMS_CAPTURE_ADM_INTERNAL INDPART$ USER$
DBMS_LOGMNR_INTERNAL OBJ$ V$INSTANCE
Documented Yes
Exceptions
Error Code Reason
ORA-01302 Dictionary build options are missing or incorrect
ORA-01308 Initialization parameter UTL_FILE_DIR is not set
ORA-01336 Specified dictionary file cannot be opened
First Available 8i
Security Model Owned by SYS with EXECUTE granted to the EXECUTE_CATALOG_ROLE role
Source {ORACLE_HOME}/rdbms/admin/dbmslmd.sql
Subprograms
 
BUILD
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;
/
 
SET_TABLESPACE
Relocates LogMiner tables from SYSAUX to an alternate tablespace dbms_logmnr_d.set_tablespace(new_tablespace IN VARCHAR2);
CREATE BIGFILE TABLESPACE logmnrtbsp
DATAFILE '/app/oracle/oradata/logmnr01.dbf' SIZE 250M
AUTOEXTEND ON
FORCE LOGGING
ONLINE
PERMANENT
BLOCKSIZE 8K
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K
SEGMENT SPACE MANAGEMENT AUTO;

exec dbms_logmnr_d.set_tablespace('LOGMNRTBSP');

SELECT owner, segment_type, segment_name
FROM dba_segments
WHERE tablespace_name = 'LOGMNRTBSP'
ORDER BY 1,2,3;


Morgan's Library Page Footer
Related Topics
Archive Logs
DBMS_LOGMNR
Directory Objects
Logical Data Guard
Packages
What's New In 12cR1
What's New In 12cR2
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved