16.10 - Example: Finding the Query Band for an Active Session - Teradata Database

Teradata Database Security Administration

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Administration
Security
featnum
B035-1100-161K

You can use the MonitorQueryBand function to find the query band for an active session.

 BTEQ -- Enter your DBC/SQL request or BTEQ command:
SELECT t1.sessionno, MonitorQueryBand(Hostid, sessionNo, runvprocno)
FROM TABLE (MonitorSession(1,'*',0)) AS t1;

SELECT t1.sessionno, MonitorQueryBand(Hostid, sessionNo, runvprocno)
FROM TABLE (MonitorSession(1,'*',0)) AS t1;

 *** Query completed. 2 rows found. 2 columns returned.
 *** Total elapsed time was 1 second.

  SessionNo MonitorQueryBand(HostId,SessionNo,RunVprocNo)
----------- ----------------------------------------------------
      1299
      1298 =S> REPJOBID=495;REPORT=Sales;CLIENTMACHINE=XYZ12;REPTYPE=10;