楼主: jiangzx

[精华] db2回滚处理问题

[复制链接]
招聘 : c/c++研发
论坛徽章:
45
技术图书徽章
日期:2014-03-10 14:09:192012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:51:22ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
191#
发表于 2011-8-12 19:52 | 只看该作者
"如果说DB2可能会有LOG FULL的情况 => 整个系统挂了"

not really, you can configure to let system idle when log is full or rollback transactions by using BLK_LOG_DSK_FUL db cfg, usually it will not crash the system


blk_log_dsk_ful - Block on log disk full configuration parameter

Configuration Type
    Database
Parameter Type
    Configurable Online
Propagation Class
    Immediate
Default [Range]
    No [ Yes; No ]

This configuration parameter can be set to prevent disk full errors from being generated when DB2 cannot create a new log file in the active log path. Instead, DB2 will attempt to create the log file every five minutes until it succeeds. After each attempt, DB2 writes a message to the Administration Notification log. The only way that you can confirm that your application is hanging because of a log disk full condition is to monitor the Administration Notification log. Until the log file is successfully created, any user application that attempts to update table data will not be able to commit transactions. Read-only queries might not be directly affected; however, if a query needs to access data that is locked by an update request, or a data page that is fixed in the buffer pool by the updating application, read-only queries will also appear to hang.

Setting blk_log_dsk_ful to yes causes applications to hang when DB2 encounters a log disk full error, thus allowing you to resolve the error and allowing the transaction to complete. You can resolve a disk full situation by moving old log files to another file system or by enlarging the file system, so that hanging applications can complete.

If blk_log_dsk_ful is set to no, then a transaction that receives a log disk full error will fail and will be rolled back. In some situations, the database will come down if a transaction causes a log disk full error.

[ 本帖最后由 wangzhonnew 于 2011-8-12 20:55 编辑 ]

使用道具 举报

回复
论坛徽章:
18
ITPUB社区OCM联盟徽章
日期:2013-04-02 09:38:102013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28奥运纪念徽章
日期:2012-12-06 09:21:40凯迪拉克
日期:2013-08-22 14:55:37雪佛兰
日期:2014-01-22 11:02:36夏利
日期:2014-01-07 14:14:25蛋疼蛋
日期:2013-05-17 15:36:26本田
日期:2013-12-12 12:00:45
192#
发表于 2011-8-19 16:10 | 只看该作者

回复 #191 wangzhonnew 的帖子

"LOG FULL" is not "DISK FULL".

使用道具 举报

回复
招聘 : c/c++研发
论坛徽章:
45
技术图书徽章
日期:2014-03-10 14:09:192012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:51:22ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
193#
发表于 2011-8-19 19:15 | 只看该作者
well if you are talking about the other situation, where log space is exhausted, transactions will get -697 (or something similar to that) indicating there's no log space, and your application should properly handle the error and rollback transaction

使用道具 举报

回复
论坛徽章:
0
194#
发表于 2011-8-24 09:28 | 只看该作者
谢各位的意见,让我对DB2的了解增加了一些,谢谢

使用道具 举报

回复
论坛徽章:
0
195#
发表于 2011-8-24 09:28 | 只看该作者
谢各位的意见,让我对DB2的了解增加了一些,谢谢

使用道具 举报

回复
论坛徽章:
0
196#
发表于 2011-8-24 09:28 | 只看该作者
谢各位的意见,让我对DB2的了解增加了一些,谢谢

使用道具 举报

回复
论坛徽章:
0
197#
发表于 2011-8-24 09:28 | 只看该作者
谢各位的意见,让我对DB2的了解增加了一些,谢谢

使用道具 举报

回复
论坛徽章:
0
198#
发表于 2011-8-24 09:28 | 只看该作者
谢各位的意见,让我对DB2的了解增加了一些,谢谢

使用道具 举报

回复
论坛徽章:
26
ITPUB9周年纪念徽章
日期:2010-10-08 09:34:01沸羊羊
日期:2015-03-06 19:03:30懒羊羊
日期:2015-03-12 13:22:452015年新春福章
日期:2015-05-06 15:21:56喜羊羊
日期:2015-06-04 10:40:58美羊羊
日期:2015-06-08 14:50:13暖羊羊
日期:2015-06-24 15:29:55天枰座
日期:2015-08-14 09:14:10天枰座
日期:2015-08-17 15:40:42白羊座
日期:2015-10-15 08:38:30
199#
发表于 2011-8-30 20:29 | 只看该作者
get snapshot ,DB2 TOP,db2expln, db2exfmt ,等等等等

反之ORACLE, v$view, dba_view ,等等都是依靠SQL来获取。 ORACLE可以很容易的通过dba_hist来获取历史数据库状态信息,而DB2,好像天方夜谭,一个很忙的数据库get snapshot肯定有很多数据,还要通过grep来过滤,烦不烦?获取计划的命令后面那么多参数,ORACLE一句SQL搞定。

到了9.7,DB2也学ORACLE加了一些视图,DB2设计者的思维和ORACLE设计者的思维从我来看,完全不一样,差距太大。ORACLE设计者明显头脑灵活,简洁,而DB2设计者头脑混乱,思路不清。 [/quote]


这么复杂才导致用的人少,也不会和oracle一样烂大街了!

使用道具 举报

回复
招聘 : c/c++研发
论坛徽章:
45
技术图书徽章
日期:2014-03-10 14:09:192012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:51:22ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
200#
发表于 2011-8-31 21:06 | 只看该作者
楼上的是用不习惯而已,俺更习惯通过写脚本分析数据,而不是写查询……

使用道具 举报

回复

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

本版积分规则 发表回复

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