ASE15.0.3升级时导致数据库不能启动问题的解决方法
此方法有一定的风险,请做好备份。you do it at your own risk!
以前的版本为:
Adaptive Server Enterprise/15.0.3/EBF 16550 ESD#1/P/NT (IX86)/Windows 2003/ase1503/2680/32-bit/OPT/Thu Mar 05 00:21:40 2009
在用mon表的时候报:NT storage access violation in omni_closetable destroyRemoteAccess. 怀疑是bug562998 。
于是打了ebf16738补丁。打补丁的过程和初次安装的过程一样只是wizard显示ASE15.0.3ESD#2,没有新建任何服务就选择完成了。
但是启动数据库的时候报错,很让人崩溃。难道我升级的方法有问题?
启动错误信息如下:
00:00000:00000:2009/12/14 14:55:34.59 kernel engine 0, os pid 2404 online
00:00000:00000:2009/12/14 14:55:34.59 server No active traceflags
00:00000:00001:2009/12/14 14:55:34.59 kernel libomni1 - Component Integration Services: using 'Sybase Client-Library/15.0/P-EBF16074 ESD #15/PC Intel/BUILD1500-111/OPT/Thu Jul 31 20:59:50 2008'
00:00000:00001:2009/12/14 14:55:34.59 server Opening Master Database ...
00:00000:00001:2009/12/14 14:55:34.71 server Loading ASE's default sort order and character set
00:00000:00001:2009/12/14 14:55:34.73 server Recovering database 'master'.
00:00000:00001:2009/12/14 14:55:34.75 server Started estimating recovery log boundaries for database 'master'.
00:00000:00001:2009/12/14 14:55:34.75 server Database 'master', checkpoint=(3779,8), first=(3779, 8), last=(3779, 31).
00:00000:00001:2009/12/14 14:55:34.75 server Completed estimating recovery log boundaries for database 'master'.
00:00000:00001:2009/12/14 14:55:34.75 server Started ANALYSIS pass for database 'master'.
00:00000:00001:2009/12/14 14:55:34.75 server Completed ANALYSIS pass for database 'master'.
00:00000:00001:2009/12/14 14:55:34.75 server Log contains all committed transactions until 2009/12/14 14:42:57.56 for database master.
00:00000:00001:2009/12/14 14:55:34.75 server Started REDO pass for database 'master'. The total number of log records to process is 24.
00:00000:00001:2009/12/14 14:55:34.78 server Error: 3474, Severity: 21, State: 1
00:00000:00001:2009/12/14 14:55:34.78 server During redo the page timestamp value is less than old timestamp from log. Page #=348, object id = 37, page timestamp=0000 00000b20. Log old timestamp=0000 0000dbc2. Log record marker = (3779, 12).
00:00000:00001:2009/12/14 14:55:34.78 server Cannot recover the master database, exiting.
00:00000:00001:2009/12/14 14:55:34.78 kernel ueshutdown: exiting
又启动了一次,同样的错误信息。日志的意思是当前时间戳比日志中的时间要小,正常的应该为0000 0000dbc2,而redo中的时间戳为:0000 00000b20。以前日志都记录到(3779, 12).页面上了,升级后不知道什么原因却记到348页面上了?
原因没有搞清楚,但是sybase数据库不能用了。以前研究并且实现了对sybase日志设备的解析工作。通过修改设备文件修改一下时间戳看看能不能奏效吧?
用二进制工具打开master设备文件,根据错误信息中的可疑页号348定位到1433600(350*4096,@@maxpagesize=4096),找到
时间戳0000 00000b20将其修改为0000 0000dbc2。让咱们也来欺骗一下sybase服务器。^_^
0015E000 | 5C 01 00 00 00 00 00 00 5A 01 00 00 25 00 00 00 | \.......Z...%...
0015E010 | 20 0B 00 00 45 00 00 04 00 00 F7 09 02 08 02 00 | ...E..........
0015E020 | 13 00 02 01 45 00 00 00 00 00 00 00 02 A8 01 4C | ....E.........L
0015E030 | 01 00 00 17 00 1C 70 65 72 63 65 6E 74 20 64 61 | ......percent da
0015E040 | 74 61 62 61 73 65 20 66 6F 72 20 68 69 73 74 6F | tabase for histo
0015E050 | 72 79 02 0E 00 02 AA 01 4C 01 00 00 19 00 1B 70 | ry.....L......p
0015E060 | 65 72 63 65 6E 74 20 64 61 74 61 62 61 73 65 20 | ercent database
0015E070 | 66 6F 72 20 6F 75 74 70 75 74 02 0E 00 02 A9 01 | for output.....
0015E080 | 4C 01 00 00 18 00 14 70 65 72 63 65 6E 74 20 68 | L......percent h
0015E090 | 69 73 74 6F 72 79 20 66 72 65 65 02 0E 00 02 AB | istory free....
上红色的 20 0B 改为C2 DB 后,启动sybase服务器,成功!日志如下:
00:00000:00001:2009/12/14 15:27:44.29 server Opening Master Database ...
00:00000:00001:2009/12/14 15:27:44.39 server Loading ASE's default sort order and character set
00:00000:00001:2009/12/14 15:27:44.40 server Recovering database 'master'.
00:00000:00001:2009/12/14 15:27:44.40 server Started estimating recovery log boundaries for database 'master'.
00:00000:00001:2009/12/14 15:27:44.42 server Database 'master', checkpoint=(3779, 8), first=(3779, 8), last=(3779, 31).
00:00000:00001:2009/12/14 15:27:44.42 server Completed estimating recovery log boundaries for database 'master'.
00:00000:00001:2009/12/14 15:27:44.42 server Started ANALYSIS pass for database 'master'.
00:00000:00001:2009/12/14 15:27:44.42 server Completed ANALYSIS pass for database 'master'.
00:00000:00001:2009/12/14 15:27:44.42 server Log contains all committed transactions until 2009/12/14 14:42:57.56 for database master.
00:00000:00001:2009/12/14 15:27:44.42 server Started REDO pass for database 'master'. The total number of log records to process is 24.
00:00000:00001:2009/12/14 15:27:44.46 server Redo pass of recovery has processed 2 committed and 0 aborted transactions.
00:00000:00001:2009/12/14 15:27:44.46 server Completed REDO pass for database 'master'.
00:00000:00001:2009/12/14 15:27:44.48 server Recovery of database 'master' will undo incomplete nested top actions.
00:00000:00001:2009/12/14 15:27:44.48 server Started recovery checkpoint for database 'master'.
00:00000:00001:2009/12/14 15:27:44.53 server Completed recovery checkpoint for database 'master'.
00:00000:00001:2009/12/14 15:27:44.53 server Started filling free space info for database 'master'.
00:00000:00001:2009/12/14 15:27:44.65 server Completed filling free space info for database 'master'.
00:00000:00001:2009/12/14 15:27:44.65 server Started cleaning up the default data cache for database 'master'.
00:00000:00001:2009/12/14 15:27:44.67 server Completed cleaning up the default data cache for database 'master'.
00:00000:00001:2009/12/14 15:27:44.75 server Checking external objects.
00:00000:00001:2009/12/14 15:27:45.26 server Database 'master' is now online.
呵呵,问题解决了。出现该问题的原因还未搞清楚!
————————————————————————————————————
——— 本文为andkylee个人原创,请在尊重作者劳动成果的前提下进行转载;
——— 转载务必注明原始出处 : http://www.dbainfo.net
——— 关键字: ASE 15.0.3 ESD#2 补丁 二进制 设备 dat
————————————————————————————————————