SQL 2012 Troubleshooting: DBCC CHECKDB Msg 8908, Level 16, State 1, Line 1 (spatial index)
Issue
SDE SQL database that was restored from a SQL 2008 into a SQL 2012, after that DBCC CHECKDB starting to report this error.
Error message
Msg 8908, Level 16, State 1, Line 1
The spatial index, XML index or indexed view 'sys.extended_index_XXXXXXXXX_XXXXXX' (object ID XXXXXXXXX) does not contain all rows that the view definition produces. This does not necessarily represent an integrity issue with the data in this database. For more information about troubleshooting DBCC errors on spatial indexes, XML indexes, and indexed views, see SQL Server Books Online.
Msg 8907, Level 16, State 1, Line 1
CHECKDB found 0 allocation errors and 2 consistency errors in table 'sys.extended_index_XXXXXXXXXX_XXXXXX' (object ID XXXXXXXX).
Solution
After a lot of searching, we found others that had problems with indexes when comparability level was set to SQL Server 2005 (90) on a SQL Server 2012, so we just changed the comparability level to SQL Server 2012 (110) and run DBCC CHECKDB on database again. Then the errors were gone.