We have a really strange situation and I thought I would reach out to a few colleagues and see if you have ever seen anything like this. At this point I am not fully convinced that this is a Crystal issue; more somehow the connection between Crystal and SQL Server. The versions: Crystal is 2011 the version of the Service on IIS is 13 and SQL Server 2008 R2; SP1. The SQL box is an Intel Xeon 3.47 GHz duel core 12 GB 64-bit O/S. Below is a description of the symptoms:
1) The error from Crystal Reports (CR) is: Failed to retrieve data from the database. Details: [Database Vendor Code: 3621 ] Failed to retrieve data from the database. Details: [Database Vendor Code: 8152 ] Failed to retrieve data from the database. Error in File Plant - Multi-Day Production Report {9B76053C-6E59-45E9-8599-AF2DB08C5116}.rpt: Failed to retrieve data from the database. Details: [Database Vendor Code: 3621 ]
2) The error only happens in Crystal Reports running a SQL Server Stored Procedure (SP)
3) We can run the SP from Microsoft SQL Server Management Studio and it runs without error
4) If the SP is dropped and created again in SQL Server, it removes the error condition from Crystal
5) If the SQL Server is restarted it will remove the error condition
6) Otherwise the error is persistent.
7) We have three reports using the same stored procedure and the error does not happen in a predictable manner from either of the three-reports.
8) Once the error occurs running one report all-three are affected.
9) The SP uses Variable Tables of which one can be somewhat large 150 fields X 20,000 records and can take about 10 seconds to produce the dataset.
10) The error first showed when the large Variable Table was used in the SP, and a couple days ago I change the final SELECT * FROM @TABLE to include OPTION (RECOMPILE) which help speed it up by 10% or so because the parameters can change how SQL runs the query. However, this change did not prevent the error.
11) The same SP is called four times to complete the four Subreports used in the CR that errors
12) The error first showed when on a SQL Server 2005 system and continues to show in the SQL Server 2008 R2 system.
Any ideas?