Skip Headers

Oracle9i Supplied PL/SQL Packages and Types Reference
Release 2 (9.2)

Part Number A96612-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

DBMS_LOGMNR , 2 of 3


DBMS_LOGMNR Constants

Table 25-1 describes the constants for the ADD_LOGFILE options flag in the DBMS_LOGMNR package.

Table 25-1  Constants for ADD_LOGFILE Options Flag
Constant Description

NEW

DBMS_LOGMNR.NEW purges the existing list of redo logs, if any. Places the specified redo log in the list of redo logs to be analyzed.

ADDFILE

DBMS_LOGMNR.ADDFILE adds the specified redo log to the list of redo logs to be analyzed. Any attempts to add a duplicate file raise an exception (ORA-1289).

REMOVEFILE

DBMS_LOGMNR.REMOVEFILE removes the redo log from the list of redo logs to be analyzed. Any attempts to remove a file that has not been previously added, raise an exception (ORA-1290).

Table 25-2 describes the constants for the START_LOGMNR options flag in the DBMS_LOGMNR package.

Table 25-2  Constants for START_LOGMNR Options Flag
Constant Description

COMMITTED_DATA_ONLY

If set, only DMLs corresponding to committed transactions are returned. DMLs corresponding to a committed transaction are grouped together. Transactions are returned in their commit order. If this option is not set, all rows for all transactions (committed, rolled back, and in-progress) are returned

SKIP_CORRUPTION

Directs a SELECT operation from V$LOGMNR_CONTENTS to skip any corruptions in the redo log being analyzed and continue processing. This option works only when a block in the redo log (and not the header of the redo log) has been corrupted. Caller should check the INFO column in the V$LOGMNR_CONTENTS view to determine the corrupt blocks skipped by LogMiner.

DDL_DICT_TRACKING

If the dictionary in use is a flat file or in the redo logs, LogMiner ensures that its internal dictionary is updated if a DDL event occurs. This ensures that correct SQL_REDO and SQL_UNDO information is maintained for objects that are modified after the LogMiner dictionary is built.

This option cannot be used in conjunction with the DICT_FROM_ONLINE_CATALOG option.

DICT_FROM_ONLINE_CATALOG

Directs LogMiner to use the current "live" database dictionary rather than a dictionary snapshot contained in a flat file or in a redo log.

This option cannot be used in conjunction with the DDL_DICT_TRACKING option.

DICT_FROM_REDO_LOGS

If set, LogMiner expects to find a dictionary in the redo logs that were specified with the DBMS_LOGMNR.ADD_LOGFILE procedure.

NO_SQL_DELIMITER

if set, the SQL delimiter (a semicolon) is not placed at the end of reconstructed SQL statements.

PRINT_PRETTY_SQL

If set, LogMiner formats the reconstructed SQL statements for ease of reading.

CONTINUOUS_MINE

If set, you only need to register one archived redo log. LogMiner automatically adds and mines any subsequent archived redo logs and also the online catalog. This is useful when you are mining in the same instance that is generating the redo logs.

Extracting Data Values from Redo Logs

LogMiner data extraction from redo logs is performed using two mine functions: DBMS_LOGMNR.MINE_VALUE and DBMS_LOGMNR.COLUMN_PRESENT, described later in this chapter.

Example of Using DBMS_LOGMNR

The following example shows how to use the DBMS_LOGMNR procedures to add redo logs to a LogMiner session, how to start LogMiner (with a flat file dictionary), how to perform a select operation from V$LOGMNR_CONTENTS, and how to end a LogMiner session. For complete descriptions of the DBMS_LOGMNR procedures, see Summary of DBMS_LOGMNR Subprograms.

SQL> EXECUTE DBMS_LOGMNR.ADD_LOGFILE( -
  2 LogFileName => '/oracle/logs/log1.f', -
  3 Options => dbms_logmnr.NEW);

SQL> EXECUTE DBMS_LOGMNR.ADD_LOGFILE( -
  2 LogFileName => '/oracle/logs/log2.f', -
  3 Options => dbms_logmnr.ADDFILE);

SQL> EXECUTE DBMS_LOGMNR.START_LOGMNR( -
  2 DictFileName =>'/oracle/dictionary.ora');

SQL> SELECT sql_redo 
  2 FROM V$LOGMNR_CONTENTS

SQL> EXECUTE DBMS_LOGMNR.END_LOGMNR();

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback