Obtaining Session Information - Teradata Database

Teradata Database Administration

Teradata Database
Release Number
English (United States)
Last Update
Product Category

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 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” on page 160.
  • 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, see “SQL Logging Statements” on page 264.