IdentifySession Function | Application Programming Reference | Teradata Vantage - IdentifySession - Advanced SQL Engine - Teradata Database

Application Programming Reference

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
hvk1593628831140.ditamap
dita:ditavalPath
hvk1593628831140.ditaval
dita:id
B035-1090
lifecycle
previous
Product Category
Teradata Vantageā„¢

Returns the name of the user, by session, who is causing a block.

Syntax

REPLACE FUNCTION SYSLIB.IdentifySession (
  HostId INTEGER,
  SessionNo INTEGER
) RETURNS VARCHAR(128) CHARACTER SET UNICODE
  ... 
;

Syntax Elements

HostId
ID of the blocking host.
SessionNo
Number of the session that is blocked.

Usage Notes

The IdentifySession function provides similar functionality to the PMPC IDENTIFY SESSION request. For information about this interface, see IDENTIFY.

Example: Using IdentifySession

SELECT IdentifySession(blk1Hostid,blk1sessno)
FROM TABLE (MonitorSession(-1,'*',0)) AS t1
WHERE Blk1UserId > 0;
 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 1 second.
IdentifySession(Blk1HostId,Blk1SessNo)
--------------------------------------
USER1