首页 > 学技术 > 技术网文 > Sybase > 正文

[精华] 实战:解决数据库7411报错!


来源 chinaunix.net 酷勤网整理

环境:119.2/10490 +AIX
问题:数据库重新启动的时候报7411错,该应用数据库不能online,无法访问该数据库上的应用数据。
解决办法:查手册7411的表述入下
   Table 'systhresholds' in database '%.*s' is not in its
     correct sort order. Either the clustered index is
     missing or there is data corruption in the table.
和日志中表述一样,按照提示,执行dbcc
错误信息如下:
    Keys of index id 1 for table 'systhresholds' in data page not    in correct order. Drop and re-create the index. (index page 337)
   The total number of data pages in this table is 1.
   Table has 4 data rows.
   DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.

最后的解决办法是:
update sysdatabases set status = -32768 where dbid = <x>;(后来请教高手,这行也许可以没有)
   update sysdatabases set status2 = -32768 where dbid = <x>;
   go
   shutdown
   go
   use <dbname>;
   go
   select first from sysindexes where id = object_id("systhresholds")
   go
   select count(*) from systhresholds
   go
   dbcc traceon(3604)
   go
   dbcc delete_row(<dbid>;,<first>;, row, 0)
   go
   dbcc delete_row(<dbid>;,<first>;, row, 1)
   go
   dbcc delete_row(<dbid>;,<first>;, row, 2)
   go
   dbcc delete_row(<dbid>;,<first>;, row, 3) 
   go
   select count(*) from systhresholds
   go
   use master
   go
   update sysdatabases set status = 0 where dbid = x
   go
   shutdown with nowait
   go
   此时启动正常了。。做dbcc检查,没有报错!



 chuxu 回复于:2005-10-25 21:56:18

dbcc 加fix行不行?
truncate table行不行?
Keys of index id 1 for table 'systhresholds'应该是索引的问题呀,drop index and reindex 行不行?


 RS9000 回复于:2005-10-26 10:51:22

不行,因为重新启动server时,该应用库不能online,只能在-32768状态下操作,可以bcp数据,但drop index和truncate table等都不能执行,dbcc修复不成功


 zhaopingzi 回复于:2005-10-26 12:29:36

请问dbcc delete_row(<dbid>;,<first>;, row, 3) 里的
<first>;是什么?


 hiaw 回复于:2005-10-26 14:52:38

贴出sp_sp_helpthreshold
和select * from systhresholds
结果,
给个例子,也是我实际实际error7411的方法,
可以参考一下:

systhresholds系统表是数据库定义的free space的阀值 
5840 由sp_helpthreshold 得出的

sp_dropthreshold DZGeneralDB,"logsegment",5840 

sp_addthreshold DZGeneralDB,"logsegment",5840,sp_thresholdaction 

update systhresholds set status=1


 chinadragon 回复于:2006-02-28 09:11:00

数据库的dbid应该怎么获取?我忘记了,哪位不吝赐教?


 1017of 回复于:2006-02-28 09:23:43

it is lucky that only index pages encounter corruption,especially for clusterd index


 Rabbit... 回复于:2006-02-28 10:32:39

dbcc delete_row
没看过dbcc 有这个选项阿,
这个命令是什么意思? 有什么功能啊?
:)


 小无赖 回复于:2006-02-28 16:10:22

在你这个里面fist是不是就是337?




原文链接:http://bbs.chinaunix.net/viewthread.php?tid=633673
转载请注明作者名及原文出处



收藏本页到: