Skip Headers
Oracle® Database PL/SQL Packages and Types Reference
11g Release 1 (11.1)

Part Number B28419-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

72 DBMS_LOGMNR_D

The DBMS_LOGMNR_D package, one of a set of LogMiner packages, contains two subprograms:

See Also:

Oracle Database Utilities for information regarding LogMiner.

This chapter contains the following topics:


Using DBMS_LOGMNR_D

This section contains the following topics, which relate to using the DBMS_LOGMNR_D package:


Overview

LogMiner requires a dictionary to translate object IDs into object names when it returns redo data to you. LogMiner gives you three options for supplying the dictionary:

Use the BUILD procedure to extract the LogMiner dictionary to the redo log files or a flat file. If you want to specify the online catalog as the dictionary source, you do so when you start LogMiner with the DBMS_LOGMNR.START_LOGMNR package.

Use the SET_TABLESPACE procedure if you want LogMiner tables to use a tablespace other than the default SYSAUX tablespace.

See Also:

DBMS_LOGMNR for information on the package subprograms used in running a LogMiner session.

Security Model

You must have the EXECUTE_CATALOG_ROLE role to use the DBMS_LOGMNR_D package.


Summary of DBMS_LOGMNR_D Subprograms

Table 72-1 DBMS_LOGMNR_D Package Subprograms

Subprogram Description
BUILD Procedure
Extracts the LogMiner dictionary to either a flat file or one or more redo log files
SET_TABLESPACE Procedure
Re-creates all LogMiner tables in an alternate tablespace


BUILD Procedure

This procedure extracts the LogMiner data dictionary to either the redo log files or to a flat file.

Syntax

DBMS_LOGMNR_D.BUILD (
     dictionary_filename  IN  VARCHAR2,
     dictionary_location  IN  VARCHAR2,
     options              IN  NUMBER);

Parameters

Table 72-2 BUILD Procedure Parameters

Parameter Description
dictionary_filename Specifies the name of the LogMiner dictionary file.
dictionary_location Specifies the path to the LogMiner dictionary file directory.
options Specifies that the LogMiner dictionary is written to either a flat file (STORE_IN_FLAT_FILE) or the redo log files (STORE_IN_REDO_LOGS).

Exceptions

Table 72-3 BUILD Procedure Exceptions

Exception Description
ora-01302 Dictionary build options are missing or incorrect.

This error is returned under the following conditions:

  • If the value of the OPTIONS parameter is not one of the supported values (STORE_IN_REDO_LOGS, STORE_IN_FLAT_FILE) or is not specified

  • If the STORE_IN_REDO_LOGS option is not specified and neither the dictionary_filename nor the dictionary_location parameter is specified

  • If the STORE_IN_REDO_LOGS option is specified and either the dictionary_filename or the dictionary_location parameter is specified

ora-01308 Initialization parameter UTL_FILE_DIR is not set.
ora-01336 Specified dictionary file cannot be opened.

This error is returned under the following conditions:

  • The specified value for the dictionary_location does not exist.

  • The UTL_FILE_DIR initialization parameter is not set to have access to the dictionary_location

  • The dictionary file is read-only.


Usage Notes

Examples

Example 1: Extracting the LogMiner Dictionary to a Flat File

The following example extracts the LogMiner dictionary file to a flat file named dictionary.ora in a specified path (/oracle/database).

SQL> EXECUTE dbms_logmnr_d.build('dictionary.ora', - 
     '/oracle/database/', -
     options => dbms_logmnr_d.store_in_flat_file);

Example 2: Extracting the LogMiner Dictionary to the Redo Log Files

The following example extracts the LogMiner dictionary to the redo log files.

SQL> EXECUTE dbms_logmnr_d.build( -
     options => dbms_logmnr_d.store_in_redo_logs);

SET_TABLESPACE Procedure

By default, all LogMiner tables are created to use the SYSAUX tablespace. However, it may be desirable to have LogMiner tables use an alternate tablespace. Use this procedure to move LogMiner tables to an alternate tablespace.

Syntax

DBMS_LOGMNR_D.SET_TABLESPACE (
     new_tablespace        IN VARCHAR2);

Parameters

Table 72-4 SET_TABLESPACE Parameter

Parameter Description
new_tablespace A string naming a preexisting tablespace. To move all LogMiner tables to employ this tablespace, supply this parameter.

Usage Notes

Example: Using the DBMS_LOGMNR_D.SET_TABLESPACE Procedure

The following example shows the creation of an alternate tablespace and execution of the DBMS_LOGMNR_D.SET_TABLESPACE procedure.

SQL> CREATE TABLESPACE  logmnrts$ datafile '/usr/oracle/dbs/logmnrts.f'
     SIZE 25 M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

SQL> EXECUTE dbms_logmnr_d.set_tablespace('logmnrts$');