Database Reference
In-Depth Information
data-auditing and data-analysis tool, since all changes are recorded in the redo log files.
Here are some of the important uses for LogMiner:
Determine when logical corruption to a database may have occurred.
Determine how you would perform fine-grained recovery for rows that need to be
corrected.
Determine which tables get the most update and insert activity.
Track data manipulation language (DML) and data definition language (DDL) state-
ments executed by username and when.
Introduction to LogMiner
The four basic objects in LogMiner are the source database, the mining database, the
LogMiner dictionary, and the redo log files. The source database produces all the redo log
files that you want to analyze. The mining database is used by LogMiner to perform the
analysis. The LogMiner dictionary allows LogMiner to provide table and column names,
instead of internal object IDs, when it presents the redo log data that you request. Without a
LogMiner dictionary, LogMiner presents objects by internal ID numbers and binary data:
INSERT INTO HR.COUNTRIES(COUNTRY_ID, COUNTRY_NAME, REGION_ID)
VALUES('VT','The Vatican', 1);
Without the dictionary, LogMiner displays output similar to the following:
INSERT INTO "UNKNOWN"."OBJ# 92209"("COL 1","COL 2","COL 3") VALUES (HEXTORAW('56
54'),HEXTORAW('546865205661746963616E'),
HEXTORAW('c102'));
Supplemental logging must be enabled before generating log files for LogMiner to
analyze. Supplemental logging records additional information in the redo stream so that
the information in the redo log files is more useful. (See Exercise 13.3.)
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
Database altered.
SQL>
The V$DATABASE view tells you if supplemental logging is enabled. Query V$DATABASE
like this:
SQL> SELECT SUPPLEMENTAL_LOG_DATA_MIN FROM V$DATABASE;
SUPPLEME
--------
YES
SQL>
Search WWH ::




Custom Search