使用 LogMiner

1.创建DBMS_LOGMNR
SQL>@$ORACLE_HOME/rdbms/admin/dbmslm.sql

2.
创建相关数据字典
SQL>@$ORACLE_HOME/rdbms/admin/dbmslmd.sql

3.
修改初始化参数UTL_FILE_DIR,指定分析数据的存放处
SQL>alter system set UTL_FILE_DIR='/opt/oracle/logminer' scope=spfile;

4.
重启数据库
SQL>shutdown immediate
SQL>startup

5.
创建数据字典文件


SQL>execute dbms_logmnr_d.build(dictionary_filename =>'sqltrace.ora',dictionary


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

6.
建立日志分析表


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



7.添加用于分析的日志文件


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');


删除


SQL> execute dbms_logmnr.add_logfile(options =>dbms_logmnr.removefile,logfilenam


e =>'/opt/oracle/ora92/rdbms/ARC00011.001');



 8.启动LogMiner进行分析


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_d


 


http://www.zahui.com/html/8/16003.htm

About this Entry

This page contains a single entry by Sky published on December 13, 2005 3:15 PM.

Oracle LogMiner终结版 was the previous entry in this blog.

Windows 2000 telnet服务简明教程 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.