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

KB485892: How to Resolve the "Transaction Control Statements are Only Supported in Scripts or Sessions" error


Karthik Chandran Lakshmanasamy

Quality Engineer, Principal • MicroStrategy


Starting with the release of Strategy ONE (March 2024), dossiers are also known as dashboards.
Strategy 2021 Update 8 (February 2023) and later includes a new Google BigQuery ODBC driver version 2.6.0.1002. The new driver introduces system breaking changes to the ODBC DSN data source configurations. 
NOTE: Before proceeding with the following instructions, see KB485896: How to Resolve the "Authentication failed: unauthorized_client. error_description: Unauthorized" error.
A feature introduced in this driver is support for multi-statement transactions. The reports and dossiers that trigger the transactions may fail and trigger the following error message if you have a DSN based connection:

 Error while executing a report. Error = QueryEngine encountered error: Execute Query failed. Error type: Odbc error. Odbc operation attempted: SQLExecDirect. ['400', 'invalidQuery', 'Transaction control statements are supported only in scripts or sessions']

This behavior is caused by a driver change to support Bigquery Multi-Statement Transactions. See below for driver notes from Magnitude:

Enhancements & New Features

  • [GAUSS-1190] EnableSession support
    • You can now create a session ID from the first executed query on a connection. To do this, select the Enable Session check box (set the EnableSession property to 1).
  • [GAUSS-1279] Multi-statement transactions support
    • The connector now supports multi-statement transactions. For more information, refer to the Google notes.


To resolve this issue, perform the following steps:
 

Windows Users

  1. If this is your first time upgrading to 2021 Update 8 (February 2023) release or later, create a new DSN for Google BigQuery. For more information, see KB485896: How to Resolve the "Authentication failed: unauthorized_client. error_description: Unauthorized" error.
ka0PW0000001JkSYAU_0EM4W000006yYYb.jpeg
  1. Select the EnableSession parameter in the ODBC GoogleBigQuery DSN in the ODBC administrator.
  2. Disconnect the Connection in Developer or restart the Intelligence Server.

NOTE: You do not need to add the parameter if you are using a DSN-less connection or JDBC. EnableSession=1 is automatically added to your connection string, if it is not present during runtime.
 

Linux Users

  1. Go to ODBC.INI and add the following parameter to the GoogleBigQuery DSN Entry:
    1. EnableSession=1
  2. Disconnect the Connection in Developer or restart the Intelligence Server.

NOTE: You do not need to add the parameter if you are using a DSN-less connection or JDBC. EnableSession=1 is automatically added to your connection string, if it is not present during runtime.


Comment

0 comments

Details

Knowledge Article

Published:

January 18, 2023

Last Updated:

March 21, 2024