43451members
218006posts

Is it possible to use a sql query in ST Logic to access data in linked odbc table with 64bit driver?

Highlighted
Crewman

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?

6 REPLIES 6
Highlighted
Janeway

Re: Is it possible to use a sql query in ST Logic to access data in linked odbc table with 64bit driver?

What type of system are you asking about?

Highlighted
Crewman

Re: Is it possible to use a sql query in ST Logic to access data in linked odbc table with 64bit driver?

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

Highlighted
Crewman

Re: Is it possible to use a sql query in ST Logic to access data in linked odbc table with 64bit driver?

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?  

Highlighted
Commander

Re: Is it possible to use a sql query in ST Logic to access data in linked odbc table with 64bit driver?

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 (3)
Highlighted
Crewman

Re: Is it possible to use a sql query in ST Logic to access data in linked odbc table with 64bit driver?

Hi BevanWeiss,

 

Thanks for your recommendation!

Highlighted
Crewman

Re: Is it possible to use a sql query in ST Logic to access data in linked odbc table with 64bit driver?

Hi HowardF,

 

This was the trick!

Thanks for your solution!