Error 7949

Severity

16

Message text

Versions earlier than 15.0:

The number of pages used and unused for %ld index %d on allocation page %ld do not match the counts in the OAM entry.

Version 15.0 and later:

The number of pages used and unused for object %ld index %d partition %ld on allocation page %ld do not match the counts in the OAM entry. Actual used/unsed counts: [%d, %d]. Used/unused counts in OAM entry: [%d, %d].

Explanation

This error occurs when Adaptive Server detects that the allocation page count in the object allocation map (OAM) is different from the actual number of pages in the chain. This problem is detected by dbcc checkalloc, dbcc tablealloc, and dbcc indexalloc. The object ID is the value immediately before the index value in the error text.

Usually this error will not cause any operations to fail at run time. Therefore, it is acceptable to wait to correct this problem until non-peak hours.

NoteThe instructions below are for fixing 7949 errors once they have occurred. Two easy-to-use strategies exist for detecting this error sooner in the future. Refer to “Detecting allocation errors early” in the chapter “Other Useful Tasks” in the most recent version of Troubleshooting and Disaster Recovery for information about these strategies.

Action

Occasionally dbcc checkalloc reports this error when no real error condition exists. You can either check to see if these errors are real, or continue with this section and take action to correct them, whether or not they reflect a real allocation error.

Because the process used to discover whether or not the errors are real can be time-consuming, you may want to go directly to the “Error Resolution” section now.


Verifying that the error is real

Run dbcc checkalloc in single-user mode if you suspect the 7949 error messages are incorrect. If the error is in master, use the section “Starting Adaptive Server in single-user mode” in the chapter “Server Recovery Tasks” in the most recent version of Troubleshooting and Disaster Recovery for instructions about how to invoke Adaptive Server in single-user mode. Refer to “Checking Database Consistency” in the System Administration Guide: Volume 2 for information about dbcc checkalloc.


Error resolution

If many of these errors are occurring, it is possible to clear them all at once by using the dbcc checkalloc command with the fix option. Refer to “Fixing and preventing allocation errors” in the chapter “Other Useful Tasks” in the most recent version of the Troubleshooting and Disaster Recovery for information about using dbcc checkalloc.


Confirming that the object exists

Execute the following query to make sure the object exists and is correctly referred to in the system catalog:

1> use <database_name> 
2> go

1> select object_name (<objid_from_error_msg>)
2> go

If an object name is returned, then the error is on an existing, correctly referenced object. If this is the case, use the procedure in “Fixing allocation errors when object ID and index ID are known” in the chapter “Other Useful Tasks” in the most recent version of the Troubleshooting and Disaster Recovery.

If a number, or something other than an object name is returned, use the procedure in “Fixing and preventing allocation errors” in the chapter “Other Useful Tasks” in the most recent version of the Troubleshooting and Disaster Recovery.

Versions in which this error is raised

All versions