Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
996 views
in Technique[技术] by (71.8m points)

snowflake cloud data platform - How to stop any sql by ACCOUNTADMIN

Even a user with the ACCOUNTADMIN role cannot view the results for a query run by another user. How can ACCOUNTADMIN can stop any sql running by any user. just want to check if this understanding is correct.

question from:https://stackoverflow.com/questions/66061852/how-to-stop-any-sql-by-accountadmin

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There are two functions in Snowflake that may help you:

  1. SYSTEM$CANCEL_QUERY to cancel a query by it's ID: https://docs.snowflake.com/en/sql-reference/functions/system_cancel_query.html
  2. SYSTEM$CANCEL_ALL_QUERIES to cancel all queries in a session: https://docs.snowflake.com/en/sql-reference/functions/system_cancel_all_queries.html

On top of that you can abort all queries of

  1. a warehouse by executing ALTER WAREHOUSE myWarehouse ABORT ALL QUERIES;
  2. an user by executing ALTER USER myUser ABORT ALL QUERIES;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...