Solved

Error - Msg 605, Level 2 ... Attempt to fetch logical page ...

Posted on 2008-10-16
3
1,529 Views
Last Modified: 2012-05-05
I was running a simple query on a large table tab1 with a where clause depending on two smaller tables (tab2 and tab3) where the nested query only returns 633 values.

select * from tab1 where id in (select id from tab2 inner join tab3 where ...)

and get the following message

Msg 605, Level 21, State 3, Line 1
Attempt to fetch logical page (7:5707686) in database 6 failed. It belongs to allocation unit 0 not to 359756898631680.

Any idea what's going on?
pax


0
Comment
Question by:cpeters5
3 Comments
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 500 total points
ID: 22736685
That is database or index corruption.

Run the following commands on each table access in your query (ie. tab1, tab2, tab3)

Once you find the one that gives you the error, you can try dropping and recreating the indexes.  If that doesn't solve the problem you will need to restore that table from backup.
dbcc checktable(tab1)

Open in new window

0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question