Attempt to fetch logical page (1:164360) in database 17 failed. It belongs to allocation unit 72057594328317952 not to 281474980642816.

【1】错误起因

引用自:https://bbs.csdn.net/topics/399021414?page=1#post-414142022

尝试用checkdb 修改该数据库。报错:

收集事实数据时检测到错误。可能是 tempdb 空间用尽或某个系统表不一致。请检查前面的错误消息。
再查sql的日志,只有这个:
Attempt to fetch logical page (1:110) in database 17 failed. It belongs to allocation unit 72057594328317952 not to 281474980642816.


【2】据说是某个表的索引有问题了,需要重建下索引。 怎么知道是哪个表出问题呢?

(1)可以先用dbcc page('[数据库名]',1,[PageID],3)获取页面信息, 找到ObjectId的属性值.
(2)然后用select * from sys.objects where object_id=[ObjectId属性值]查得对应的表名.

(1)找表名

  

 【3】执行存储过程失败

引用自:https://www.cnblogs.com/kerrycode/p/3876641.html#comment_tip

  

说是sql server2008 R2 SP1/SP2 的 bug,都有这个问题;

在临时表中,给临时表创建聚集索引,即可

原文地址:https://www.cnblogs.com/gered/p/14356556.html