文章分类 | 推荐文章 | 最新文章 | 热点文章 | 最新软件 | 精品软件 | 下载排行 | 推荐下载 | 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日 作者: 查看:[大字体 中字体 小字体]

The dictionary file is produced in order to convert object ID numbers to object names. It is not required, but is recommended. Without it the equivalent SQL statements will use Oracle internal object IDs for the object name and present column values as hex data. For example, instead of the SQL statement:

INSERT INTO emp(name, salary) VALUES ('John Doe', 50000);

 LogMiner will display:

 insert into Object#2581(col#1, col#2) values (hextoraw('4a6f686e20446f65'), hextoraw
('c306'));"

The contents of a dictionary file looks like:

CREATE_TABLE DICTIONARY_TABLE ( DB_NAME VARCHAR2(9), DB_ID NUMBER(20), 
DB_CREATED
VARCHAR2(20), DB_DICT_CREATED VARCHAR2(20), DB_DICT_SCN NUMBER(22), 
DB_THREAD_MAP 
NUMBER(22), DB_RESETLOGS_CHANGE# NUMBER(22), DB_RESETLOGS_TIME VARCHAR2(20), 
DB_VERSION_TIME 
VARCHAR2(20), DB_REDO_TYPE_ID VARCHAR2(8), DB_REDO_RELEASE VARCHAR2(60), 
DB_CHARACTER_SET 
VARCHAR2(30), DB_VERSION VARCHAR2(64), DB_STATUS VARCHAR2(64), 
DB_DICT_MAXOBJECTS 
NUMBER(22), DB_DICT_OBJECTCOUNT NUMBER(22)); 

INSERT_INTO DICTIONARY_TABLE VALUES ('MHD1',41190674,'12/24/2002 
23:36:15','03/16/2003 
12:30:24',,,1,'12/24/2002 16:05:38','12/24/2002
23:36:15','REDODATA','8.0.5.0.0','WE8ISO8859P1','8.0.5.1.0','Production',2788,2697);

The dictionary file can be converted into a SQL script by replacing globally the underscores with spaces.

CREATE_TABLE —> CREATE TABLE; CREATE_INDEX —> CREATE INDEX; INSERT_INTO —> INSERT INTO; and so on (there are more details in the header comments in the dictionary file itself).

Also, see Oracle Note 77638.1 on how to build a package and a LogMiner “Place Holder Columns” file.

Running The Log Miner

We have used four scripts to demonstrate the concepts in this paper. They are in the file MHSYS-logminer.sql and the logs in MHSYS-logminer.log.

First, on the source database, we create some transactions like:

INSERT INTO table1 ( rec_id,  emp_last_name,  emp_first_name,  salary )
VALUES ( 03, 'LASTTHREE', 'FIRSTTHREE', 10000.10 );

Then we update one row:

UPDATE table1 SET salary = 20000.10 WHERE rec_id = 03;

Then we build the dictionary file:

execute dbms_logmnr_d.build(dictionary_filename => 'dictionary.920.ora', -
                                                  dictionary_location => 'C:\TEMP');

Now, we copy the dictionary file, the online and archived redo log files from the period of time that interests us to the analyzing database machine. The analyzing database does not have to be only mounted, it can be open, in which case I normally just copy the V$LOGMNR_CONTENTS into a regular table.


上一页 [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