Log miner helps to mine redo or archive logs which is mostly used as an internal mechanism of few oracle products. It can also be used for Root cause analysis purpose.
1. LogMiner Using Online Catalog
To use the LogMiner, first thing to do is preparing a directory location to create a dictionary file for
LogMiner. Thisdictionaryfile containsobjectsinformationfromdatadictionarywhichhelpsLogMinerto
identify object names against the object numbers provided in the redo log files.
There are three ways available to use dictionary information with LogMiner as described below:-
1) Using the Online Catalog with LogMiner:-
Itismostefficient andeasy-to-use waywhenLogMinerhasaccesstothe database towhichlogfile belong
and no column definition changes are expected in the tables of interest.
2) Extracting Dictionary Information to the Redo Log Files:-
ThisoptionisperfectfitwhenLogMinerinadatabase towhichlogfiledon'tbelongand columndefinition
changes are expected in the tables of interest. For this to work we will have to embed the dictionary
information into the redo logs at the database from where the redo logs for analysis are coming.
3) Extracting the LogMiner Dictionary to a Flat File:-
This option is maintained for backward compatibility with previous releases. This option does not
guarantee transactional consistency. Oraclerecommendsthatyouuse eitherthe onlinecatalogorextract
the dictionary from redo log files instead.
Below are the steps has been performed to mine using LogMiner by online catalog:-
1. Enable Archive Logging.
2. Enable Supplemental logging.
3. Track of System time, SCN and CURRENT Redo Log file.
4. Perform some operation in Database (e.g Creation/Insertion/Updation of a Table).
5. Add the log file in the LogMiner.
6. Start the LogMiner using DICT_FROM_ONLINE_CATALOG
7. Query the v$logmnr_contents to fetch the expected transactions.
8. Stop the LogMiner.