- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Connector reply error: Executing non-SELECT queries is disabled. Please contact your system administrator to enable it.
Aug 20, 2024 5:31:05 AM
Feb 14, 2019 7:52:59 AM
Qlik ODBC connector package (database connector built-in Qlik Sense) fails to reload with error Connector reply error:
Executing non-SELECT queries is disabled. Please contact your system administrator to enable it.
The issue is observed when the query following SQL keyword is not SELECT, but another statement like INSERT, UPDATE, WITH .. AS or stored procedure call.
Environment:
- Qlik Sense Enterprise on Windows
- Qlik Sense Desktop
- QlikView Server
- QlikView Desktop
Cause
See the Qlik Sense February 2019 Release Notes for details on item QVXODBC-1406.
Resolution
By default, non-SELECT queries are disabled in the Qlik ODBC Connector Package and users will get an error message indicating this if the query is present in the load script. In order to enable non-SELECT queries, allow-nonselect-queries setting should be set to True by the Qlik administrator.
To enable non-SELECT queries:
- Modify the QvOdbcConnectorPackage.exe.config found in the locations mentioned below.
Set the parameter allow-nonselect-queries to True
This is case-sensitive. true will not work.
In a multi node environment, the changes need to be applied to all nodes.
Configuration file QvOdbcConnectorPackage.exe.config locations:
- Qlik Sense Enterprise: C:\Program Files\Common Files\Qlik\Custom Data\QvOdbcConnectorPackage
- Qlik Sense Desktop: C:\Users\user-name\AppData\Local\Programs\Common Files\Qlik\Custom Data\QvOdbcConnectorPackage
- QlikView: C:\Program Files\Common Files\QlikTech\Custom Data\QvOdbcConnectorPackage
As we are modifying the configuration files, these files will be overwritten during an upgrade and will need to be made again.
- Non-select statements are now enabled and generally this is sufficient to resolve the issue.
If, however, you need to run SQL statements without any data table returned (INSERT/ UPDATE/ DELETE/ DROP), you can optionally add the keyword !EXECUTE_NON_SELECT_QUERY at the end of the query. Other queries that return data (such as WITH ... AS in PostgreSQL) do not need this keyword.
The EXECUTE_NON_SELECT_QUERY signals to the script processing engine that the query may not return any data.
Only apply !EXECUTE_NON_SELECT_QUERY if you use the default connector settings (such as bulk reader enabled and reading strategy "connector"). Applying !EXECUTE_NON_SELECT_QUERY to non-default settings may lead to unexpected reload results and/or error messages.
More details are documented in the Qlik ODBC Connector package help site.
Related Content:
Feature Request Delivered: Executing non-SELECT queries with Qlik Sense Business
Execute SQL Set statements or Non Select Queries
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
In a QlikCloud Enviromento what is the procedure?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @langelwong - in Qlik Sense SaaS editions, this is currently not possible. We have an active improvement request logged for it, and I would recommend lending your voice (your like/vote) to this idea in our ideas exchange: Executing non-SELECT queries with Qlik Sense Business .
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi ! I receive the following error when trying to insert data into a temp table with a SQL connector:
Is there a workaround for this ?
Some people have suggested using a OLE DB connector instead of an SQL one or dowgrading the ODBC Package version but I was wondering if there was a proper solution for SQL connectors.
Thanks !
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I think this setting gets erased/changed back to default after a patch install.... we have had to re-do this several times after patch installs. If you guys can confirm this is true, it would be a good add to the docs here.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi, @Sonja_Bauernfeind. It would be great to put the same note about combining !EXECUTE_NON_SELECT_QUERY and non-standard settings on this other article: https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Reloads-failing-with-error-quot-G...
I added a comment there as well.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @cjgorrin Working on it! Thank you!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
"Qlik Sense Enterprise SaaS" is listed as an environment, but the solution seems to apply only to on-premise instances. What is the solution for Qlik Sense Enterprise SaaS?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @astroffolino Does this help? Enabling non-SELECT queries on Qlik Sense SaaS
All the best,
Sonja
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is a bad solution to preventing, by default, people doing INSERT, UPDATE, etc. type SQL statements as it precludes the use of Common Table Expressions (CTEs) as well which are vital to more advanced queries. Rather than Allow Only SELECT, it should have been implemented to Exclude Specific "destructive" statements. And, the checkbox was not implemented at all for Qliksense Desktop.
Luckily, for those who need CTEs and do their core development in the Desktop client there is a workaround, albeit not optimal. By wrapping your CTE-laden queries with `SELECT * FROM ()` the Data Load Editor does not see the non-SELECT part and executes "properly".