Oracle9i Supplied PL/SQL Packages and Types Reference Release 2 (9.2) Part Number A96612-01 |
|
DBMS_LOGMNR , 3 of 3
Table 25-3 describes the procedures in the DBMS_LOGMNR
supplied package.
This procedure adds a file to the existing or newly created list of archive files to process.
In order to select information from the V$LOGMNR_CONTENTS
view, the LogMiner session must be set up with information about the redo logs to be analyzed. Use the ADD_LOGFILE
procedure to specify the list of redo logs to analyze.
Note: If you want to analyze more than one redo log, you must call the |
DBMS_LOGMNR.ADD_LOGFILE( LogFileName IN VARCHAR2, Options IN BINARY_INTEGER default ADDFILE );
Table 25-4 describes the parameters for the ADD_LOGFILE
procedure.
This procedure starts a LogMiner session.
Note: This procedure fails if you did not previously use the |
DBMS_LOGMNR.START_LOGMNR( startScn IN NUMBER default 0, endScn IN NUMBER default 0, startTime IN DATE default '01-jan-1988', endTime IN DATE default '01-jan-2988', DictFileName IN VARCHAR2 default '', Options IN BINARY_INTEGER default 0 );
Table 25-5 describes the parameters for the DBMS_LOGMNR
.START_LOGMNR
procedure.
After executing the START_LOGMNR
procedure, you can make use of the following views:
V$LOGMNR_CONTENTS
- contains history of information in redo logsV$LOGMNR_DICTIONARY
- contains current information about the dictionary fileV$LOGMNR_LOGS
- contains information about the redo logs being analyzedV$LOGMNR_PARAMETERS
- contains information about the LogMiner sessionLOW_SCN
, NEXT_SCN
) range containing the startScn specified.LOW_SCN
, NEXT_SCN
) range containing the endScn specified.LOW_TIME
, HIGH_TIME
) range containing the startTime specified.LOW_TIME
, HIGH_TIME
) range containing the endTime specified.This procedure finishes a LogMiner session. Because this procedure performs cleanup operations which may not otherwise be done, you must use it to properly end a LogMiner session.
DBMS_LOGMNR.END_LOGMNR;
None.
END_LOGMNR
procedure was called without adding any logfiles.The MINE_VALUE
function takes two arguments. The first one specifies whether to mine the redo (REDO_VALUE
) or undo (UNDO_VALUE
) portion of the data. The second argument is a string that specifies the fully-qualified name of the column to be mined. The MINE_VALUE
function always returns a string that can be converted back to the original datatype.
dbms_logmnr.mine_value( sql_redo_undo IN RAW, column_name IN VARCHAR2 default '') RETURN VARCHAR2;
Table 25-6 describes the parameters for the MINE_VALUE
function.
Table 25-7 describes the return values for the MINE_VALUE
function.
MINE_VALUE
function, you must have successfully started a LogMiner session.MINE_VALUE
function must be invoked in the context of a select operation from the V$LOGMNR_CONTENTS
view.MINE_VALUE
function does not support LONG
, LOB
, ADT
, or COLLECTION
datatypes.DATE
, the string that is returned is formatted in canonical form (DD-MON-YYYY HH24:MI:SS.SS) regardless of the date format of the current session.This function is meant to be used in conjunction with the MINE_VALUE
function.
If the MINE_VALUE
function returns a NULL
value, it can mean either:
To distinguish between these two cases, use the COLUMN_PRESENT
function which returns a 1 if the column is present in the redo or undo portion of the data. Otherwise, it returns a 0.
dbms_logmnr.column_present( sql_redo_undo IN RAW, column_name IN VARCHAR2 default '') RETURN NUMBER;
Table 25-8 describes the parameters for the COLUMN_PRESENT
function.
Table 25-9 describes the return values for the COLUMN_PRESENT
function.
COLUMN_PRESENT
function, you must have successfully started a LogMiner session.COLUMN_PRESENT
function must be invoked in the context of a select operation from the V$LOGMNR_CONTENTS
view.COLUMN_PRESENT
function does not support LONG
, LOB
, ADT
, or COLLECTION
datatypes.DATE
, the string that is returned is formatted in canonical form (DD-MON-YYYY HH24:MI:SS.SS) regardless of the date format of the current session.
|
Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|