when executing certain SP get following error:-
Error Msg 605, Level 21, State 3 attempt to fetch logical page (1:64920) in database 2 failed.it belongs to allocation unit 5620492348599828480 not to 7782220170966466560
- In my Case indicated database ID 2 by the error message is 2 means the database affected is tempdb which is a system database.
- we can remove the corruption or fixing this type of corruption in tempdb is to simply restart the SQL Server instance and resolve the corruption issue in tempdb.
- But if the database ID’s other than 2, then You may need to restore from backup.
However you can try this below recommendation to fix this issue:-
if you have sysadmin(sa) rights then you can execute
DBCC PAGE (2, 5, 65424, 3);
and look for the Metadata: IndexId value.
- If it is 0 (heap) or 1 (clustered index) you have to restore from latest backup.
- If it is not 0 or 1 then you can just rebuild the non-clustered index.