文章分类 | 推荐文章 | 最新文章 | 热点文章 | 最新软件 | 精品软件 | 下载排行 | 推荐下载 | WPS | 杀毒软件
清风网络
首 页 软件下载 网络学院
QQ 电脑入门 游戏 操作系统 图形处理 办公软件 媒体动画 精文荟萃 工具软件 网络编程 程序开发 网络技术 认证考试 网站建设 文章专栏
当前位置:清风网络程序开发OracleAuditing Past Transactions With Oracle LogMiner
精品推荐
特别推荐
·ORACLE应用中常见的傻瓜问题1000问 (二)
·自动清除statspack所产生的snapshot旧记录
·MPlayer常见问题解答
·常用数据库比较
·ODBC API常用函数诠释
·提高ORACLE数据库的查询统计速度
·细化解析:Oracle使用的hints调整机制
·解析Oracle/Oracle Forms 的多用途代码
·从Oracle的FORM中调用REPORT的实用技巧
·Oracle SQL精妙SQL语句讲解
热点TOP10
·ORACLE常用傻瓜问题1000问
·自动清除statspack所产生的snapshot旧记录
·ORACLE应用中常见的傻瓜问题1000问 (二)
·Oracle SQL精妙SQL语句讲解
·详细介绍ORACLE sqlplus命令
·Oracle DBMS_REPAIR包修复损坏数据块
·ORA-01555 快照过旧
·Oracle客户端文件打包
·DBMS_REPAIR包修复损坏数据块
·VMware下RedHat安装Oracle 9i RAC全攻略

Auditing Past Transactions With Oracle LogMiner

日期:2007年7月2日 作者: 查看:[大字体 中字体 小字体]

How do you know in versions earlier than 9i that multiple statements belong to the same transaction? You can check USERNAME (or session_info) and XIDUSN (rollback segment number) and you can see first and last for transaction. XIDSQN identifies the SCN. XIDSLOT can also be used to order the transaction components: operation START, sql_redo set transaction read write, and operation COMMIT, sql_redo commit.

How do you know in versions earlier than 9i that a table was dropped? DROP TABLE will generate DELETE operations on COL$, OBJ$ and TAB$.

select seg_name, operation, scn, count(*) from v$logmnr_contents
where operation != 'INTERNAL'
group by seg_name, operation, scn 
order by scn; 

SEG_NAME OPERATION SCN COUNT(*) 
   --------------- -------------------------------- ---------- ---------- 
   COL$ DELETE 5012065 3 
   OBJ$ DELETE 5012065 1 
   TAB$ DELETE 5012065 1 
   START 5012065 1 
   SEG$ UPDATE 5012065 1

How do you know in versions earlier than 9i to repopulate a table that had chained rows? DML on chained rows are included in "v$logmnr_contents.sql_redo" and "v$logmnr_contents.sql_undo". The SQL redo/undo columns are NULL for INSERT and UPDATE and contain 'Unsupported' for DELETE. Other columns (including data_blk#, data_obj#, row_id) can be used to identify chained rows, but it we cannot determine the SQL redo/undo statement.  So, note that v$logmnr_contents.sql_redo CANNOT be used to completely repopulate a table that ever contained chained rows.

Log Miner Procedures Summary

      1. Many people make the dictionary file creation part of the daily backup procedures
      2. Do not run the log analysis on the production database, as it takes a lot of I/O and PGA
      3. Accessing V$LOGMNR_CONTENTS is very slow, a full scan can take 10-20 hours, physically reading the redo log files, using a lot of PGA not SGA. The analyzing database can be only mounted. V$LOGMNR_CONTENTS can contain Millions of rows on a busy production system
      4. Some people recommend using a standby in mount or read-only state to analyze the redos from the primary. This will read directly the redo files, so it will be very slow, as described above.
      5. I would rather recommend using an opened database, even on a workstation, and doing the copy of the view V$LOGMNR_CONTENTS to a regular table. If you need, you can build indexes on it. This will also avoid a number of reported problems and crashes caused by running directly against V$LOGMNR_CONTENTS. V$LOGMNR_CONTENTS.


上一页 [1] [2] [3] [4] [5] [6] 下一页 



上一篇:SQL优化思考

下一篇:Oracle8i和MS SQL Server7.0比较

相关文章:
·ORACLE常用傻瓜问题1000问
·ORACLE应用中常见的傻瓜问题1000问 (二)
·Oracle SQL精妙SQL语句讲解
·详细介绍ORACLE sqlplus命令
·Oracle DBMS_REPAIR包修复损坏数据块
·Oracle客户端文件打包
·VMware下RedHat安装Oracle 9i RAC全攻略
·Oracle学习笔记
·我的oracle笔记四(DBA管理)
·ORA-01092: ORACLE 例程终止。强行断开连接
相关软件:

特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
[打印本页] [关闭窗口] 转载请注明来源:http://www.vipcn.net
| 帮助(?) | 版权声明 | 友情连接 | 关于我们 | 信息发布
Copyright 2007 www.vipcn.net All Rights Reserved. 鄂ICP备05000083号Powered by:viphot