16.10 - Obtaining Session Information - Teradata Database

Teradata Database Administration

Product
Teradata Database
Release Number
16.10
Release Date
April 2018
Content Type
Administration
Publication ID
B035-1093-161K
Language
English (United States)

To find information about a session, for example CPU or I/O data for a specific session, try one of the following tools.

  • Teradata Viewpoint – Using Teradata Viewpoint, you can view information about queries running in a Teradata Database system so you can spot problem queries. You can analyze and decide whether a query is important, useful, and well-written.
  • PM/APIs – If you write your own application, use the MONITOR SESSION request or the MonitorSession function to collect current status and activity information for sessions that are logged on to Teradata Database. PM/APIs allow you to immediately access session information but you must have proper privileges to submit the requests or use the functions. For more information, see Application Programming Reference.
  • DBC.AmpUsage view and Account String Expansion (ASE) – Use ASE to generate 1 row into DBC.AmpUsage per AMP per session. Note that the AmpUsage rows are not written until the query completes. For more information on ASE, see Logging Resource Usage Data with Account String Variables.
  • DBC.SessionInfo view – Use this view to see the client interface that established the session, the logon date and time, and current role among other information. There is one row for each time a user is logged on.
  • DBQL information – You must have first already enabled logging by submitting the BEGIN QUERY LOGGING statement for the users/accounts/applications you wish to monitor.

For more information on this topic, see Determining the Account for a User Session.