免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3835 | 回复: 8
打印 上一主题 下一主题

那仁兄帮忙看看,master怎么了? [复制链接]

论坛徽章:
2
数据库技术版块每日发帖之星
日期:2015-08-23 06:20:00数据库技术版块每日发帖之星
日期:2015-09-21 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-10-25 17:26 |只看该作者 |倒序浏览
00:00000:00001:2006/10/25 17:23:49.35 server  Opening Master Database ...
00:00000:00001:2006/10/25 17:23:49.45 server  Loading SQL Server's default sort order and character set
00:00000:00001:2006/10/25 17:23:49.48 server  Loaded default Unilib conversion handle.
00:00000:00001:2006/10/25 17:23:49.54 server  Recovering database 'master'.
00:00000:00001:2006/10/25 17:23:49.57 server  Started estimating recovery log boundaries for database 'master'.
00:00000:00001:2006/10/25 17:23:49.59 server  Database 'master', checkpoint=(2597, 24), first=(2597, 24), last=(2598, 22).
00:00000:00001:2006/10/25 17:23:49.62 server  Completed estimating recovery log boundaries for database 'master'.
00:00000:00001:2006/10/25 17:23:49.65 server  Started ANALYSIS pass for database 'master'.
00:00000:00001:2006/10/25 17:23:49.70 server  Completed ANALYSIS pass for database 'master'.
00:00000:00001:2006/10/25 17:23:49.73 server  Started REDO pass for database 'master'. The total number of log records to process is 24.
00:00000:00001:2006/10/25 17:23:49.76 server  Error: 3474, Severity: 21, State: 1
00:00000:00001:2006/10/25 17:23:49.78 server  During redo the page timestamp value is less than old timestamp from log. Page #=234, object id = 37, page timestamp=0000 0000b063. Log old timestamp=0000 0000b071. Log record marker = (2598, 4).
00:00000:00001:2006/10/25 17:23:49.82 server  Cannot recover the master database, exiting.
00:00000:00001:2006/10/25 17:23:49.84 kernel  ueshutdown: exiting

论坛徽章:
0
2 [报告]
发表于 2006-10-25 17:43 |只看该作者
master库的日志有问题,需要截断一下啊

论坛徽章:
0
3 [报告]
发表于 2006-10-25 22:04 |只看该作者
Got this from Sybase solved case:

Error 3474 indicates transaction log corruption. Contact Sybase Technical Support to discuss recovery options. The supported and safest method is to recover from a backup copy of the database.

Please be aware that a known problem exists for ASE releases >= 12.0 and < 12.0.0.5, and includes ASE release >= 12.5 < 12.5.0.1 ESD#1. Change request 275760 resolves a problem caused by setting the per table identity_gap to a very low value. The smaller gap forces ASE to update the oam page more frequently. The update activity exposes the database to the problems surrounding the bug and results in transaction log records for OAM updates that are not written in the correct order. The CR (bug) was discovered in a production environment where the table was assigned the value of '1' as the identity_gap.

Because the lowest 'safe' value for the per-table identity_gap was never established the recommendation is to use the default value (based on identity burning set factor) or upgrade to a release where the CR is resolved (12.0.0.5 or 12.5.0.1 ESD#1). Installing a patch release will NOT correct a transaction log that has already been corrupted.

Use sp_help <tablename> to determine if any user tables have a specific identity gap assigned. If so disable the gap and reset it to the default.

To reset to the default value
sp_chgattribute your_table_name, 'identity_gap', 0

Description of Change Request(CR)275760.
"A 3474 error may be reported by boot time, LOAD DATABASE or LOAD TRAN recovery when trying to redo an OAM operation."

论坛徽章:
2
数据库技术版块每日发帖之星
日期:2015-08-23 06:20:00数据库技术版块每日发帖之星
日期:2015-09-21 06:20:00
4 [报告]
发表于 2006-10-26 12:47 |只看该作者
以上问题以解决.方法如下 :
1、编辑RUN_servername
在命令行最后加入:-T3607

2、单用户模式启动ASE
$cd install
$startserver -f RUN_servername -m

3、bcp out系统表
$bcp master..sysdevices out /sybase/wh/devs -Usa -P -c
$bcp master..sysdatabases out /sybase/wh/dbs -Usa -P -c
$bcp master..sysusages out /sybase/wh/usages -Usa -P -c
$bcp master..syslogins out /sybase/wh/logins -Usa -P -c
$bcp master..sysconfigures out /sybase/wh/configures -Usa -P -c
$bcp master..syscharsets out /sybase/wh/charsets -Usa -P -c

4、shutdownASE

5、创建新master设备
$buildmaster -d<path_to_new_master_device> -s<new_master_device_size>
(new_master_device_size以2K为单位)

6、编辑RUN_servername
将指定master设备指定为新创建的master设备,并删除在第1步中增加的参数。

7、删除/sybase/wh/dbs、/sybase/wh/usages(dbid=1,2,3)文件中有关master、tempdb、model的内容。

8、单用户模式启动ASE
$cd install
$startserver -f RUN_servername -m

9、 bcp in系统表(注意,如果bcp out的文件删除不干净,bcp in的时候可能会有错误,没有关系。)
$ bcp master..sysdevices in /sybase/wh/devs -Usa -P -b 1 -c
$bcp master..sysdatabases in /sybase/wh/dbs -Usa -P -b 1 -c
$bcp master..sysusages in /sybase/wh/usages -Usa -P -b 1 -c
$bcp master..syslogins in /sybase/wh/logins -Usa -P -b 1 -c
$bcp master..sysconfigures in /sybase/wh/configures -Usa -P -b 1 -c
$bcp master..syscharsets in /sybase/wh/charsets -Usa -P -b 1 -c

10、重启ASE

此时的数据库基本可以操作了,但存储过程不可用。

11、执行installmaster脚本
$isql -Usa -P –n –i $SYBASE/scripts/installmaster

数据库此时正常。

论坛徽章:
3
天秤座
日期:2014-10-29 11:37:572015元宵节徽章
日期:2015-03-06 15:50:39NBA常规赛纪念章
日期:2015-05-04 22:32:03
5 [报告]
发表于 2006-11-17 08:35 |只看该作者
楼主是个好同志,继续发扬这种解决问题后,把方法也贴出来

论坛徽章:
0
6 [报告]
发表于 2006-11-17 13:32 |只看该作者
针对twtynky 的方法指出一点看法,在bcp in系统表的数据之后sybsystemprocs无需再执行installmaster脚本

论坛徽章:
0
7 [报告]
发表于 2006-11-17 23:37 |只看该作者

回复 4楼 twtynky 的帖子

另外一种建议
使用-T 3607启动后,直接 dump tran master with no_log 把错误的日志清掉
然后 shutdown & reboot ASE Server
当然做好系统表备份是有必要的,但如果可以了就不需要bcp in了。

论坛徽章:
2
数据库技术版块每日发帖之星
日期:2015-08-23 06:20:00数据库技术版块每日发帖之星
日期:2015-09-21 06:20:00
8 [报告]
发表于 2006-11-18 08:41 |只看该作者
如果错误日志能够截断,就不用这么麻烦了.

论坛徽章:
0
9 [报告]
发表于 2006-11-18 21:32 |只看该作者

回复 8楼 twtynky 的帖子

除非是你错误的往master中写入了很多不该写入的东西
否则日志不会满到截断不了这么惨的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP