免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: zhuanghp

syscolumns表报错629,需要重新建立索引 [复制链接]

论坛徽章:
0
发表于 2006-02-20 14:53 |显示全部楼层
谢谢,十分感谢。
对数据库的dbcc不太可能,数据库太大了,时刻在读写数据。
我先试试单表dbcc吧。

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
发表于 2006-02-20 14:55 |显示全部楼层
1> use master
2> go
1> sp_dboption database_name, "single user", true
2> go
1> sp_configure "allow updates", 1
2> go
Issue the sp_fixindex command:
1> use database_name
2> go
1> checkpoint
2> go
1> sp_fixindex database_name, object_name, index_ID
2> go
Run dbcc checktable to verify that the corrupted index is now fixed.
Disallow updates to system tables:
1> use master
2> go
1> sp_configure "allow updates", 0
2> go
Turn off single-user mode:
1> sp_dboption database_name, "single user", false
2> go
1> use database_name
2> go
1> checkpoint
2> go

不知道可不可以帮到你。。
解决后告诉大家一下。

论坛徽章:
0
发表于 2006-02-20 15:04 |显示全部楼层
谢谢RS9000,
以前做过sp_fixindex,不是用单用户做的,失败了,
sp_fixindex db1,syscolumns,1

错误信息如下:
Msg 605, Level 16, State 1:
Server 'pp2db', Procedure 'sp_fixindex', Line 107:
An attempt was made to fetch logical page '257' in database 'master' from cache 'default data cache'. Page belongs to object with id '45', not to object 'sysdatabases'.
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.

一会儿我用单用户模式再试试看。

成功与否,我都会上来汇报的---对自己的帖子负责。

论坛徽章:
0
发表于 2006-02-20 18:39 |显示全部楼层
备份全库.

select * into syscolumns_bak from syscloumns
go
truncate table syscloumns
go
insert into syscolumns select * from syscolumns_bak
go

论坛徽章:
0
发表于 2006-02-21 09:31 |显示全部楼层
RS9000,今天找机会试了一下,确实还是不行,显示信息为:

Msg 605, Level 16, State 1:
Server 'pp2db', Procedure 'sp_fixindex', Line 107:
An attempt was made to fetch logical page '257' in database 'master' from cache 'default data cache'. Page belongs to object with id '45', not to object 'sysdatabases'.
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.

论坛徽章:
0
发表于 2006-02-21 09:34 |显示全部楼层
小无赖,你的办法理论上看是可行的,只要设置sp_configure "allow updates to system table", 1
就可以操作系统表了,不过,要做全库备份,不太现实,我这个库实在是太大了。谢谢。

论坛徽章:
0
发表于 2006-02-21 11:00 |显示全部楼层
真奇怪你的数据库为什么不能做全库备份.再大的数据库也要做全库备份吧.

论坛徽章:
0
发表于 2006-02-21 11:04 |显示全部楼层
这是根据需求来设计的

论坛徽章:
0
发表于 2006-02-21 11:40 |显示全部楼层
学习学习,哪些需求设计成不能备份的?

论坛徽章:
0
发表于 2006-02-21 12:18 |显示全部楼层
别学这个呀,我们是没有空间做这个备份。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP