LogMiner 學習

ysjxjf發表於2005-11-01
LogMiner Studying[@more@]

Using LogMiner :

To run LogMiner , you use two PL/SQL packages:

l DBMS_LOGMNR

Contains the procedures necessary to initialize and run LogMiner. These procedures include interfaces to specify log filenames,filter criteria, and LogMiner session characteristics.

l DBMS_LOGMNR_D

Queries the dictionary tables of the current database and creates a LogMiner dictionary file.

LogMiner Views :

V$LOGMNR_CONTENTS

V$LOGMNR_DICTIONARY

V$LOGMNR_LOGS

V$LOGMNR_PARAMS

UTL_FILE_DIR :

Steps in a typical LogMiner session:

1 , Extracting a Dictionary

2 , Specifying Redo Log Files for Analysis

3 , Starting LogMiner

4 , Analyzing Output from V$LOGMNR_CONTENTS

5 , Using LogMiner to Perform Object-Level Recovery

6 , Ending a LogMiner Session

Steps in a typical LogMiner session

--- Extracting a Dictionary

------- Extracting the Dictionary to a Flat File

1 , set UTL_FILE_DIR = "d:database_backuputl_file_dir"

2 , sqlplus> startup

3 , sqlplus> execute dbms_logmnr_d.build('dictionary.ora','d:database_backuputl_file_dir',options=>DBMS_LOGMNR_D.STORE_IN_FLAT_FILE);

--- Specifying Redo Log Files for Analysis

------- Specifying Redo Log Files for Analysis

1 , startup

2 , execute DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME=>'',OPTIONS=>DBMS_LOGMNR.NEW);

execute DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME=>'',OPTIONS=>DBMS_LOGMNR.ADDFILE);

execute DBMS_LOGMNR.ADD_LOGFILE(LOGFILENAME=>'',OPTIONS=>DBMS_LOGMNR.REMOVEFILE);

--- Starting LogMiner

--- Analyzing Output from V$LOGMNR_CONTENTS

--- Using LogMiner to Perform Object-Level Recovery

--- Ending a LogMiner Session

1 , set UTL_FILE_DIR = "d:database_backuputl_file_dir"

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/66634/viewspace-809060/,如需轉載,請註明出處,否則將追究法律責任。