免费注册 查看新帖 |

Chinaunix

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

sybase数据库系统表被破坏,如何修复? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-01-25 10:08 |只看该作者 |倒序浏览
一台服务器,估计是由于突然断电的缘故,发现数据库的系统表有被破坏的现象。执行一些简单的select语句,服务器的cpu占用率马上是100%,查询不出来。
dbcc检查了系统表:
syscolumns,出来的提示是:
Checking dbo.syscolumns: Logical pagesize is 2048 bytes
Keys of index id 1 for table 'syscolumns' in data page not in correct order. Drop and re-create the index. (index page 100137)
Keys of index id 1 for table 'syscolumns' in data page not in correct order. Drop and re-create the index. (index page 100137)
Keys of index id 1 for table 'syscolumns' in data page not in correct order. Drop and re-create the index. (index page 100137)
Keys of index id 1 for table 'syscolumns' in data page not in correct order. Drop and re-create the index. (index page 100137)
Keys of index id 1 for table 'syscolumns' in data page not in correct order. Drop and re-create the index. (index page 100137)
Keys of index id 1 for table 'syscolumns' in data page not in correct order. Drop and re-create the index. (index page 100137)
Table Corrupt: Page linkage is not consistent; check the following pages: (current page#=49526;  page# pointing to this page=100137; previous page# indicated in this page=182461)
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.

dbcc系统表syscomments,出来的提示是:
Checking dbo.syscomments: Logical pagesize is 2048 bytes
Table Corrupt: Page linkage is not consistent; check the following pages: (current page#=100195;  page# pointing to this page=43267; previous page# indicated in this page=31431)
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.

请各位大侠看看,这是什么问题?应该怎样处理?谢谢。

论坛徽章:
0
2 [报告]
发表于 2013-01-25 10:36 |只看该作者
mark~
尝试dbcc tablealloc  加fix选项修复下。

论坛徽章:
0
3 [报告]
发表于 2013-01-25 22:43 |只看该作者
估计是DML操作的时候断电了,索引page还没有写完就悲剧了~

论坛徽章:
0
4 [报告]
发表于 2013-02-01 11:04 |只看该作者
本帖最后由 2BeSybPro 于 2013-02-01 11:27 编辑

关键的生产环境,一定要用备份恢复,手工操作不敢保证完全修复。实在没有备份,就只有手工修复了。

论坛徽章:
0
5 [报告]
发表于 2013-02-02 16:36 |只看该作者
建议先备份数据库包括数据库的备份和bcp的备份,然后再想其他的办法,看是否能够通过修改系统表页面数据的方法来进行修改等
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP