When you run a query that uses a fast forward-only cursor in Microsoft SQL Server 2005, you receive the following error message:
Msg 8622, Level 16, State 1, Line 2
Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query without specifying any hints and without using SET FORCEPLAN.
Additionally, if the index hint and the option hint are removed from the query, you receive the following error message when you run the query:
Msg 8623, Level 16, State 1, Line 1
The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
This problem typically occurs when the query contains many subqueries.
Note This problem does not occur in SQL Server 2000.