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

KB308018: "CALL statement found in explicit batch" error occurs when submitting a transaction from a Report Services Document in MicroStrategy 10.x.


Community Admin

• Strategy


This KB article describes an issue where submitting a transaction from a Report Services document against an IBM DB2 database causes the "CALL statement found in explicit batch" error to occur in MicroStrategy 10.x.

SUMMARY
This document discusses an error that can occur when using a CALL statement in a transaction against an IBM DB2 database in Strategy Secure Enterprise 10.x.
 
DESCRIPTION
Transaction services documents that contain a CALL statement in the underlying transaction may fail with an ODBC error when a user attempts to execute the transaction:

ka04W000000Oad3QAC_0EM4400000029BA.jpeg

The DSSErrors.log will contain the following error message:


[Strategy][ODBC DB2 Wire Protocol driver]CALL statement found in explicit batch. 
For more information, please consult DB2 document for error code SQL08349.

 
STEPS TO REPRODUCE

  • Create a Transaction object that uses a Call statement in the Freeform SQL editor. For example:
ka04W000000Oad3QAC_0EM4400000029BC.jpeg
  •  
    
    CALL MSTR_UPDATE ('Administrator', 'IS_CUBE_REP_STATS_TMP',' Hour_ID=[?TF[HOUR_ID@ID]@@1[?, CUBEACTIONID=1', 
    'SERVERMACHINE="SERVERMACHINE" and SERVERMACHINE="SERVERMACHINE"');

  • Configure a Report Services Document to use the Transaction created in step 1
  • Execute the document created in step 2 and submit the transaction. The error will then be seen in the DSSErrors. 

 
CAUSE
The issue occurs because of the semicolon (;) at the end of the Freeform SQL statement. An explicit batch is 2 or more SQL statements, each of which is separated by a semicolon.  In this situation there is only one SQL statement, however the addition of the semicolon causes the ODBC driver to interpret the CALL statement as occurring in an explicit batch.
 
ACTION
Removing the semicolon from the end of the Freeform SQL statement will allow the transaction to be successfully submitted.  Removing the semicolon will not cause a syntax error because there is only one SQL statement that is being submitted to the database.  This is illustrated in the screenshot below which shows the result of executing the statement through a query tool.  It can be seen that the CALL statement is successfully submitted to the database with the semicolon removed.

ka04W000000Oad3QAC_0EM4400000029BD.jpeg


KB308018


Comment

0 comments

Details

Knowledge Article

Published:

June 6, 2017

Last Updated:

December 28, 2018