IBM Books

API Reference

SQLMA

The SQL Monitor Area (SQLMA) structure is used to send database monitor snapshot requests to the database manager. It is also used to estimate the size (in bytes) of the snapshot output.

Table 49. Fields in the SQLMA Structure
Field Name Data Type Description
OBJ_NUM INTEGER Number of objects to be monitored.
OBJ_VAR Array An array of sqlm_obj_struct structures containing descriptions of objects to be monitored. The length of the array is determined by OBJ_NUM.

Table 50. Fields in the SQLM-OBJ-STRUCT Structure
Field Name Data Type Description
AGENT_ID INTEGER The application handle of the application to be monitored. Specified only if OBJ_TYPE requires an agent_id (application handle).
OBJ_TYPE INTEGER The type of object to be monitored.
OBJECT CHAR(36) The name of the object to be monitored. Specified only if OBJ_TYPE requires a name, such as appl_id, or a database alias.

Valid values for OBJ_TYPE (defined in sqlmon) are:

SQLMA_DB2
DB2 related information
SQLMA_DBASE
Database related information
SQLMA_APPL
Application information organized by the application ID
SQLMA_AGENT_ID
Application information organized by the agent ID
SQLMA_DBASE_TABLES
Table information for a database
SQLMA_DBASE_APPLS
Application information for a database
SQLMA_DBASE_APPLINFO
Summary application information for a database
SQLMA_DBASE_LOCKS
Locking information for a database
SQLMA_DBASE_ALL
Database information for all active databases in the database manager
SQLMA_APPL_ALL
Application information for all active applications in the database manager
SQLMA_APPLINFO_ALL
Summary application information for all active applications in the database manager
SQLMA_DCS_APPLINFO_ALL
Database Connection Services application information summary for all active applications in the database manager.

For information about programming the database monitor, see the System Monitor Guide and Reference.

Language Syntax

C Structure



/* File: sqlmon.h */
/* Structure: SQLMA */
/* ... */
typedef struct sqlma
{
  unsigned long obj_num;
  sqlm_obj_struct obj_var[1];
}sqlma;
/* ... */



/* File: sqlmon.h */
/* Structure: SQLM-OBJ-STRUCT */
/* ... */
typedef struct sqlm_obj_struct
{
  unsigned long agent_id;
  unsigned long obj_type;
  _SQLOLDCHAR   object[SQLM_OBJECT_SZ];
}sqlm_obj_struct;
/* ... */

COBOL Structure



* File: sqlmonct.cbl
01 SQLMA.
    05 OBJ-NUM                 PIC 9(9) COMP-5.
    05 OBJ-VAR OCCURS 0 TO 100 TIMES DEPENDING ON OBJ-NUM.
        10 AGENT-ID             PIC 9(9) COMP-5.
        10 OBJ-TYPE             PIC 9(9) COMP-5.
        10 OBJECT               PIC X(36).
*


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]