Oracle logminer Log Analysis Steps

Source: Internet
Author: User


1. You have logged on to sqlplus/as sysdba: C: \ Documents and Settings \ Administrator> sqlplus/nolog SQL * Plus as a dba: release 10.2.0.3.0-Production on Wed Mar 28 00:21:32 201 Copyright (c) 1982,200 6, Oracle. all Rights Reserved. SQL> conn/as sysdba Connected. SQL> 2. Installation: Find the SQL script to be executed: (the script may vary with versions and placement paths. You can search in the oracle directory. After searching, copy to d: \ oracle \ logmnrsql directory) dbmslm. SQL is used to create a DBMS_LOGMNR package, which is used to analyze the log file dbmslmd. SQL is used to create DBMS_LO GMNR_D package, which is used to create a data dictionary file. 3. Run the script SQL> @ d: \ oracle \ logmnrsql \ dbmslm. SQL; package created grant succeeded SQL> @ d: \ oracle \ logmnrsql \ dbmslmd. SQL; package created 4: create a data dictionary file directory the data dictionary file is a text file created by dbms_logmnr_d. SQL> alter system set utl_file_dir = 'd: \ oracle \ log' scope = spfile; system altered SQL> show parameter utl_file NAME TYPE VALUE -------------------------------------- ---------------------------------- utl_file_dir st Ring d: \ oracle \ log SQL> ---- d: \ oracle \ log is the www.2cto.com directory for future data dictionary files. 5. manually create the Directory d: \ oracle \ log to store data dictionary files. If you do not manually create this directory, you may be prompted that the path file cannot be opened in the next step. 6. Create a data dictionary file. SQL> exec dbms_logmnr_d.build (dictionary_filename => 'logmnr _ dict. ora ', dictionary_location => 'd: \ oracle \ log'); procedure successfullyy completed 7, create the log file to be analyzed (online or archived logs) SQL> exec dbms_logmnr.add_logfile (logfilename => 'd: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ REDO01.LOG ', options => dbms_logmnr.new ); pl/SQL procedure successfully completed ----- multiple log files can be added, but it is best to analyze one log file at a time. 8. Use logminer for log analysis SQL> exec dbms_logmnr.start_logmnr (dictfilename => 'd: \ oracle \ log \ logmnr_dict.ora '); pl/SQL procedure successfullly completed 9, select SQL _redo from v $ logmnr_contents where username = 'xxx'; 10. Terminate the log analysis transaction and release the memory exec dbms_logmnr.end_logmnr. Author: nj_apple_tree

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.