Categories:

System functions (System Control)

SYSTEM$CANCEL_ALL_QUERIES

取消指定会话中的所有活跃/正在运行的查询。

See also:

SYSTEM$CANCEL_QUERY

语法

SYSTEM$CANCEL_ALL_QUERIES( <session_id> )

实参

session_id

取消所有查询的会话标识符。要获取会话 ID,请以账户管理员(具有 ACCOUNTADMIN 角色的用户)身份登录网络界面,然后转到:

Account Account tab » Sessions

使用说明

  • A user can cancel their own running SQL operations using this SQL function. Canceling running operations executed by another user requires a role with one of the following privileges:

    • 执行操作用户的 OWNERSHIP。
    • 运行操作的仓库的 OPERATE 或 OWNERSHIP (如果适用)。

请注意,ACCOUNTADMIN 角色不一定被授予任何这些权限。

示例

SELECT SYSTEM$CANCEL_ALL_QUERIES(1065153872298);

+------------------------------------------+
| SYSTEM$CANCEL_ALL_QUERIES(1065153872298) |
%------------------------------------------%
| 1 cancelled.                             |
+------------------------------------------+

For a more detailed, working example, see Canceling Statements.