Show TOC Start of Content Area

Process documentation Monitoring Database Tables with the Alert Monitor  Locate the document in its SAP Library structure

Purpose

You can monitor database tables in the alert monitor. To allow you to do this, SAP delivers methods that perform the following monitoring functions:

      You can investigate database tables for any entries. When doing so, you can specify comparison operations for a table column, which must be fulfilled to report an alert. If the monitoring architecture detects a match, you can choose whether the alert should have an alert with the color red, or a node with the color green.

      You can determine the size and number of entries for any database tables.

This data supplier extends the monitoring architecture in an important area, since vital information is often stored in database tables, but there is not a clear display of this information.

Process Flow

Monitoring Database Tables for Any Entries

To start the monitoring of the database tables, you must adjust the parameters of the relevant data collection methods. There are two methods with identical transfer parameters, but which display monitoring tree elements (MTEs) of different colors if the search conditions are fulfilled:

Method

Color of the MTE

CCMS_GEN_TAB_G

Green

CCMS_GEN_TAB_R

Red

You can use these two definitions as templates for your methods. Use CCMS_GEN_TAB_R if you want to monitor the database tables using alert tracing and observation; otherwise, use CCMS_GEN_TAB_G.

Adjusting the Parameters

...

       1.      Choose CCMS Configuration Alert Monitor, or call transaction RZ21.

       2.      The Monitoring: Properties and Methods screen appears. Select the Method Definitions radio button and choose Display Overview.

       3.      We recommend that you leave the delivered methods CCMS_GEN_TAB_G and CCMS_GEN_TAB_R unchanged. You should therefore copy a method to a new method by selecting the desired original method and choosing Copy (This graphic is explained in the accompanying text). Copy the original method for each table that you want to monitor.

       4.      The system displays the Monitoring: Methods screen. Start change mode by choosing the Display « Change (This graphic is explained in the accompanying text) button. Enter a suitable description for the method.

       5.      When you copy the method definition, the authorizations for the method are reset. Choose the Release tab page and in the Execute Method as group box, select Data Collection Method.

       6.      Choose the Parameters tab page. Use the transfer parameters displayed here to determine which table the method searches for and where (see also the example below):

Parameter Name

Meaning

TARGET_TABLE

Name of the table that is to be monitored; also the name for the monitoring object

FIELDNAME

Name of the table column that contains a description; the content of this column can be displayed in the alert monitor

FIELDVALUE

Name of the table column that is to be monitored

MAXROW

Maximum number of rows that are to be reported per run of the data supplier

WHERECLAUSE1

Condition that must be fulfilled for a table entry to be reported to the monitoring architecture; since a logical expression of this type can quickly exceed the maximum length of a parameter (40 characters), there are three parameters available to you that can be combined into one condition

The condition is a logical expression in ABAP syntax – therefore note the following:

      The condition itself must not contain any keywords (such as  WHERE, IF…).

      If you are checking for a character-type in the logical expression, place this value in single quotation marks (such as C='ERROR').

WHERECLAUSE2

WHERECLAUSE3

TOP_FULL_NAME

Monitoring segment in which the monitoring object is to be created; if you do not set this parameter, the object is only created in the Table Content Monitoring monitor

RESCANFROMBEGIN

Name of the column with a time stamp or other constantly growing content (such as a row number); if this value is set, only those rows whose entry in this column is greater than the last checked entry (so for a column with a time stamp, only the entries that did not yet exist at the last run are checked)

T100_MESS

Message class and number that are displayed for an alert; you can transfer the value of the columns <FIELDNAME> and <FIELDVALUE> into the message using transfer variable &1 and &2

7.       Choose the Control tab page. In the Execute Method group box, select either Periodically in background process (as job) or Periodically in dialog process (short-running program). In the latter case, the method is started significantly more often (every five minutes as opposed to every 60 minutes).

8.       In the Startup Method group box, select the Execute Method Immediately After Start of a Monitoring Segment indicator. If you have scheduled the method in the dialog process, you should select Only on the central instance as the execution location to limit the workload due to the method execution.

9.       Save your changes, and, if necessary, transport the method.

10.   Since the indicator Execute Method Immediately After Start of a Monitoring Segment is now selected on the Control tab page, the method is started for the first time and the nodes created by a restart of the segment. To restart the monitoring segment, select the Segment Overview radio button on the initial screen of transaction RZ21, Monitoring: Properties and Methods and choose the Display Overviewbutton.

The system displays the Monitoring: Display Technical Topology screen of the Topology Browser.. Start change mode by choosing the Display « Change (This graphic is explained in the accompanying text) button. Select the segment of the central instance (since the startup method is only executed there in accordance with the method definition), and choose Reset Segment to WARMUP Status.

