EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB46157: "Execute Query failed. Error type: Odbc error....Table not found in statement " error message appears when running a report against Salesforce in MicroStrategy Intelligence Server 9.4.x


Community Admin

• Strategy


"Execute Query failed. Error type: Odbc error....Table not found in statement " error message appears when running a report against Salesforce in MicroStrategy Intelligence Server 9.4.x

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:

  1. Consider Strategy Intelligence Server 9.4.x - call this A1. This environment is connected to Salesforce and development work is initiated. When this Intelligence Server connects to Salesforce for the first time, the embedded database is created.
  2. Now, the development work is moved to a different Strategy Intelligence Server 9.4.x - call this A2 (this is a 2nd node of the cluster). New  tables are created on the Salesforce side and when this environment A2 connects to Salesforce, information about all these objects is added to the embedded database that is created on A2.
  3. Now, users start running a report from Strategy Intelligence Server 9.4.x - A1 against the Salesforce table that was added during Step 2. Since this new table mapping does not exist in the embedded database that got created on A1, this error is received.


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


Comment

0 comments

Details

Knowledge Article

Published:

June 7, 2017

Last Updated:

June 7, 2017