123
返回列表 发新帖
楼主: autumn_leaf

请教10G的alter database add supplemental log data;

[复制链接]
论坛徽章:
5
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44数据库板块每日发贴之星
日期:2007-12-10 01:03:50ITPUB8周年纪念徽章
日期:2009-09-27 10:21:21鲜花蛋
日期:2012-03-24 10:51:55灰彻蛋
日期:2012-03-24 19:58:31
21#
 楼主| 发表于 2009-12-10 13:11 | 只看该作者
原帖由 hhphaipeng 于 2009-12-10 11:59 发表
试验做了,如果不开DML没有。username 和 session_info 也没有

开了之后,DML 有了

补充:客户端需重新连接 。userna 和 session_info 才有。


重新连接?
1、如果以前数据库没开这个选项,
2、然后很多DML
3、现在开这个选项
4、重新连接
此时,能挖掘到2执行过的DML吗?

使用道具 举报

回复
论坛徽章:
5
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44数据库板块每日发贴之星
日期:2007-12-10 01:03:50ITPUB8周年纪念徽章
日期:2009-09-27 10:21:21鲜花蛋
日期:2012-03-24 10:51:55灰彻蛋
日期:2012-03-24 19:58:31
22#
 楼主| 发表于 2009-12-10 14:50 | 只看该作者
up

使用道具 举报

回复
论坛徽章:
5
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44数据库板块每日发贴之星
日期:2007-12-10 01:03:50ITPUB8周年纪念徽章
日期:2009-09-27 10:21:21鲜花蛋
日期:2012-03-24 10:51:55灰彻蛋
日期:2012-03-24 19:58:31
23#
 楼主| 发表于 2009-12-10 15:36 | 只看该作者
做了一下实验,好像执行alter database add supplemental log data;之前的DML都是挖不到的

使用道具 举报

回复
论坛徽章:
5
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44数据库板块每日发贴之星
日期:2007-12-10 01:03:50ITPUB8周年纪念徽章
日期:2009-09-27 10:21:21鲜花蛋
日期:2012-03-24 10:51:55灰彻蛋
日期:2012-03-24 19:58:31
24#
 楼主| 发表于 2009-12-10 16:12 | 只看该作者
做了几个实验,搞得稀里糊涂
我是想弄明白
在执行ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY, UNIQUE INDEX) COLUMNS;
之前的DML都不能挖掘到了?
假设
1、我先insert一条记录
2、执行ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY, UNIQUE INDEX) COLUMNS;
3、然后挖,能挖到1的insert吗?

还是必须ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY, UNIQUE INDEX) COLUMNS;
之后的DML才能挖倒?

使用道具 举报

回复
论坛徽章:
6
BLOG每日发帖之星
日期:2009-10-06 01:01:02ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51ITPUB9周年纪念徽章
日期:2010-10-08 09:28:53数据库板块每日发贴之星
日期:2010-12-06 01:01:01
25#
发表于 2009-12-10 16:22 | 只看该作者
你需要搞明白这个语句是干什么用的,这个官档有。

开启之后,会有一些额外的日志写进redo,所以很清楚你修改之后的dml才会有这些额外记录。

至于会否挖到DML, 记得都可以但是enable才全面,你不去enable那么一些操作会显示不出sql而是显示不支持,例如IMU, IOT操作。

对于session的information, 即使enable, 你也需要挖掘到session初始登陆的log因为只有那个里面有登陆信息,后面的都是根据这个来生成记录的。

使用道具 举报

回复
论坛徽章:
6
生肖徽章2007版:鸡
日期:2009-11-03 16:18:39数据库板块每日发贴之星
日期:2009-12-09 01:01:01ITPUB元老
日期:2009-12-09 10:59:032010新春纪念徽章
日期:2010-01-04 08:33:082010新春纪念徽章
日期:2010-03-01 11:06:24ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15
26#
发表于 2009-12-10 16:28 | 只看该作者

回复 #24 autumn_leaf 的帖子

挖不到

