Home Dashboard Directory Help
Search

Attempt to fetch logical page (...) in database 2 failed. It belongs to allocation unit ... not to ... by Tant102


Status: 

Closed
 as Fixed Help for as Fixed


19
0
Sign in
to vote
Type: Bug
ID: 469811
Opened: 6/24/2009 1:44:45 AM
Access Restriction: Public
1
Workaround(s)
view
13
User(s) can reproduce this bug

Description

I was building a temporary table to fill with random data to test an udf.
I can only reproduce this using temporary tables. An base table works fine (which was my workaround).

Msg 605, Level 21, State 3, Line 9
Attempt to fetch logical page (1:1273) in database 2 failed. It belongs to allocation unit 7710162566401949696 not to 1801439857176018944.

> select @@version
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.0 <X64> (Build 6001: Service Pack 1)
Details
Sign in to post a comment.
Posted by dcrph127 on 3/28/2014 at 6:35 AM
I just received this same error in SQL Server 2008 R2 SP2.
Posted by Anatoly V. Popov on 2/14/2013 at 3:04 AM
It seems, that issue fixed in Sql Server 2012 SP1 CU2
Posted by Atif-ullah Sheikh on 12/6/2012 at 1:37 AM
I encountered this today on my production server. I am using temp tables in report procedures. Clustered Index resolved the issue but it is almost impossible for me to update all report procedures for this. I hope MS soon comes up with a hot fix to resolve this issue.
Posted by Anatoly V. Popov on 5/18/2012 at 12:27 AM
We ran into it in Sql Server 2008 R2 SP1.
Posted by Erland Sommarskog on 2/3/2011 at 2:44 PM
We ran into this today, big thanks to Richard Douglas for pointing me the solution. I've filed new bug with a repro for our case. https://connect.microsoft.com/SQLServer/feedback/details/641122/error-605-in-tempdb-on-sql-2008-r2-despite-bug-claims-to-be-fixed
Posted by Richard Douglas on 2/2/2011 at 4:52 AM
There is still a problem on SQL Server 2008 SP2 with temp tables that do not have a clustered index as I encountered it this morning.

Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64) Sep 16 2010 19:43:16 Copyright (c) 1988-2008 Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2)
Posted by Stefan M on 10/8/2010 at 2:03 PM
I'm encountering this problem as well in both SQL Server 2008 SP1 and SP2.
In my case the workaround did solve the problem.

Some additional info:
The temp table is created in a stored procedure which populates a SQL Server Reporting Services report dataset.

The stored procedure executes without warnings for me when manually running it in SQL Server Management Studio.
However, when trying to run the report (using identical parameters), I see a variant of the reported error message.
Posted by colin leversuch-roberts on 3/16/2010 at 6:34 AM
Just to add I can't find the source as this is a working production system, maybe 400+ concurrent users; just upgraded from sql 2000 so absolutley no chance to locate cause at this time.
Posted by colin leversuch-roberts on 3/16/2010 at 6:31 AM
sql 2008 sp1+cu2 ent x64 getting a batch of these errors so obviously not fixed in sp1 - always worrying to get any issues in a production system.
Posted by Mike Wade on 2/23/2010 at 6:03 AM
Im getting the same thing with SP1.

SELECT @@VERSION.....

Microsoft SQL Server 2008 (SP1) - 10.0.2746.0 (X64) Nov 9 2009 16:37:47 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 <X64> (Build 3790: Service Pack 2) Microsoft SQL Server 2008 (SP1) - 10.0.2746.0 (X64) Nov 9 2009 16:37:47 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 <X64> (Build 3790: Service Pack 2)
Posted by Aviel Iluz on 2/10/2010 at 2:05 AM
In Service Pack 1 the is still occuring. Clustered index helps.
Posted by Microsoft on 1/15/2010 at 11:16 AM
Hi,
It appears after further investigation that this issue was already identified and was fixed in Service Pack 1.

Thanks again for taking the time to report the issue!

emily
Posted by dy5005 on 10/28/2009 at 4:40 PM
Add a clustered index works. Thanks.
Posted by Microsoft on 7/17/2009 at 9:52 AM
Hi,
Thanks for taking the time to send us your feedback. We're looking in to the issue, and will get back to you when we know more about it.

thanks,
Emily
Sign in to post a workaround.
Posted by LarryEdlin on 9/8/2009 at 7:09 AM
Add a clustered index to the temp table. Using the example below, create the table as follows:

create table #t (pk INT IDENTITY(1,1) CONSTRAINT PK_pk PRIMARY KEY CLUSTERED, f int )