OHDSI Home | Forums | Wiki | Github

Achilles SQL query 2004.sql fails on MSSQL 2016+

In MSSQL 2016, Achilles fails on analysis 2004 with the error: “The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query.”

One of our developers looked into it and found this article
https://www.mssqltips.com/sqlservertip/5279/sql-server-error-query-processor-ran-out-of-internal-resources-and-could-not-produce-a-query-plan/. If you break the SQL statement into 3 queries and UNION them, it appears to work. Just wanted to make everyone aware.

Jeff Klann

Hi Jeff, I am brand new to Achilles. I am having trouble getting it to run after successful connection to our Azure SQL Server:

connectionDetails ← createConnectionDetails(dbms = “sql server”,
server = “external-prod-hive-sql-server.database.windows.net”,
user = “ohdsi_user”,
password = “****************”)

achilles(connectionDetails = connectionDetails,
cdmDatabaseSchema = “OMOP”,
resultsDatabaseSchema = “RESULTS”,
outputFolder = “output”)

Error: unexpected input in “connectionDetails ← createConnectionDetails(dbms = “”

Any guidance you could provide would be greatly appreciated.

I think it’s your quotes, those are formatted (curly) quotes, not regular quotes, which is why you’ll see that error. Additionally, check to see your arrow isn’t formatted. Here’s the code you can copy and paste (replacing password, etc).

connectionDetails <- createConnectionDetails(dbms = "sql server",
                                            server = "external-prod-hive-sql-server.database.windows.net",
                                            user = "ohdsi_user",
                                            password = "****************")
1 Like