15.10 - IdentifyDatabase - Teradata Database

Teradata Database Application Programming Reference

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1090-151K

Returns the name of the specified database ID.

REPLACE FUNCTION SYSLIB.IdentifyDatabase
   (DatabaseId  INTEGER
   )
  RETURNS VARCHAR(128) CHARACTER SET UNICODE
          .
          .
          .
;
 

Parameter

Description

DatabaseId

Database ID.

The IdentifyDatabase function provides similar functionality to the PMPC IDENTIFY DATABASE request. For information about this interface, see “IDENTIFY” on page 68.

This function returns the name of the database.

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