Warning: Making these changes can cause serious, system-wide problems within your environment. Do not make these changes unless you are confident with these steps and understand the impact to your system and other applications running on it.
An insert query to a table that has foreign key references cannot generate a plan. Most likely this is caused when an earlier version of SS XM that uses MSDE (SQL 2000) was upgraded to SS 8.11.xx.xx, which changed the database to use SQL Server Express 2005.
Server: Msg 8624, Level 16, State 1, Line 1 Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services.
Set the database compatibility to match the version of SQL Server.
ALTER DATABASE database_name SET COMPATIBILITY_LEVEL = {80 | 90 | 100}
Note: The ALTER command is only available in SQL Server 2008. When using prior versions of SQL Server, you will need to use the sp_dbcmptlevel stored procedure to change the compatibility mode.
Exec sp_dbcmptlevel ‘database_name, compatibility_level
COMPATIBILITY_LEVEL {80 | 90 | 100}
The value must be one of the following:
80 = SQL Server 2000
90 = SQL Server 2005
100 = SQL Server 2008
Note: If using MicroSoft SQL Server Management Studio you can change the compatibility mode by going to the properties of the database, select options and choose the appropriate mode that matches the SQL Server version as listed above.
See Also:
http://technet.microsoft.com/en-us/library/bb510680.aspx