Symptoms
In Microsoft SQL Server 2005 Service Pack 2, you run a query that selects many columns and that joins many tables. When you do this, you may receive the following error messages:
Error message 1

8624 error is being generated and a mini-dump written by the exception handler.
Error message 2

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.Additionally, a minidump file is generated in the SQL Server log.
Resolution
This issue occurs because the query runs under the execution context of the sp_cursoropen stored procedure. The SQL Server 2005 Database Engine generates an exception when SQL Server 2005 tries to create an execution plan.