Thursday, January 24, 2013

Attempt To Fetch Logical Page In Database - User Database

Error:
Issue - Error : 605, Severity: 21, State: 3.    Attempt to fetch logical page (1:123920) in database 7 failed. It belongs to allocation unit 1232560307852607488 not to 2719061315151921152.

Workaround:
This error comes usually when a page was corrupted with in the database, we have to run DBCC page command with page number which was given on error message. Find the example below.

dbcc traceon(3604)
dbcc page('DB_Name',1, 123920,3)
dbcc traceoff(3604)

You can use any option 0, 1, 2, 3 as the last parameter "3" which I was used on DBCC PAGE command.

In this case you have couple of options to overcome from this error.

Option 1: Restore corrupted page from last full backup.

RESTORE DATABASE DB_Name
PAGE = '1:123920'
FROM DISK = 'E:\Backup\DB_Name.bak'
WITH NORECOVERY

Option 2: if you doesn't have a full backup of your database then use "DBCC CHECKDB" command, but be careful you might get loose some data.

DBCC CHECKDB ('DB_Name') WITH NO_INFOMSGS

Above query will recommend you repair level. It may recommend REPAIR_REBUILD or REPAIR_ALLOW_DATA_LOSS, with Repair_Allow_Data_Loss repair level you will loose some data where Repair_Rebuild command you won't loose anything.

You may use either of the below given commands based on the Repair Level you have been suggested.

#Repair Level : REPAIR_REBUILD
ALTER DATABASE DB_Name SET SINGLE_USER
GO
DBCC CHECKDB('DB_Name', REPAIR_REBUILD)
GO
ALTER database DB_Name SET MULTI_USER
GO

#Repair Level : REPAIR_ALLOW_DATA_LOSS
ALTER DATABASE DB_Name SET SINGLE_USER
GO
DBCC CHECKDB('DB_Name'REPAIR_ALLOW_DATA_LOSS)
GO
ALTER database DB_Name SET MULTI_USER
GO
sql server 2008 attempt to fetch logical page in database 2 failed. attempt to fetch logical page in database 2 failed. attempt to fetch logical page in database 7 failed. an attempt was made to fetch logical page. attempt to fetch logical page that belongs to different object. attempt to fetch logical page in database 5 failed. Attempt to fetch logical page. in sql server 2012. in sql server 2008 R2. in sql server 2005. In sql server 2000. Attempt to fetch logical page (1:15) in database 'X' belongs to, DBCC CheckDB show no errors but I get Error 605 when doing, Data corruption cause - attempt to fetch logical page, Attempt to fetch logical page in database 'DBName' belongs to object 'TableName', not to object 'TableName'. Error: 605, Severity: 21,

0 comments:

Post a Comment