MONITOR VERSION Request | Application Programming Reference | Teradata Vantage - MONITOR VERSION - 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

Identifies the highest version number (MonVerId) the database monitor function supports, which determines the requests and data fields available for use.

Input Data

Element Data Type Description
IndByte BYTE Indicator bits that specify which fields to treat as NULL if you are using indicator mode.

Each bit in the byte corresponds to one field in the input data.

If data is supplied for that field, set the bit to zero.

If the data for that field is NULL (that is, there is no data supplied for that field), set the bit to 1.

The IndByte field is only required if the CLIv2 request is submitted in indicator mode.
mon_ver_id SMALLINT

NOT NULL

MONITOR software version ID. This can be version 3 or later.

Usage Notes - MONITOR VERSION

The MONITOR VERSION request does not check for access privileges.

CLIv2 Response Parcels

The MONITOR VERSION request is treated internally as a one-statement request that generates one response. The statement response returned from the database contains the following sequence of parcel types:

Parcel Sequence Parcel Flavor Length

(Bytes)

Comments/Key Parcel Body Fields
Success 8 18 to 273 StatementNo = 1

ActivityCount = Highest supported version

ActivityType = 108 (PCLMONVER)

DataInfo 71 6 to 64100 Optional; this parcel is present if request was IndicData parcel.
Record 10
  • 5 to 64100(record mode)
  • 6 to 64100(indicator mode)
Depending on request (Data or IndicData), data is in record or indicator mode. This record contains a 2-byte bitmap field indicating the supported functions and the current version number.
EndStatement 11 6 StatementNo = 2-byte integer
EndRequest 12 4 None

For more information on parcel body fields, see Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems, B035-2417 or Teradata® Call-Level Interface Version 2 Reference for Workstation-Attached Systems, B035-2418.

Response

The statement described below corresponds to a ResultSet returned by the Teradata JDBC Driver, and each of the fields correspond to a ResultSet column returned by the Teradata JDBC Driver. For more information on ResultSets, see Teradata JDBC Driver Reference, available at https://teradata-docs.s3.amazonaws.com/doc/connectivity/jdbc/reference/current/frameset.html .

The statement response results in a Record parcel containing:

Field/Column Name Data Type Description
FunctionBitmap SMALLINT

NOT NULL

Functions are:
  • Bit0 = ModifyAccount
  • Bit1 = Monitor SQL
  • Bit2 = 15 - Set to zero (This bit is not currently used.)
The bits are 1 if supported and 0 if not.
CurrentVersion SMALLINT

NOT NULL

Current monitor version number.
If you are using MONITOR software version ID (mon_ver_id) 8 or earlier, this output parameter is not available. For more information, see Impact of Object Name Length on PM/API Requests.

Sample Input - CLIv2 Request

This example shows how the parcels for a MONITOR VERSION request, built by CLIv2, appear when sent to the database server. In this example, the size of the response buffer is set at the maximum (64,000 bytes), although you can set it to any size. However, a minimum response size is 32,000 bytes.

Flavor Length Body
Num Name Bytes Field Value
0001 Req 19 Request MONITOR VERSION
0003 Data 8 MonVerID 12
0004 Resp 6 BufferSize 64000

Sample Input - Teradata JDBC Driver Request

For an example of how the PM/API request, built in Java, appears when sent to the database server, see Teradata JDBC Driver Reference, available at https://teradata-docs.s3.amazonaws.com/doc/connectivity/jdbc/reference/current/frameset.html .

Sample Output

This example shows the values returned in character text format for the MONITOR VERSION request. Your application program may display returned values in a different format.

SUCCESS parcel:
StatementNo=1,    ActivityCount=1,
ActivityType=111, FieldCount=2
MONITOR VERSION:
Function bitmap: 3, Current monitor version=12