ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 10g LOGMINER使用

10g LOGMINER使用

原创 Linux操作系统 作者:sswgej 时间:2011-05-19 16:36:10 0 删除 编辑
SQL> @dbmslm.sql

Package created.


Grant succeeded.

SQL> @dbmslmd.sql

Package created.

SQL> SELECT SUPPLEMENTAL_LOG_DATA_MIN FROM V$DATABASE;

SUPPLEME
--------
NO


SQL> alter database add supplemental log data;

Database altered.

SQL> SELECT NAME FROM V$ARCHIVED_LOG;

NAME
--------------------------------------------------------------------------------
/opt/oracle/flash_recovery_area/ORA10G/archivelog/2010_12_17/o1_mf_1_2_6jpf5j6r_
.arc

/opt/oracle/oradata/ora10g/archive/1_3_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_4_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_5_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_6_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_7_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_8_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_9_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_10_737992826.dbf

NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/ora10g/archive/1_11_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_12_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_13_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_14_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_15_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_16_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_17_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_18_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_19_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_20_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_21_737992826.dbf

NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/ora10g/archive/1_22_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_23_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_24_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_25_737992826.dbf
/opt/oracle/oradata/ora10g/archive/1_26_737992826.dbf

25 rows selected.

EXECUTE DBMS_LOGMNR.ADD_LOGFILE ('/opt/oracle/oradata/ora10g/archive/1_25_737992826.dbf',DBMS_LOGMNR.NEW);

SQL>  EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);

PL/SQL procedure successfully completed.


SQL>  SELECT USERNAME,SQL_REDO,SQL_UNDO FROM V$LOGMNR_CONTENTS where rownum<10;

 execute dbms_logmnr.end_logmnr;

 execute dbms_logmnr.add_logfile(options =>dbms_logmnr.removefile,logfilename=>'/opt/oracle/oradata/ora10g/archive/1_25_737992826.dbf');

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7301064/viewspace-695765/,如需转载,请注明出处,否则将追究法律责任。

上一篇: da
下一篇: 用户权限管理(ZT)
请登录后发表评论 登录
全部评论

注册时间:2008-07-28

  • 博文量
    62
  • 访问量
    73225