12
返回列表 发新帖
楼主: ts_keta

[讨论] RAC1与RAC2数据不一致

[复制链接]
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
11#
发表于 2010-12-5 12:03 | 只看该作者
When you're connecting to database account A in sqlplus and you type connect B, your session to A is disconnected and the transaction (if there was one) is committed.

Yong Huang

使用道具 举报

回复
论坛徽章:
5
ITPUB9周年纪念徽章
日期:2010-10-08 09:34:022010广州亚运会纪念徽章:高尔夫球
日期:2011-01-18 16:02:54ITPUB十周年纪念徽章
日期:2011-11-01 16:25:22ITPUB 11周年纪念徽章
日期:2012-10-09 18:13:332013年新春福章
日期:2013-02-25 14:51:24
12#
发表于 2010-12-5 14:36 | 只看该作者
抱歉,发现一个自己的一个大漏洞。autocommit是针对每个命令的。

使用道具 举报

回复
论坛徽章:
15
ITPUB元老
日期:2006-12-26 07:41:45懒羊羊
日期:2015-03-04 14:48:16茶鸡蛋
日期:2013-07-15 09:56:182013年新春福章
日期:2013-02-25 14:51:24奥运会纪念徽章:拳击
日期:2012-08-06 22:33:592012新春纪念徽章
日期:2012-01-04 11:49:54紫蛋头
日期:2011-12-14 00:21:42ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28ITPUB8周年纪念徽章
日期:2009-09-27 10:21:212009日食纪念
日期:2009-07-22 09:30:00
13#
发表于 2010-12-5 18:12 | 只看该作者
没commit就去查了?

使用道具 举报

回复
论坛徽章:
5
ITPUB9周年纪念徽章
日期:2010-10-08 09:34:022010广州亚运会纪念徽章:高尔夫球
日期:2011-01-18 16:02:54ITPUB十周年纪念徽章
日期:2011-11-01 16:25:22ITPUB 11周年纪念徽章
日期:2012-10-09 18:13:332013年新春福章
日期:2013-02-25 14:51:24
14#
发表于 2010-12-6 07:56 | 只看该作者
原帖由 kenni 于 2010-12-5 18:12 发表
没commit就去查了?


commi了,所以lz才说只是偶尔才发生这样的现象。建立第二个连接的时候也是退出低一个连接的时候,自动提交最后一个transaction.

使用道具 举报

回复
论坛徽章:
1
生肖徽章2007版:马
日期:2008-03-31 20:44:40
15#
 楼主| 发表于 2010-12-10 18:39 | 只看该作者
commit_wait参数设置成了nowait导致的。

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
16#
发表于 2010-12-11 07:00 | 只看该作者
> commit_wait参数设置成了nowait导致的。

ts_keta, are you saying you found the root cause of your problem and it was because your commit_write (there's no commit_wait) was set to nowait? Is it explicitly set? According to
https://support.oracle.com/CSP/m ... =BUG&id=7142180

"In 11.1.0.6 and 10.2.0.4 the default commit behavior has changed so that
control is immediately being returned back to the client instead of waiting
for log buffer to be written to online log file. ( we are no longer waiting
for log file sync ) ... The default behavior is now that of commit_write=nowait, instead of wait."

So if you don't explicitly set it, it's nowait by default. Can you verify with many repeated tests as follows?

* Set commit_write to wait: you'll never see the problem you're reporting here.
* Don't set it or set it to nowait: some of your repeated tests show the problem.

Thank you.

Yong Huang

使用道具 举报

回复
论坛徽章:
1
生肖徽章2007版:马
日期:2008-03-31 20:44:40
17#
 楼主| 发表于 2010-12-19 22:30 | 只看该作者
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> sho parameter commit_wait

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
commit_wait                          string      WAIT
SQL>


I'm sure that the promble was cased by this parameter.
session 1: control is immediately being returned back to the client instead of waiting
for commit, it means that the transaction of session 1 is not complete
session 2:so the select statement return no data

版主你有ORACLE的参数大全吗

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
18#
发表于 2010-12-20 04:09 | 只看该作者
ts_keta,

Thanks for the correction. I didn't know till now 11g introduced commit_wait to replace commit_write.

All I can find is just Oracle Reference manual. MOS (support.oracle.com) doesn't have a good article describing all these changes. Looks like somebody can write a good article on this topic. Do you want to try?

Yong Huang

使用道具 举报

回复
论坛徽章:
78
ITPUB15周年纪念
日期:2020-08-28 17:23:53双鱼座
日期:2016-03-19 19:38:31秀才
日期:2016-02-18 09:31:52秀才
日期:2016-01-25 15:02:04双子座
日期:2016-01-19 20:35:54秀才
日期:2016-01-13 12:14:26秀才
日期:2015-12-25 15:31:10秀才
日期:2015-12-18 09:28:57秀才
日期:2015-12-14 14:56:09秀才
日期:2015-12-14 14:51:16
19#
发表于 2010-12-20 12:18 | 只看该作者
commit_wait=nowait岂不是是类似于INFORMIX的bufferlog?
通过牺牲durable提升性能?

使用道具 举报

回复
论坛徽章:
65
生肖徽章2007版:兔
日期:2011-01-20 12:58:49秀才
日期:2016-12-21 16:55:07秀才
日期:2016-03-24 09:10:242016猴年福章
日期:2016-02-23 09:58:34秀才
日期:2015-10-08 17:57:58双子座
日期:2015-09-17 10:07:092015年新春福章
日期:2015-03-06 11:57:312015年新春福章
日期:2015-03-04 14:19:11马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11
20#
发表于 2010-12-20 15:14 | 只看该作者
路过。
学习一下commit_wait的作用

使用道具 举报

回复

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

本版积分规则 发表回复

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