SYMPTOM:
After upgrading to Strategy 9.x or 10.x, users get the following error message when running some reports:
Sample Code/Error
QueryEngine encountered error: The generated SQL string (xxxxx bytes) is longer than limitation of this ODBC driver (65536 bytes). Error in Process method of Component: QueryEngineServer, Project 0, Job 3433, Error Code= -2147212544.
CAUSE:
One of the reasons for this error is that the default value in Strategy 9 for "SQL Global Optimization" VLDB property is set to Level 4 which makes the SQL pass longer in some cases. Strategy Intelligence Server is configured to only allow 65536 bytes of Structured Query Language (SQL) per pass.
In Strategy 8.1.2, this VLDB property is set to Level 0.
ACTION:
Strategy recommends customers to leverage these SQL optimizations by default. If it is not possible to optimize the report to reduce the size of SQL, set back the VLDB property to the value defined in Strategy 8.x.
This property can be found in "Project Configuration" > "Database instances" > "VLDB Properties" > "Query optimizations".