cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to retrieve data from the database. Database Vendor Code: 2812

Former Member
0 Kudos

Hello,

 

We have upgraded the Crystal Reports 9 to 2008 and upgraded the runtime
to 12.05 on our web server. After that we began getting random errors:

 

Failed to retrieve data from the database.

Details:  [Database Vendor Code: 2812]

 

During a day we have about 1-5 users running Crystal Report at
the same time. If the number of users is greater than 3 then one of them gets
2812 error (not each time but randomly). If error appears then this user will
get this error until the user logout from the web site. We’ve made a stress
test for 6 connections/reports. Once in a while (not every time) one of them
ends with 2812 error code and other 5 are finished fine at that time and
continue working fine after that.

To solve this problem we upgraded to Crystal Report 13 runtime (for
Visual Studio) and the error still exists with the same behavior.

The error happened at fourth line:

crExportOptions.DestinationOptions = crDiskFileDestinationOptions;

crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;

crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;

crMainRpt.Export();

 

We are recording the parameters, *.rpt name, output file name and
they are looking fine. We have about 1000 reports in a day for 200 users and 50
random errors for 10 users. We are using third party SSCSDK80.dll for custom
graphics but still getting error with original one.

 

Any help would be really appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

What database are you using? Search their WEB site for that error message, should give you a clue as what the problem is.

Ludek is assuming it's MS SQL Server.... And yes I agree, don't keep those Verify options checked on. CR assumes the reports and database stay as is when put into production.

You may want to simply open each report, set location and verify the database and then save the reports so that all references are updated to current RPT version.

Don

Former Member
0 Kudos

Yes, it is MS SQL Server 2008, IIS (not sure what is the version), aspx pages with csharp, inline stored procedure calls in the reports - not the command line, several subreports. The stored procedures are complicated so each report could take 1-4 minutes to finish.

Database administrator cannot see any connection or other activity when we are trying to run the report that already returned error (if a report returned an error then any further attempts will return error until user log-out from the web session)

I will try tomorrow. Thanks for your suggestions. Currently my goal is to get more detailed error message.

Former Member
0 Kudos

Problem solved!

CR9 runtime is taking database name from *.rpt file even if ConnectionInfo.DatabaseName  has a different value.

In CR12 and CR13 runtime is always using the ConnectionInfo.DatabaseName value and ignoring the database name from *.rpt file.

That's what we have in our environment. This could not be true in all of the cases.

Thanks everybody for your help!

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

Hello Andrey

Please see if the following will give you a clue:

http://scn.sap.com/thread/1510188

http://help.sap.com/businessobject/product_guides/errors/12/0/en/html/topic180.html

http://msdn.microsoft.com/en-us/library/aa258751(v=sql.80).aspx

Now, I realize that to most of the above the initial reaction will be something like; but it works sometimes...

So, in addition to considering the above links, see if enabling the options "Verify on 1st Refresh" and "Verify Stored procedure on 1st Refresh" will help. Some people don't like these options on report at runtime as it may impact performance, but try it and see if that helps.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

I've played with the flags "Verify on 1st Refresh" and "Verify Stored procedure on 1st Refresh" but the error still exists. I've setup up them on and off but that not helped. The error message is the same. It occurs ones in ~2 hours or once per 50 reports (today).

Is there any other thoughts? Or might be some way to get more details on the error?

Thanks.

former_member183750
Active Contributor
0 Kudos

Remember that the message: "Database Vendor Code: 2812", is coming directly from the database client. It may be an idea to post to a forum that concerns your database, or to consult your database documentation re. details for the error.

Other than that, google the error, see if you get any pointers there.

- Ludek

0 Kudos

Another thing is the number of reports, CR for VS is limited to 3 CPL's, open reports are one time. Could be you are not closing and siposing of the report objects after they are done with.

The error could simply be because youa re not try/catching other parts, like the opening of the report itself....

Don

Former Member
0 Kudos

Hello Don,

thanks for your suggestion.

Yes, we have had this problem in CR2008, it was "Too many jobs opened" from IIS. The code:

Document.Close();

CrRpt.Dispose();

solved the problem.

Current status is, we were not been able to find a solution and rolled back to Crystal Report 9 runtime yesterday. Since then not errors reported.

0 Kudos

OK, one issue is Microsoft only has limited support for SQL 2008 using the MDAC DB driver so you need to update the Client tools and then update the reports to use SQL Native 10 driver.

Also, MSDN explains the error:

Explanation

An attempt was made to execute a stored procedure that does not exist. If the procedure does exist (it appears when sp_help is run with no parameters), the error might have occurred because you did not fully qualify the procedure name. If the procedure is not owned by the user attempting to execute it, and it is not owned by the database owner (dbo), all references to it must include the owner name. For example, suppose user1 creates a procedure called proc1. Any users must add the owner name before the procedure name, as shown in the following example:

What this indicates is the security on those tables are not set up properly in SQL 2008. MS changed the security in 2008 completely so your DBA now must go in and grant access for each table for each user. CR used the SA account to connect. I believe if you disable the sa account, it's disabled by default in 2008, you'll find CR 9 doesn't work either.

So I think the problems are on your Server and permissions, once your DBA sorts this out then you should be able to upgrade CR.

Don

Former Member
0 Kudos

Thanks for suggestion. We will try to update the Client tools.

We are using MS OLE DB Provider for SQL Server in the Crystal report as a data source. Should we pay attention to ODBC driver in this case? Currently we have ODBC v.6.00.6002.18005 and planning to install v.10.0 2007.100.1600.22

0 Kudos

For SQL 2008 you MUST use the Native 10 Client dll in either ODBC or OLE DB.

Do not use the OLE DB Provider.

Don

Former Member
0 Kudos

We have installed Client tools v.10 on our server and tried to update to Crystal Reports run-time v.13 but error occurs again. Is there any way to tell CR to use v.10 of Client tools? We are having ability to change the ODBC driver (which we are not using) but not the MS SQL OLE DB.

We have 2008 SQL server - not R2 version of it.

Thanks.