IdentifySession - Teradata Database - Teradata Vantage NewSQL Engine

Application Programming Reference

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-02
dita:mapPath
vwf1492987142269.ditamap
dita:ditavalPath
changebar_rev_16_20_exclude_audience_ie.ditaval
dita:id
B035-1090
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

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

Definition

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

Input Parameters

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

Usage Notes - IdentifySession

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

Return Value

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

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