数据挖掘 arch linux,数据挖掘工具-logmnr

[oracle@localhost xuhm]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Jan 28 10:22:28 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter system switch logfile;

System altered.

SQL> create table test2 as select * from dba_users;

Table created.

SQL> select count(*) from test2;

COUNT(*)

----------

31

SQL>  select group#,status from v$log where status='CURRENT';

GROUP# STATUS

---------- ----------------

1 CURRENT

SQL> select member from v$logfile where group#=1;

MEMBER

--------------------------------------------------------------------------------

/oracle/oradata/xuhm/redo01.log

---------需要分析日志的路劲

exec dbms_logmnr.add_logfile('+REDODG/arch/1_207924_913652937.dbf',dbms_logmnr.new);

exec dbms_logmnr.add_logfile('+REDODG/arch/2_219979_913652937.dbf',dbms_logmnr.addfile);

exec dbms_logmnr.add_logfile('+REDODG/arch/1_207925_913652937.dbf',dbms_logmnr.addfile);

--------开始日志分析

exec dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog+dbms_logmnr.committed_data_only+dbms_logmnr.no_rowid_in_stmt);

SQL> select count(*) from v$logmnr_contents;

COUNT(*)

----------

144

-----------在视图v$logmnr_contents可以查看刚才所create table的动作。

select sql_redo,sql_undo from v$logmnr_contents where table_name='EMP';

exec dbms_logmnr.add_logfile('+REDODG/arch/1_207924_913652937.dbf',dbms_logmnr.removefile);

exec dbms_logmnr.add_logfile('+REDODG/arch/2_219979_913652937.dbf',dbms_logmnr.removefile);

exec dbms_logmnr.add_logfile('+REDODG/arch/1_207925_913652937.dbf',dbms_logmnr.removefile);

----------结束日志分析:

SQL> exec dbms_logmnr.end_logmnr

PL/SQL procedure successfully completed.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值