oracle logminer

Post on 11-Apr-2015

2.155 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Step by Step PowerPoint Presentation of Oracle LogMiner .

TRANSCRIPT

Tuesday, April 11, 2023 1

LogMinerLogMiner

Prepared By: Monish

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.

Tuesday, April 11, 2023 3

Log Miner Objects:Log Miner Objects:

The three basic objects in a LogMiner configuration:

Source DatabaseLogMiner DirectoryRedo log files

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.

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..

Tuesday, April 11, 2023 6

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

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:

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 :

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.

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.

Tuesday, April 11, 2023 12

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

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.

Tuesday, April 11, 2023 14

Thank YouThank You

top related