Oracle LogMiner

14
Sunday, July 3, 2022 1 LogMiner LogMiner Prepared By: Monish

description

Step by Step PowerPoint Presentation of Oracle LogMiner .

Transcript of Oracle LogMiner

Page 1: Oracle LogMiner

Tuesday, April 11, 2023 1

LogMinerLogMiner

Prepared By: Monish

Page 2: Oracle LogMiner

Tuesday, April 11, 2023 2

What is LogMiner?What is LogMiner?

LogMiner is an Oracle utility. Using LogMiner one can query the contents of online redo log files and archived log files. It can be used as a powerful data audit tool, as well as a tool for sophisticated data analysis.

Page 3: Oracle LogMiner

Tuesday, April 11, 2023 3

Log Miner Objects:Log Miner Objects:

The three basic objects in a LogMiner configuration:

Source DatabaseLogMiner DirectoryRedo log files

Page 4: Oracle LogMiner

Tuesday, April 11, 2023 4

Database must be OPEN and in Database must be OPEN and in ARCHIVELOG mode:ARCHIVELOG mode:To extract a LogMiner dictionary to the redo log files, the database must be open and in ARCHIVELOG mode and archiving must be enabled. While the dictionary is being extracted to the redo log stream, no DDL statements can be executed.

Page 5: Oracle LogMiner

Tuesday, April 11, 2023 5

Get the list of ARCHIVES:Get the list of ARCHIVES:

Make sure you get the list of archives generated for the day using the below command. From the below output identify the archivelogs you are going to mine using logminer..

Page 6: Oracle LogMiner

Tuesday, April 11, 2023 6

Page 7: Oracle LogMiner

Tuesday, April 11, 2023 7

Set the initialization parameter:Set the initialization parameter: Set the initialization parameter, UTL_FILE_DIR, in the initialization parameter file. For example, to set UTL_FILE_DIR to use /u02/monish as the directory where the dictionary file is placed, enter the following in the initialization parameter file:

UTL_FILE_DIR = /u02/monish

Page 8: Oracle LogMiner

Tuesday, April 11, 2023 8

Create the Directory file:Create the Directory file:Execute the PL/SQL procedure DBMS_LOGMNR_D.BUILD. Specify a filename for the dictionary and a directory path name for the file. This procedure creates the dictionary file. For example, enter the following to create the file dictionary.ora in /u02/monish:

Page 9: Oracle LogMiner

Tuesday, April 11, 2023 9

Copy & Register all Archivelogs:Copy & Register all Archivelogs:

Copy all the archivelog to a path and register all the logs as show below :

Page 10: Oracle LogMiner

Tuesday, April 11, 2023 10

Registered logs availability:Registered logs availability:Now from the below view, make sure you have all the registered logs available for mining.

Page 11: Oracle LogMiner

Tuesday, April 11, 2023 11

Find the SCNs:Find the SCNs:Using the below view's find the first scn and high scn to mine from the registered logs.

Page 12: Oracle LogMiner

Tuesday, April 11, 2023 12

LogMiner Session:LogMiner Session:From the above out gather the details and add it to the below logminer session :

Page 13: Oracle LogMiner

Tuesday, April 11, 2023 13

See The Content:See The Content:As v$logmnr_contents is a temporary view, once you disconnect your session , you won't be able to see the content, so make sure you create a table of all the contents of the view.

Now query the table to see the content.

Page 14: Oracle LogMiner

Tuesday, April 11, 2023 14

Thank YouThank You