| Oracle9i Supplied PL/SQL Packages and Types Reference Release 2 (9.2) Part Number A96612-01 |
|
DBMS_LOGMNR_D , 2 of 2
Table 28-1 describes the procedures in the DBMS_LOGMNR_D supplied package.
| Subprogram | Description |
|---|---|
|
Extracts the database dictionary to either a flat file or a file in the redo logs. |
|
|
Re-creates all LogMiner tables in an alternate tablespace. |
The syntax for the DBMS_LOGMNR_D.BUILD procedure is as follows:
DBMS_LOGMNR_D.BUILD ( dictionary_filename IN VARCHAR2, dictionary_location IN VARCHAR2, options IN NUMBER);
Table 28-2 describes the parameters for the BUILD procedure.
To extract the dictionary to a flat file, you must supply a filename and location.
To extract the dictionary to the redo logs, specify only the STORE_IN_REDO_LOGS option. The size of the dictionary may cause it to be contained in multiple redo logs.
In summary, the combinations of parameters used result in the following behavior:
DBMS_LOGMNR_D.STORE_IN_FLAT_FILE option, the dictionary is extracted to a flat file with the specified name.DBMS_LOGMNR_D.STORE_IN_REDO_LOGS option, the dictionary is extracted to the redo logs.STORE_IN_REDO_LOGS option, an error is returned.UTL_FILE_DIR is not set.DBMS_LOGMNR_D.BUILD procedure will not run if there are any ongoing DDL operations.DBMS_LOGMNR_D.BUILD procedure, the database whose files you want to analyze must be mounted and open.
SET SERVEROUTPUT ON command.UTL_FILE_DIR in the init.ora file. For example:
UTL_FILE_DIR = /oracle/dictionary
If you do not set this parameter, the procedure will fail.
DBMS_LOGMNR_D.BUILD procedure must be run on a system that is running Oracle9i or laterThe following example extracts the dictionary file to a flat file named dictionary.ora in a specified path (/oracle/database).
SQL> EXECUTE dbms_logmnr_d.build('dictionary.ora', - 2 '/oracle/database/', - 3 options => dbms_logmnr_d.store_in_flat_file);
The following example extracts the dictionary to the redo logs.
SQL> EXECUTE dbms_logmnr_d.build ( - 2 options => dbms_logmnr_d.store_in_redo_logs);
By default all LogMiner tables are created to use the SYSTEM tablespace. However, it may be desirable to alter LogMiner tables to employ an alternate tablespace. Use this routine to re-create all LogMiner tables in an alternate tablespace.
Table 28-3 describes the parameters for the SET_TABLESPACE procedure.
SYSTEM tablespace. Specifically, certain easily repeatable operations, such as memory spill, LogMiner dictionary load, and index creation will not be logged. This would have unacceptable implications with respect to the SYSTEM tablespace in the event of a database recovery.The following example shows creation of an alternate tablespace and execution of the DBMS_LOGMNR_D.SET_TABLESPACE procedure.
SQL> CREATE TABLESPACE logmnrts$ datafile '/usr/oracle/dbs/logmnrts' 2 SIZE 25 M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED; SQL> EXECUTE dbms_logmnr_d.set_tablespace('logmnrts$');
|
![]() Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|