Simple steps for using Logminer

Source: Internet
Author: User
Tags end log sql

1. Create DBMS_LOGMNR Package
sql>@ $ORACLE _home/rdbms/admin/dbmslm.sql

2. Create a dictionary of related data
sql>@ $ORACLE _home/rdbms/admin/dbmslmd.sql

3. Modify initialization parameter Utl_file_dir, specify the storage of analysis data
Sql>alter system set utl_file_dir= '/opt/oracle/logminer ' scope=spfile;

4. Restart the database
Sql>shutdown Immediate
Sql>startup

5. Create a data dictionary file

Sql>execute dbms_logmnr_d.build (dictionary_filename => ' Sqltrace.ora ', dictionary

_location => '/opt/oracle/logminer/log ');

6. Create a Log Analysis table

Sql> Execute dbms_logmnr.add_logfile (options =>dbms_logmnr.new,logfilename => '/opt/oracle/ora92/rdbms/ ARC00009.001 ');


7. Add log files for profiling

Sql> Execute dbms_logmnr.add_logfile (options =>dbms_logmnr.addfile,logfilename=> '/opt/oracle/ora92/rdbms /arc00010.001 ');

Sql> Execute dbms_logmnr.add_logfile (options =>dbms_logmnr.addfile,logfilename =>/opt/oracle/ora92/rdbms/ ARC00011.001 ');

Delete


Sql> Execute dbms_logmnr.add_logfile (Options =>dbms_logmnr.removefile,logfilenam

E => '/opt/oracle/ora92/rdbms/arc00011.001 ');


8. Start Logminer for analysis

Sql> Execute DBMS_LOGMNR.START_LOGMNR (dictfilename => '/opt/oracle/logminer/log/sqltrace.or

A ', StartTime =>to_date (' 20040625 09:00:00 ', ' yyyymmdd hh24:mi:ss '), Endtime =>to_date (' 20040625 22:00:00 ', ' YYYYMMDD hh24:mi:ss '));

9. See Results of analysis

Select Operation,sql_redo,sql_undo from V$logmnr_contents;


10. End Analysis

Sql> Execute DBMS_LOGMNR.END_LOGMNR;

The results of the analysis are no longer available once the end view is v$logmnr_contents.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.