STATEMENTS

<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide > Basic Building Blocks > Functions > Built-in Functions > General Management Functions >

STATEMENTS

Previous pageReturn to chapter overviewNext page

Populates a table of information on currently executing statements.

Returns table

Field

Type

id

bigint

session_id

bigint

sql_stmt

varchar(1024)

create_time

timestamp

parameters

varchar(1024)

Syntax

SELECT * FROM TABLE(SYS_BOOT.MGMT.STATEMENTS());

 

5_2_indicator

Version 5.2 Feature

As of version 5.2, you no longer need to use the preface SYS_BOOT.MGMT.

Example

SELECT * FROM TABLE(SYS_BOOT.MGMT.STATEMENTS());

'ID','SESSION_ID','SQL_STMT','CREATE_TIME','PARAMETERS'

'4','3','INSERT INTO "SYS_BOOT"."MGMT"."ALL_TRACE"

(SELECT STREAM "EXPR$0"."ERROR_TIME", "EXPR$0"."ERROR_LEVEL", "EXPR$0"."IS_ERROR", "EXPR$0"."ERROR_CLASS", "EXPR$0"."ERROR_NAME", "EXPR$0"."SQL_STATE", "EXPR$0"."MESSAGE", "EXPR$0"."THREAD_ID", "EXPR$0"."SESSION_ID", "EXPR$0"."STATEMENT_ID", "EXPR$0"."GRAPH_ID", "EXPR$0"."NODE_ID", "EXPR$0"."XO_NAME", "EXPR$0"."ERROR_REPORTER", "EXPR$0"."ERROR_SQL", "EXPR$0"."ERROR_BACKTRACE", "EXPR$0"."DATA_ROWTIME", "EXPR$0"."DATA_ROW", "EXPR$0"."SOURCE_POSITION_KEY", "EXPR$0"."PUMP_DB", "EXPR$0"."PUMP_SCHEMA", "EXPR$0"."PUMP_NAME"

FROM STREAM(SPECIFIC "SYS_BOOT"."MGMT"."NAMEDERRORSTREAM"('GLOBAL_ERROR_STREAM')) AS "EXPR$0")','2017-01-26 22:58:55.908','[[]]'

'48082','5','SELECT STREAM ROWTIME,* FROM "SYS_BOOT"."MGMT"."ALL_TRACE"','2017-03-02 18:46:10.65','[[]]'

'48085','5','SELECT STREAM ROWTIME,* FROM "StreamLab_Output_Buses"."guide_1_out"','2017-03-02 18:46:11.944','[[]]'

'48088','28367','select stream * from "StreamLab_Output_Buses"."guide_1_out"','2017-03-02 18:59:11.682','[[]]'

'48091','48089','SELECT * FROM TABLE(SYS_BOOT.MGMT.STATEMENTS())','2017-03-02 19:03:45.441','[[]]'