Monitoring the Size and Number of Database Table Entries

To start the monitoring of the database tables, you need to adjust the parameters of the relevant data collection methods.

There is a standard method template, CCMS_TAB_DS_S. You can copy this, create your own collection methods, and adjust the parameter values.

Adjusting the Parameters

...

       1.      Choose CCMS Configuration Alert Monitor, or call transaction RZ21.

       2.      The Monitoring: Properties and Methods screen appears. Select the Method Definitions radio button and choose Display Overview.

       3.      We recommend that you leave the delivered method CCMS_TAB_DS_Sunchanged.  You should therefore copy a method to a new method, such as CCMS_TAB_DS_S_<target_table>, by selecting the desired original method and choosing the Copy (This graphic is explained in the accompanying text) button. Copy the original method for each table that you want to monitor.

       4.      The system displays the Monitoring: Methods screen. Start change mode by choosing the Display « Change (This graphic is explained in the accompanying text) button. Enter a suitable description for the method.

       5.      When you copy the method definition, the authorizations for the method are reset. Choose the Release tab page and in the Execute Method as group box, select Data Collection Method.

       6.      Choose the Parameters tab page. Use the transfer parameters displayed here to determine which table the method searches for and where (see also the example below):

Parameter Name

Meaning

TARGET_TABLE

Name of the table to be monitored

MTE_CLASS_NR

Optional parameter with which you can specify the name of the MTE class that you want to use for the node for the number of entries (by default, DB_Mon_target_table_num_rec)

MTE_CLASS_TS

Optional parameter with which you can specify the name of the MTE class that you want to use for the node for the table size (by default, DB_Mon_target_table_tab_size)

MAXROW

Optional parameter with which you can limit the maximum number of entries to be taken into account.

If the table has more entries than MAXROW, the rows over MAXROW are ignored for the MTEs table size and number of records. This ensures that the performance of the data collector remains acceptable even for very large tables.

Note that MAXROW should be equal to or larger than the threshold value for Yellow to Red. Otherwise, you will never receive a red alert.

CLIENT

Optional parameter with which you can restrict the monitoring to precisely one client.

       7.      Choose the Control tab page. In the Execute Method group box, select either Periodically in background process (as job) or, if you want to monitor a large database table, Periodically in dialog process (short-running program). In the latter case, the method is started significantly more often (every five minutes as opposed to every 60 minutes).

       8.      In the Startup Method group box, select the Execute Method Immediately After Start of a Monitoring Segment indicator. If you have scheduled the method in the dialog process, you should select Only on the central instance as the execution location to limit the workload due to the method execution.

       9.      Save your changes, and, if necessary, transport the method.

   10.      Since the indicator Execute Method Immediately After Start of a Monitoring Segment is now selected on the Control tab page, the method is started for the first time and the nodes created by a restart of the segment. To restart the monitoring segment, select the Segment Overview radio button on the initial screen of transaction RZ21, Monitoring: Properties and Methods and choose the Display Overviewbutton.

   11.      The system displays the Monitoring: Display Technical Topology screen of the Topology Browser.. Start change mode by choosing the Display « Change (This graphic is explained in the accompanying text) button. Select the segment of the central instance (since the startup method is only executed there in accordance with the method definition), and choose Reset Segment to WARMUP Status.

   12.      After the start, the monitoring tree elements with default customizing values (in particular, threshold values). You can change these MTE properties in the alert monitor in accordance with your requirements.

Result

After you have set up table monitoring by adjusting the method definition and starting the method, you can use the subtrees in the relevant monitors (by default, in the Table Content Monitoring monitor of the SAP CCMS Monitors for Optional Components) monitor set. The Database Monitoring subtree for monitoring database tables has the following structure (see also the example below):

This graphic is explained in the accompanying text

Example

In systems with the Oracle database, there is a table SDBAH, in which data backups are logged. The table contains the following columns, which are relevant for the monitoring:

Column

Meaning

OBJ

Object of the database operation

RC

Return code of the action; if RC > 1, the backup was terminated

ENDE

End of the database operation (time stamp)

All new terminations are to be reported.

You must therefore assign the following values to the parameters in the method definition:

Parameter

Value

TARGET_TABLE

SDBAH

FIELDNAME

OBJ

FIELDVALUE

RC

MAXROW

Any

WHERECLAUSE1

RC > '1'

WHERECLAUSE2

 

WHERECLAUSE3

 

TOP_FULL_NAME

 

RESCANFROMBEGIN

ENDE

T100_MESS

Any

 

 

End of Content Area