- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 02:30 AM . Last Modified: 2023-05-03 12:18 AM
Is it possible to use a sql query in ST Logic to access data in linked odbc table with 64bit driver?
When I execute a ST Logic with a sql query to a linked odbc table with a 64bit driver, I get the following program error:
QP Error - Cannot suspend Database Write Lock lock while caching the results of SQL queries for OnUpdate execution
How can I fix this error?
Link copied. Please paste this link to share this article on your social media post.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 03:46 PM
I can see one similar issue raised before, and on that occasion it was resolved by 'adding the NOCACHE attribute to the VAR ... END_VAR block that contains the query.'. Is NOCACHE defined?
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 03:45 AM
What type of system are you asking about?
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 04:06 AM
OS: Windows Server 2016 (64bit)
ClearScada: CS2017 R3
ODBC DSN: 64bit
When I run the query in an eventwindow or mimic script I get the data (no error),
when I try to execute a ST Logic with the same query I get the error
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 03:46 PM
I can see one similar issue raised before, and on that occasion it was resolved by 'adding the NOCACHE attribute to the VAR ... END_VAR block that contains the query.'. Is NOCACHE defined?
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 04:12 PM
Using an Linked ODBC Table in an ST query is a really bad idea. I would recommend that you try to look at an alternative method of getting this data into your ClearSCADA system if at all possible.
The additional performance (and availability) issues around the Linked ODBC table will result in issues with Database Locks which will affect your entire ClearSCADA system.
You could possibly do a push from an SSIS package or similar (if using MSSQL) into a ClearSCADA DataTable, so that the ST SQL query is referencing a native ClearSCADA Table.
Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
- Tags:
- Linked Tables
- sql
- ST
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 10:55 PM
Hi BevanWeiss,
Thanks for your recommendation!
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-05 10:58 PM
Hi HowardF,
This was the trick!
Thanks for your solution!
Link copied. Please paste this link to share this article on your social media post.