SYMPTOM
In Strategy Intelligence Server 9.x, an error similar to the following is received when users try to run a report against Salesforce:
SQL Generation Complete
QueryEngine encountered error: Execute Query failed.
Error type: Odbc error. Odbc operation attempted: SQLExecDirect. Table not found in statement
[SELECT
Id,
Name
FROM
brand
Connection String: DSN=SalesforcePERF;UID=user@sf.com;
SQL Statement:
SELECT
Id,
Name
FROM brand__c
WHERE OwnerId = 'AG'
However, the table being used in the SQL statement does exist on the Salesforce side. This can be verified by directly connecting to Salesforce and looking at the list of available objects.
CAUSE
This error can be seen in cases where the table being used in the report SQL does not exist in the embedded database that is created by the driver on the Strategy Intelligence Server side. When a connection is made for the first time from Strategy Intelligence Server 9.x to Salesforce, a local embedded database is created by the driver on the Intelligence Server machine. Refer to the driver documentation for more details on the embedded database.
http://media.datadirect.com/download/docs/jdbc/alljdbc/userguide/wwhelp/wwhimpl/js/html/wwhelp.htm#href=rfi1359985914837.html
One possible scenario that can result in the embedded database not having a table is explained below:
ACTION
The embedded database is updated only when a refresh statement is issued or if the local embedded database is dropped (which forces the embedded database to be re-created). Users can update the embedded database by running the following command from Strategy DB Query tool:
Sample Code/Error
REFRESH SCHEMA SFORCE
The embedded database is dropped by deleting the files which are created locally on the Strategy Intelligence Server machine. Refer to the following link for information on the files that are created as part of the embedded database: http://media.datadirect.com/download/docs/jdbc/alljdbc/userguide/wwhelp/wwhimpl/js/html/wwhelp.htm#href=rfi1359985914837.html