Solved

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

Posted on 2008-10-16
3
1,555 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

737 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