楼主: xiaowg

如何判断full recovery?

[复制链接]
论坛徽章:
137
ITPUB元老
日期:2008-05-10 12:57:22技术图书徽章
日期:2017-02-09 13:57:14乌索普
日期:2016-12-02 17:48:27妮可·罗宾
日期:2016-08-16 08:59:24弗兰奇
日期:2016-07-01 14:42:52双鱼座
日期:2016-06-17 11:46:40水瓶座
日期:2016-04-12 17:02:05白羊座
日期:2016-01-05 15:11:44狮子座
日期:2015-12-23 11:16:56山治
日期:2022-07-07 11:21:34
11#
发表于 2011-8-11 14:45 | 只看该作者
还有就是 不完全恢复后,log number是   会从 0000开始重置  还是 接着 最后利用的log number +1?

不完全恢复后,是不是一定需要重新备份? 以前的备份会失效?

使用道具 举报

回复
招聘 : 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
12#
发表于 2011-8-11 20:53 | 只看该作者
what exactly you mean "不完全恢复"?
restore and rollforward are totally separate concept. From the name "不完全恢复" it sounds like part of "restore" operation, or are you talking about something like "不完全前滚"?

and how do you define "不完全前滚"? from db2's perspective, once a database is restored, it doesn't know what is the current LSN from the pre-restored version of database, so there's no way to tell what is the expected LSN to be stopped. So when you fire rollforward command to end of logs, it will just search until hitting last valid transaction log and will stop. It's your responsibility (or any DBAs) to validate whether the transaction log is the latest one or not.

the next log extent id will not be reset to 0, instead it will start a new log chain and log extent id will be starting from the last log+1 from your rollforward operation.

使用道具 举报

回复
论坛徽章:
137
ITPUB元老
日期:2008-05-10 12:57:22技术图书徽章
日期:2017-02-09 13:57:14乌索普
日期:2016-12-02 17:48:27妮可·罗宾
日期:2016-08-16 08:59:24弗兰奇
日期:2016-07-01 14:42:52双鱼座
日期:2016-06-17 11:46:40水瓶座
日期:2016-04-12 17:02:05白羊座
日期:2016-01-05 15:11:44狮子座
日期:2015-12-23 11:16:56山治
日期:2022-07-07 11:21:34
13#
发表于 2011-8-12 09:43 | 只看该作者
我说的不完全恢复是 restore + rollforward to <time>(是oracle 里面的概念)。应该是你理解的" 不完全前滚“ 。

确实,rollforward 之后会 重新 开启一个 log chain。

使用道具 举报

回复
论坛徽章:
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
14#
 楼主| 发表于 2011-8-12 13:30 | 只看该作者
原帖由 wangzhonnew 于 2011-8-11 20:53 发表
what exactly you mean "不完全恢复"?
restore and rollforward are totally separate concept. From the name "不完全恢复" it sounds like part of "restore" operation, or are you talking about something like "不完全前滚"?

and how do you define "不完全前滚"? from db2's perspective, once a database is restored, it doesn't know what is the current LSN from the pre-restored version of database, so there's no way to tell what is the expected LSN to be stopped. So when you fire rollforward command to end of logs, it will just search until hitting last valid transaction log and will stop. It's your responsibility (or any DBAs) to validate whether the transaction log is the latest one or not.

the next log extent id will not be reset to 0, instead it will start a new log chain and log extent id will be starting from the last log+1 from your rollforward operation.


你的回答和IBM的答案一样,我彻底服了。难道SAP不知道DB2的这个缺点?一旦关联的数据库需要恢复,整个SAP系统需要手工做数据校对,费时费力。

使用道具 举报

回复
招聘 : 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
15#
发表于 2011-8-12 19:50 | 只看该作者
as long as you can make sure all log files are copied (by using mirror logging on separate file systems, you can guarantee the log files won't be missed unless someone manually remove them) you won't have integrity issues...

使用道具 举报

回复
论坛徽章:
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
16#
 楼主| 发表于 2011-8-19 16:25 | 只看该作者

回复 #15 wangzhonnew 的帖子

Since LUW DB2 does not know the last UOW, how can DBA know?

PS: Do copy primary logs before DB restoration, otherwise they will be removed.

使用道具 举报

回复
招聘 : 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
17#
发表于 2011-8-19 19:13 | 只看该作者
once rollforward is done, it will show the timestamp where rollforward stops, and then you can see whether if it's the one around your outage time

使用道具 举报

回复
论坛徽章:
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
18#
 楼主| 发表于 2011-8-29 13:14 | 只看该作者

回复 #17 wangzhonnew 的帖子

how to get the exact outage time? guess? how to compare?

The IBM DB2 DBA told me that these 2 timestamps are not same.

I have done a test and found: even full recovery, these 2 timestamps are not same.

[ 本帖最后由 xiaowg 于 2011-8-29 13:15 编辑 ]

使用道具 举报

回复
招聘 : 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
19#
发表于 2011-8-29 21:46 | 只看该作者
"how to get the exact outage time?"
there's something called "db2diag.log"

which 2 timestamps are not same?

使用道具 举报

回复
招聘 : 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
20#
发表于 2011-8-29 21:52 | 只看该作者
leetaedong , i don't really get what exactly you are talking about, if you still have more concern please open a new post and show the reproduce script and screenshot to explain your concern.

Thanks

使用道具 举报

回复

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

本版积分规则 发表回复

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