3

We have SAS application that connects to snowflake via ODBC 2.23.0. Whenever a user abort query from SAS it keeps on running on Snowflake.

We have tried setting ABORT_DETACHED_QUERY= TRUE at user level, but the query is not aborted after 5 mins. Have to manually abort the query after 15 mins it was aborted by user via SAS (user confirmed that he has exited the app after aborting the query)

Can someoe help me understand how to debug this issue to avoid long running aborted queries on snowfalke. (i know hwo to set criteria to abort long running queries, but i am looking for aborting such cases as descrbed above). Thanks in advance.

2 Answers2

0

That's pretty common behavior from SAS with basically any DBMS, so this doesn't totally surprise me. I don't think there's anything more you can really do, unless ABORT_DETACHED_QUERY=TRUE should actually work but doesn't due to a bug. As such, the only real solution here is to submit this to open a track with SAS and see if they can tell you anything.

Otherwise, do you have an administrator of the Snowflake system? Can they perhaps abort your query? That's the usual solution on non-cloud systems, anyway.

Joe
  • 62,789
  • 6
  • 49
  • 67
  • that's what we are doing currently, but the issue here is such queries go unaccounted & keeps consuming credits on Snowflake which is not optimal. I will definately raise a case with SAS & Snwoflake to try & reoslve this. – rohit singh Jan 04 '22 at 09:02
0

Consider setting STATEMENT_TIMEOUT_IN_SECONDS at an appropriate level.

Jeffrey Jacobs
  • 302
  • 1
  • 4