Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My nightly maintenance plans are failing for two databases. I'm not even sure what this means. Any ideas on how to fix?

Here's the error I have from the maintenance plan:

Executing the query "DBCC CHECKDB(N'Site_DB')  WITH NO_INFOMSGS
" failed with the following error: "The Index Allocation Map (IAM) page (0:0) is pointed to by the previous pointer of IAM page (1:747) in object ID 0, index ID -1, partition ID 0, alloc unit ID 72057597046816768 (type Unknown), but it was not detected in the scan.
CHECKDB found 1 allocation errors and 0 consistency errors not associated with any single object.
CHECKDB found 1 allocation errors and 0 consistency errors in database 'Site_DB'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (Site_DB).". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

The interesting part is that 2 different databases are reporting this with the exact same page id. Not sure why that is.

share|improve this question
    
Interestingly, this exact problem (exact same message) just occurred again; except on a different database. Something else is going on here. –  Chris Lively Aug 17 '10 at 1:54
    
More information: This seems to occur after I restore a database. –  Chris Lively Aug 27 '10 at 15:12

1 Answer 1

up vote 1 down vote accepted

I ran across an article which gave some hints on how to get to the issue.
So I ran the following:

DBCC TRACEON(3604,-1)
GO
DBCC PAGE('Site_DB', 1, 747, 3)

The Metadata: IndexId value result was -1. The article said if it was greater than 1 then drop and recreate the non-clustered index. If it was 0 or 1 then restore from backup or try the repair. Unfortunately, neither of those situations cover a -1 value...

So I went ahead and ran

DBCC CHECKDB('Site_DB', REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS, ALL_ERRORMSGS

This came back and said if found the allocation errors and fixed them. Just to be sure I ran DBCC CHECKDB('SiteDB') WITH NO_INFOMSGS once more and it came back clear.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.