black_chr 发表于 2013-01-25 10:08

sybase数据库系统表被破坏,如何修复?

一台服务器,估计是由于突然断电的缘故,发现数据库的系统表有被破坏的现象。执行一些简单的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.

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

njzh24 发表于 2013-01-25 10:36

mark~
尝试dbcc tablealloc加fix选项修复下。

fishcoder 发表于 2013-01-25 22:43

估计是DML操作的时候断电了,索引page还没有写完就悲剧了~

2BeSybPro 发表于 2013-02-01 11:04

本帖最后由 2BeSybPro 于 2013-02-01 11:27 编辑

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

hobbylu 发表于 2013-02-02 16:36

建议先备份数据库包括数据库的备份和bcp的备份,然后再想其他的办法,看是否能够通过修改系统表页面数据的方法来进行修改等
页: [1]
查看完整版本: sybase数据库系统表被破坏,如何修复?