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

Application Programming Reference

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
cpn1571792172880.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1090
lifecycle
previous
Product Category
Teradata Vantageā„¢

Purpose

Returns the name of the specified user ID who is causing a block.

Definition

REPLACE FUNCTION SYSLIB.IdentifyUser
  (UserId  INTEGER
  )
 RETURNS VARCHAR(128) CHARACTER SET UNICODE
          .
          .
          .
;

Input Parameter

Parameter Description
UserId ID of the user who is causing the block.

Usage Notes - IdentifyUser

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

Return Value

This function returns the name of the user.

Example: Using IdentifyUser

SELECT IdentifyUser(blk1userid) as "blocking user",
    IdentifyTable(blk1objtid) as "blocking table",
    IdentifyDatabase(blk1objdbid) as "blocking db"
FROM TABLE (MonitorSession(-1,'*',0)) AS t1
WHERE Blk1UserId > 0;
 *** Query completed. One row found. 3 columns returned.
 *** Total elapsed time was 4 seconds.
blocking user               blocking table          blocking db
--------------------------- ----------------------- -------------
user1                       skewAmp1                DBaaa