免费注册 查看新帖 |

Chinaunix

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

dbcc checktable 出错,下一步该怎么做? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-04-10 17:02 |只看该作者 |倒序浏览
FYI:
....
....
Keys of index id 9 for table 'n_cust' in index page not in correct order. Drop
and re-create the index. (index page 11270)
Msg 2511, Level 16, State 2:
Server 'DSZX', Line 1:
Keys of index id 9 for table 'n_cust' in index page not in correct order. Drop
and re-create the index. (index page 11270)
Msg 2511, Level 16, State 2:
Server 'DSZX', Line 1:
Keys of index id 9 for table 'n_cust' in index page not in correct order. Drop
and re-create the index. (index page 11270)
Msg 2511, Level 16, State 2:
Server 'DSZX', Line 1:
Keys of index id 9 for table 'n_cust' in index page not in correct order. Drop
and re-create the index. (index page 11270)
Msg 2511, Level 16, State 2:
Server 'DSZX', Line 1:
Keys of index id 9 for table 'n_cust' in index page not in correct order. Drop
and re-create the index. (index page 11270)
Msg 7931, Level 16, State 1:
Server 'DSZX', Line 1:
Table Corrupt: keys in right child precede the parent key; check right child
page 10190.

Msg 7930, Level 16, State 1:
Server 'DSZX', Line 1:
Table Corrupt: keys in left child do not precede the parent key; check left
child page 7531.
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.


Thanks

论坛徽章:
0
2 [报告]
发表于 2006-04-11 00:16 |只看该作者
Got the following from TS guide for you:

Explanation
This serious error is returned by dbcc checktable or dbcc checkdb (which calls dbcc checktable). dbcc checktable checks a table and its indexes to determine whether:


Pages are linked correctly

Indexes are properly sorted

Pointers are consistent

Page offsets are consistent

sysindexes pages are correct

The data row count is equal to the leaf row count for nonclustered indexes


During index level checking, for each key in the parent page, dbcc checktable checks whether the last key in the left child page is less than the parent key, and whether the first key in the right child page is greater than or equal to the parent key. If the last key in the left child is not less than the parent key, Error 7930 occurs.

Action

Use the procedure in "How to Find an Object Name from a Page Number" in the Encyclopedia of Tasks chapter to identify which table and index correspond to the page number from the error message text.

If the object encountering the error is not a system table (a system table's object ID is less than 100), continue with step 3.

If the object with the error is a system table and the index ID is not 0, refer to "How to Fix a Corrupted Index on System Tables" in the Encyclopedia of Tasks chapter for instructions on how to repair the system table index. Then go to step 5.

If the object with the error is a system table and the index ID is 0, contact Sybase Technical Support. They may be able to help you repair the corruption but it may be necessary to restore from clean backups.

If the object with the error is a user table and the index ID is not 0, determine whether there is a clustered index on the table:

1> sp_helpindex table_name
2> go

where table_name is the name you determined in step 1.

If there is a clustered index on the table, rebuild it. Then go to step 5.

If there is a nonclustered index on the table, rebuild the index using the following steps.

Translate the index ID into an index name:

1> use database_name
2> go


1> select name from sysindexes
2> where id = object_ID and indid = index_ID3> go

To ensure that the information needed to re-create the index is available, run sp_helpindex on the index prior to dropping it.

Drop the index.

Re-create the index. This clears the corruption in most cases.

Run dbcc checktable on the table to verify that the corruption is gone. If corruption still exists, call Sybase Technical Support.

论坛徽章:
0
3 [报告]
发表于 2006-04-11 12:16 |只看该作者
就是要重建index咯?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP