SYSCS_UTIL.SYSCS_GET_RUNNING_OPERATIONS

The SYSCS_UTIL.SYSCS_GET_RUNNING_OPERATIONS system procedure displays a list of the operations running on the server to which you are currently connected.

You can use this procedure to find the UUID for an operation, which you can then use for purposes such as terminating an operation with the SYSCS_UTIL.SYSCS_KILL_OPERATION system procedure.

Syntax

SYSCS_UTIL.SYSCS_GET_RUNNING_OPERATIONS();

Results

The displayed results of calling SYSCS_UTIL.SYSCS_GET_RUNNING_OPERATIONS include these values:

Value Description
UUID The operation identifier. This is the same identifier that is shown in the Spark console.
USER The name of the database user.
HOSTNAME The host on which the server is running.
SESSION The session ID.
SQL The SQL statement that is running.
SUBMITTED The date and time that the operation was submitted.
ELAPSED Elapsed time since the operation began running.
ENGINE Which engine (SPARK or CONTROL) is running the operation.
JOBTYPE The operation type.

Example

splice> call SYSCS_UTIL.SYSCS_GET_RUNNING_OPERATIONS();

UUID USER HOSTNAME SESSION SQL SUBMITTED ELAPSED ENGINE JOBTYPE
34b0f479-be9a-4933-9b4d-900af218a19c SPLICE MacBook-Pro.local:1527 264 select * from sys.systables –splice-properties useSpark=true 2018-02-02 17:39:05 26 sec(s) SPARK Produce Result Set
4099f016-3c9d-4c62-8059-ff18d3b38a19 SPLICE MacBook-Pro.local:1527 4 call syscs_util.syscs_get_running_operations() 2018-02-02 17:39:31 0 sec(s) CONTROL Call Procedure
2 rows selected

splice> call SYSCS_UTIL.SYSCS_KILL_OPERATION('4099f016-3c9d-4c62-8059-ff18d3b38a19');
Statement executed.