Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

831 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