使用道具 举报

回复
论坛徽章:
5
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44数据库板块每日发贴之星
日期:2007-12-10 01:03:50ITPUB8周年纪念徽章
日期:2009-09-27 10:21:21鲜花蛋
日期:2012-03-24 10:51:55灰彻蛋
日期:2012-03-24 19:58:31
27#
 楼主| 发表于 2009-12-10 16:34 | 只看该作者
原帖由 opsc 于 2009-12-10 16:22 发表
你需要搞明白这个语句是干什么用的,这个官档有。

开启之后,会有一些额外的日志写进redo,所以很清楚你修改之后的dml才会有这些额外记录。

至于会否挖到DML, 记得都可以但是enable才全面,你不去enable那么一些操作会显示不出sql而是显示不支持,例如IMU, IOT操作。

对于session的information, 即使enable, 你也需要挖掘到session初始登陆的log因为只有那个里面有登陆信息,后面的都是根据这个来生成记录的。


谢谢,当然要搞明白了

我现在发现,似乎是这样
在执行alter database add supplemental log data;之前的DML都是挖不到的
只有执行了alter database add supplemental log data;之后的DML才能挖到

[ 本帖最后由 autumn_leaf 于 2009-12-10 17:03 编辑 ]

使用道具 举报

回复
论坛徽章:
6
生肖徽章2007版:鸡
日期:2009-11-03 16:18:39数据库板块每日发贴之星
日期:2009-12-09 01:01:01ITPUB元老
日期:2009-12-09 10:59:032010新春纪念徽章
日期:2010-01-04 08:33:082010新春纪念徽章
日期:2010-03-01 11:06:24ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15
28#
发表于 2009-12-10 16:47 | 只看该作者

是add 吧

使用道具 举报

回复
论坛徽章:
0
29#
发表于 2010-7-27 13:57 | 只看该作者
请看官方介绍:
Note: You must enable supplemental logging prior to generating log files that will be analyzed by LogMiner.
When you enable supplemental logging, additional information is recorded in the redo stream that is needed to make the information
in the redo log files useful to you. Therefore, at the very least, you must enable minimal supplemental logging, as the following SQL statement shows:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
To determine whether supplemental logging is enabled, query the V$DATABASE view, as the following SQL statement shows:
SELECT SUPPLEMENTAL_LOG_DATA_MIN FROM V$DATABASE;


Redo log files are generally used for instance recovery and media recovery. The data
needed for such operations is automatically recorded in the redo log files. However, a
redo-based application may require that additional columns be logged in the redo log
files. The process of logging these additional columns is called supplemental logging.

By default, Oracle Database does not provide any supplemental logging, which means
that by default LogMiner is not usable. Therefore, you must enable at least minimal
supplemental logging prior to generating log files which will be analyzed by
LogMiner.


There are two types of database-level supplemental logging: minimal supplemental
logging and identification key logging, as described in the following sections. Minimal
supplemental logging does not impose significant overhead on the database
generating the redo log files
. However, enabling database-wide identification key
logging can impose overhead on the database generating the redo log files. Oracle
recommends that you at least enable minimal supplemental logging for LogMiner.

[ 本帖最后由 zhou0953 于 2010-7-27 14:36 编辑 ]

使用道具 举报

回复
论坛徽章:
11
2011新春纪念徽章
日期:2011-02-18 11:42:49阿斯顿马丁
日期:2013-10-31 16:33:252013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:16:00奥运会纪念徽章:足球
日期:2012-08-19 15:57:15蛋疼蛋
日期:2012-02-22 22:32:12茶鸡蛋
日期:2012-02-14 23:20:502012新春纪念徽章
日期:2012-01-04 11:57:56复活蛋
日期:2011-12-28 11:00:35茶鸡蛋
日期:2011-12-07 17:10:33
30#
发表于 2012-2-10 14:33 | 只看该作者
开了对性能有多大影响?v$logmnr_contents的信息存在哪里,并发高的话是不是影响很大?

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表