Example: Using MonitorSQLTextSV with Default Query
This query requests the SQL text of the current SQL step for this session from the specified host.
SELECT * from MonitorSQLTextSV(
USING
HostIdIn('10001')
SessionNoIn('1007')
RunVProcNo('30719')
) AS dt;
The output is similar to this.
HostId 10001 SessionNo 1007 SeqNum 1 SQLTxt SELECT t2.* from table (MonitorSQLText(1, 1007, 30719)) as t2;
Example: Using MonitorSQLTextSV with Detailed View Query
The detailed view adds Type, Id, Name, and Group columns to identify the source of these metrics.
SELECT * from MonitorSQLTextSV(
USING
HostIdIn('10001')
SessionNoIn('1007')
RunVProcNo('30719')
details('1')
) AS dt;
The output is similar to this.
HostId 10001
SessionNo 1007
SeqNum 1
SQLTxt SELECT t2.* from table (MonitorSQLText(1, 1007, 30719)) as t2;
ParentSessionNo 2016
Type compute cluster
Id sys-784f2c302a_pog_784f2c1087_group_1_cog_1_0b1osq
Name 1-0b1osq
Group pog_784f2c1087_group_1