Solved

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

Posted on 2008-10-16
3
1,519 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to set audit trial on sql server 4 44
SQL Server 208R2 not recognizing DBF file in linked Server 11 51
Get row count of current SQL query 8 44
CROSS APPLY 4 44
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
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.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now