Oracle® Enterprise Manager

IBM DB2 Database Plug-in User's Guide

Release 13.1.0.1

E65775-01

December 2015

Oracle Enterprise Manager IBM DB2 Database Plug-in User's Guide, Release 13.1.0.1

E65775-01

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.

Contents

Preface

- Audience

- Documentation Accessibility

- Related Documents

- Conventions

- What's Changed

1 IBM DB2 Database Plug-in Overview and Prerequisites

- 1.1 IBM DB2 Database Plug-in Overview and Feature Summary

- 1.2 What's New in this Release

- 1.2.1 Currency Support Updates

- 1.2.2 Updated User Interface

- 1.2.3 IBM DB2 Out-of-the-Box Monitoring Templates

- 1.2.4 IBM DB2 Metric Thresholds

- 1.2.5 Business Intelligence Publisher Reports

- 1.3 Platforms Supported

- 1.4 Supported Versions

- 1.5 Prerequisites

- 1.6 Setting Up the JDBC Driver

- 1.7 Deploying the Plug-in

- 1.8 Upgrading the Plug-in

- 1.9 Undeploying the Plug-in

2 Configuring the IBM DB2 Database Plug-in

- 2.1 Configure the Management Agent to Deploy the Plug-In

- 2.1.1 Assigning Advanced Privileges to User

- 2.1.2 Setting and Validating Preferred Credentials

- 2.2 Using a Suitable Operating System User and Assigning Authorities and Privileges

- 2.3 Configuring IBM DB2 for Health Indicator Metrics and Database Monitoring Metrics

- 2.3.1 Configurations Required for Health Indicator Metrics

- 2.3.2 Configurations Required for Avoiding Metric Collection Errors for Database Monitoring Metrics

- 2.3.3 Configurations Required for Statement Monitoring

- 2.3.4 Configurations Required for Lock and Lock Waits Monitoring

- 2.3.5 Configurations Required for Database Collection Health Indicator Metric

3 Discovering the IBM DB2 Database Target

- 3.1 Adding Instances for Monitoring

- 3.2 Verifying and Validating the Plug-in

4 Creating and Editing Jobs

5 IBM DB2 Database Plug-in Metrics and Reports

- 5.1 Generating a New Report From Out-of-the-Box Reports

- 5.2 Deploying Reports After BI Publisher is Configured

- 5.3 Using the IBM DB2 Plug-in Monitoring Templates

6 Inventory and Usage Details

- 6.1 Inventory and Usage Details Page Feature Summary

- 6.2 Accessing the Inventory and Usage Details Page

- 6.3 Additional Information

Index

Preface

This document provides a description about the Oracle System Monitoring plug-in for IBM DB2 Database, details on the versions the plug-in supports, prerequisites for installing the plug-in, and step-by-step instructions on how to download, install, verify, and validate the plug-in.

Audience

This document is intended systems and database administrators tasked with monitoring IBM DB2 Database through Enterprise Manager Cloud Control.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Related Documents

For information about the troubleshooting scenarios that you might encounter while working with the System Monitoring plug-ins, see the Oracle® Enterprise Manager System Monitoring Plug-in Troubleshooting Guide for Third-Party Database Plug-ins:

http://docs.oracle.com/cd/E24628_01/em.121/e35212/toc.htm

For a complete list of all the metrics contained in this plug-in, see the Oracle Enterprise Metric Guide:

http://docs.oracle.com/cd/E24628_01/em.121/e51915/toc.htm

Conventions

The following text conventions are used in this document:

Convention

Meaning

boldface

Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.

italic

Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.

monospace

Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

What's Changed

This table provides a brief overview of the document changes for the latest publication of the Oracle Enterprise Manager IBM DB2 Database Plug-in User's Guide:

Part Number

Change Summary

E65775-01

Initial release in support of Enterprise Manager Cloud Control 13c.

1 IBM DB2 Database Plug-in Overview and Prerequisites

This chapter describes the system monitoring plug-in for IBM DB2 Database and provides a list of available features. Review the summary of prerequisites required before configuring IBM DB2 Database for monitoring by Enterprise Manager Cloud Control.

The following topics are provided:

- IBM DB2 Database Plug-in Overview and Feature Summary

- What's New in this Release

- Platforms Supported

- Supported Versions

- Prerequisites

- Setting Up the JDBC Driver

- Deploying the Plug-in

- Upgrading the Plug-in

- Undeploying the Plug-in

1.1 IBM DB2 Database Plug-in Overview and Feature Summary

The System Monitoring Plug-in for IBM DB2 Database extends Oracle Enterprise Manager Cloud Control to add support for managing IBM DB2 Universal Database (UDB) for Linux, UNIX, and Windows (LUW) database instances. By deploying the plug-in in your Cloud Control environment, you gain the following management features:

- Monitor DB2 Database instances.

- Gather configuration data and track configuration changes for DB2 database instances.

- Raise alerts and violations based on thresholds set on monitored targets and configuration data.

- Provide rich, out-of-box reports based on the gathered data.

- Support monitoring by a remote Agent. Local Agent is an agent running on the same host as the DB2 database. Remote Agent is an agent running on a host that is different from the host where DB2 database is running.

- Collect and display top SQL statements and their related statistics, including CPU Time and Execution Count, of your IBM DB2 Database.

- Collect and display information regarding the top Lock Wait Events in IBM DB2, including top Wait Count by Table and top Wait Times.

- Utilization of Cloud Control jobs to start and stop the IBM DB2 database. These jobs are not only accessible from the Cloud Control Jobs Library but also from the IBM DB2 plug-in's UI home page.

- Expose vital IBM DB2 Database metrics in the form of easy-to-use charts and tables.

1.2 What's New in this Release

This release of the IBM DB2 Database plug-in for Oracle Enterprise Cloud Control 13c includes many new features for better visibility into your IBM DB2 environment. Highlighted below are some of the new features included in this release:

- Currency Support Updates

- Updated User Interface

- IBM DB2 Out-of-the-Box Monitoring Templates

- IBM DB2 Metric Thresholds

- Business Intelligence Publisher Reports

1.2.1 Currency Support Updates

The IBM DB2 Database plug-in for Oracle Enterprise Manager Cloud Control 13c has been updated to be current with the latest release of IBM DB2 Databases. This includes the added support for IBM DB2 9.7, 10.0, and 10.5.

IBM DB2's High Availability Disaster Recovery (HADR) functionality allows for currency support with the addition of monitoring metrics.

1.2.2 Updated User Interface

The user interface has been updated to add a Performance page and add a new link to the Home page.

The Home page (Figure 1-1) has been enhanced with the addition of a link in the Summary section to the Performance page. This has enabled more efficient navigation throughout the plug-in.

Figure 1-1 IBM DB2 Target Home Page

The all-new Performance page (Figure 1-2) has been added to the plug-in to give greater insight into the monitored IBM DB2 key performance indicators (KPI's) over a selectable time range. This includes Cache and Connection KPI's, Storage and IO KPI's and SQL Execution KPI's.

Figure 1-2 IBM DB2 Performance Page

1.2.3 IBM DB2 Out-of-the-Box Monitoring Templates

This release adds three out-of-the-box monitoring templates (Figure 1-3) to streamline configuration of your IBM DB2 Database. This includes Basic, I/O and Lock monitoring templates that you can use depending on your needs.

Figure 1-3 IBM DB2 Plug-in Monitoring Templates

1.2.4 IBM DB2 Metric Thresholds

Also, this release enables additional metric thresholds (Figure 1-4) to increase user control of your IBM DB2 Database. This includes thresholds for Agent Monitoring, Database Monitoring, Lock Waits, Database Health metrics, and many more.

Figure 1-4 IBM DB2 Plug-in Metric Thresholds

1.2.5 Business Intelligence Publisher Reports

In this release Information Publisher Reports included in the previous release of the IBM DB2 Plug-in have been migrated to BI Publisher Reports. BI Publisher Reports eliminate complexity and simplify report development and maintenance.

See IBM DB2 Database Plug-in Metrics and Reports for more information on using these reports.

1.3 Platforms Supported

The plug-in supports monitoring of IBM DB2 Universal Database (LUW) on all the platforms where IBM DB2 Universal Database can be installed.

1.4 Supported Versions

The IBM DB2 Database plug-in supports the following versions of products:

- Enterprise Manager Cloud Control 13c:

- The plug-in is certified for the latest release of Oracle Enterprise Manager Cloud Control 13c Release 5 (13.1.0.1.) (Oracle Management Server (OMS) and Oracle Management Agent).

- Version 9.1, 9.5, 9.7, 10.1, and 10.5 of single-partition IBM DB2 Universal Database (UDB) for Linux, UNIX, and Windows (LUW).

- IBM DB2 configured for High Availability and Disaster Recovery (HADR).

1.5 Prerequisites

The following prerequisites must be met before you can use the plug-in:

1. Install the following:

- Enterprise Manager Cloud Control 13c (13.1.0.1) or higher (Oracle Management Service and Oracle Management Agent).

- Install the Inventory and Usage Patch (20692416), available from My Oracle Support (https://support.oracle.com).

- IBM DB2 Universal JDBC Type 4 driver for IBM DB2 Database (see Setting Up the JDBC Driver)

- IBM DB2 Universal Database

2. Create a suitable operating system user to access the table functions used in IBM DB2. For information about creating a user, see Using a Suitable Operating System User and Assigning Authorities and Privileges.

3. To avoid metric collection errors for Database Monitoring metrics, create the table STMG_DBSIZE_INFO. For more information, see Configurations Required for Avoiding Metric Collection Errors for Database Monitoring Metrics.

4. To configure your Management Agent to generate alerts using the IBM DB2 Diagnostic Log file (db2diag.log), then do the following:

- Define your match patterns in the Diag_log_file_match_pattern_file.txt file that is present in $ORACLE_HOME/plugins/oracle.em.sidb/scripts/emx/ibm_db2_database/.

- Define your ignore patterns in the Diag_log_file_no_match_pattern_file.txt file that is present in $ORACLE_HOME/plugins/oracle.em.sidb/scripts/emx/ibm_db2_database/.

- Set the DIAG_PATH configuration parameter of the database manager (instance) to correspond to the monitored IBM DB2 database.

- For performance reasons, you should set a maximum diagnostic log file size of 100 MB when this metric is enabled. You can set the maximum file size using the command:

db2 update dbm cfg using diagsize 100

Based on the patterns defined in the two files, the System Monitoring Plug-in for IBM DB2 parses the Diagnostic Log file and generates alerts for the satisfied conditions. First, the plug-in validates the two files to see if any patterns are defined. If no patterns are defined, then the plug-in does not parse the Diagnostic Log file. If matching patterns are not defined, but ignore patterns are defined, then the plug-in parses every entry in the Diagnostic Log file and checks if ignore patterns are satisfied. If matching patterns are also defined, then the plug-in first parses only those entries that satisfy the matching patterns, and then for those satisfied entries, the plug-in checks if ignore patterns are satisfied.

Also, if multiple log entries having the same function name are encountered in a collection, then only one alert is generated to represent the function name. This alert is based on the last log entry with a common function name, present in the Diagnostic Log file.

Note:
This feature is supported only for local monitoring, that is, when the IBM DB2 database on a host is monitored by an Oracle Management Agent that is running on the same host.

5. In the IBM DB2 Database SQL Statement Performance and IBM DB2 Database Applications Lock Performance reports and the Agent Monitoring metric, in order to see the SQL statement text along with the application name, enable the instance configuration parameter DFT_MON_STMT. Otherwise, you may not see any data in the column.

6. As part of JDBC URL, either IP Address or host name can be provided. Ensure that the host name can be resolved consistently on the network. Standard TCP tools such as "nslookup" and "traceroute" can be used to verify the host name. Validate using the following commands on Management Agent where plug-in is deployed:

- nslookup <host name>
This returns the IP address and fully qualified host name.

- nslookup <IP>
This returns the IP address and fully qualified host name.

1.6 Setting Up the JDBC Driver

The JDBC driver is available from IBM, and consists of the following files that the Agent must be able to access:

- db2jcc.jar

- db2jcc_license_cu.jar

To set up the AGENT_BASE_DIR directory for the IBM DB2 Universal Type 4 JDBC driver:

1. If it does not already exist, create the directory $AGENT_BASE_DIR/plugins/dependencies/oracle.em.sidb/jdbcdriver/.

2. Copy the three JDBC driver files into the directory $AGENT_BASE_DIR/plugins/dependencies/oracle.em.sidb/jdbcdriver/.

Note:
If you do not have access to or cannot find your db2jcc.jar driver, you can download a copy of it from IBM's support site:

http://www-01.ibm.com/support/docview.wss?uid=swg21363866

1.7 Deploying the Plug-in

You can deploy the plug-in to an Oracle Management Service instance using the Enterprise Manager Cloud Control console, or using the Enterprise Manager Command-Line Interface (EMCLI). While the console enables you to deploy one plug-in at a time, the command line interface mode enables you to deploy multiple plug-ins at a time, thus saving plug-in deployment time and downtime, if applicable.

See the Managing Plug-ins chapter in the Oracle Enterprise Manager Cloud Control Administrator's Guide for instructions on deploying the plug-in:

http://docs.oracle.com/cd/E24628_01/doc.121/e24473/plugin_mngr.htm#CJGCDHFG

1.8 Upgrading the Plug-in

The Self Update feature allows you to expand Enterprise Manager's capabilities by updating Enterprise Manager components whenever new or updated features become available. Updated plug-ins are made available via the Enterprise Manager Store, an external site that is periodically checked by Enterprise Manager Cloud Control to obtain information about updates ready for download. See the Updating Cloud Control chapter in the Oracle Enterprise Manager Cloud Control Administrator's Guide for steps to update the plug-in:

http://docs.oracle.com/cd/E24628_01/doc.121/e24473/self_update.htm

1.9 Undeploying the Plug-in

See the Managing Plug-ins chapter in the Oracle Enterprise Manager Cloud Control Administrator's Guide for steps to undeploy the plug-in:

http://docs.oracle.com/cd/E24628_01/doc.121/e24473/plugin_mngr.htm#CJGEFADI

2 Configuring the IBM DB2 Database Plug-in

This chapter provides the instructions for the configuration tasks you must complete before adding an IBM DB2 Database target to Enterprise Manager Cloud Control.

The following configuration tasks are provided:

- Configure the Management Agent to Deploy the Plug-In

- Using a Suitable Operating System User and Assigning Authorities and Privileges

- Configuring IBM DB2 for Health Indicator Metrics and Database Monitoring Metrics

2.1 Configure the Management Agent to Deploy the Plug-In

To configure the Agent, you must first ensure that the user starting the Agent service belongs to the Local Administrators Group. Also, you must set the preferred credentials on all Agents where you want to deploy the plug-in. To do so, follow the instructions given in the following sections:

- Assigning Advanced Privileges to User

- Setting and Validating Preferred Credentials

2.1.1 Assigning Advanced Privileges to User

To assign advanced privileges, do the following:

1. Locally on the Microsoft Windows node hosting the Agent, check that the user starting the Agent service belongs to the Local Administrators Group. If not, add it.

2. Open the Local Security Settings Windows Tool and give the following Advanced Privileges to the user starting the Agent service:

- Act as part of the operating system

- Adjust memory quotas for a process

- Logon as batch job

- Replace a process level token

3. Restart the Agent service if it is running.

4. Set the Preferred Credentials for the Host and the Agent in Cloud Control. For more information, see Setting and Validating Preferred Credentials.

- The OS user set in the Preferred Credentials must belong to the Local Administrators Group.

- This OS user must have the following Advanced Privileges:

- Act as part of the operating system

- Adjust memory quotas for a process

- Log on as batch job

- Replace a process level token

2.1.2 Setting and Validating Preferred Credentials

To set the preferred credentials on all Agents where you want to deploy the plug-in, do the following:

1. In Enterprise Manager Cloud Control, from the Setup menu, select Security, then Preferred Credentials.
The Preferred Credentials page appears, showing a table of targets.

2. Select Host target type from the table and then click Managed Preferred Credentials.
The Host Preferred Credentials page appears.

3. In the Host Preferred Credentials page, in the Target Credentials section, select the host that is running the Management Agent where the plug-in has to be deployed, and click Set.

4. In the Select Named Credential dialog box, Select Credential as New and specify the user name and password and click Test and Save. If your test runs successfully, your credentials are set correctly.

5. Run the OS Command job for the Management Agent where the plug-in has to be deployed.

- Log in to Enterprise Manager Cloud Control.

- From the Enterprise menu, select Job and then Activity.

- In the Job Activity page, from the Create Job list, select OS Command, and click Go.

- Fill up the details required in the following pages, and click Submit to run the job. If the job runs successfully, your credentials are set correctly.

Note:
In order to run jobs from the UI, the target's Agent Host Preferred Credentials must be for a user that can run the db2 command-line utility and has permissions to start, stop, quiesce, and unquiesce the IBM DB2 database.

2.2 Using a Suitable Operating System User and Assigning Authorities and Privileges

The IBM DB2 Database plug-in accesses the table functions used in IBM DB2. For the plug-in to have access to the table functions, you have to use a suitable operating system user and assign this new user to a user group. The operating system user must have at least the minimum privileges. In addition, you have to assign the correct authority levels to this user.

Note:
IBM DB2 users must be operating system users. IBM DB2 cannot have its own database users because it relies on the host operating system for security.

If you do not have an operating system user already created, first, create one on the host where IBM DB2 is running. Then, follow these steps to assign this user to a new or existing UserGroup:

1. Open the IBM Data Studio.

2. From the tree view, select the database that you wish to modify, and connect using an admin account as shown in Figure 2-1:

Figure 2-1 Connect to IBM Data Studio

3. From the tree view, expand Users and Groups and select Users.

4. From the right pane, select Create a New Object.

5. In the General tab of the Properties window for the New User, enter the operating system user name.

6. From the Privileges tab, verify that the account is granted CONNECT.

7. To verify the applied changes, try connecting to the database with the newly created user as shown in Figure 2-2:

Figure 2-2 Connect to Database

Note:
These steps can also be performed from the command line using IBM DB2 SQL.

Also, assign authorities and privileges for the operating system UserGroup. The authorities supported with IBM DB2 are SYSADM, SYSCTRL, SYSMAINT, DBADM, and LOAD. The SYSADM, SYSCTRL, and SYSMAINT authorities cannot be granted using the GRANT SQL statement. These special authorities can only be set from the database manager configuration file. DBADM privilege can only be granted by user at SYSADM authorization level.

SYSMON authority level is required to monitor IBM DB2. This level is required to access the table functions, such as SYSPROC.SNAPSHOT_DATABASE, which are used in IBM DB2.

Follow these steps to set SYSMON authority level to your UserGroup:

1. At the db2=> prompt, run the following commands:

db2 => update dbm cfg using sysmon_group USERGROUP
db2 => db2stop
db2 => db2start

2. To check whether the changes are effective, run the following command:

db2 => get dbm cfg

The following will be the output of the previous command:

Database Manager Configuration
Node type = Enterprise Server Edition with local and remote clients
.....
SYSADM group name     (SYSADM_GROUP)   =
SYSCTRL group name    (SYSCTRL_GROUP)  =
SYSMAINT group name   (SYSMAINT_GROUP) =
SYSMON group name     (SYSMON_GROUP)   = USERGROUP
......

Note:
To understand how authorities and privileges are implemented in IBM DB2, access the IBM website.

2.3 Configuring IBM DB2 for Health Indicator Metrics and Database Monitoring Metrics

The following sections explain the post-installation configuration steps you need to perform on IBM DB2:

- Configurations Required for Health Indicator Metrics

- Configurations Required for Avoiding Metric Collection Errors for Database Monitoring Metrics

- Configurations Required for Statement Monitoring

- Configurations Required for Lock and Lock Waits Monitoring

- Configurations Required for Database Collection Health Indicator Metric

2.3.1 Configurations Required for Health Indicator Metrics

The health indicators for instance and database objects are enabled and disabled using the database manager configuration parameter HEALTH_MON. Then, the table functions HEALTH_TBS_HI, HEALTH_DB_HI, and HEALTH_DBM_HI get populated. These functions are used by the plug-in to show the alerts triggered based on the thresholds of health indicators.

Note:
Enabling these settings may result in some overheads, such as CPU and memory. Therefore, follow these steps only if you want to view the Health Indicator metrics.

To enable or disable HEALTH_MON by CLP (Command Line Processor), run the following command:

db2==> update dbm cfg using HEALTH_MON [on;off]

To check if your changes are effective, run the following command:

db2==> get dbm cfg

The following is the output:

.....
.....
.....
Monitor health of instance and databases (HEALTH_MON) = ON
.....
..........

For more information, access the IBM website.

2.3.2 Configurations Required for Avoiding Metric Collection Errors for Database Monitoring Metrics

To avoid metric collection errors for the "Database Monitoring" metrics, make a call to the GET_DBSIZE_INFO package so that the STMG_DBSIZE_INFO table gets created and populated with the required data.

The GET_DBSIZE_INFO procedure calculates the database size and maximum capacity. The calculated values are returned as procedure output parameters and cached in the SYSTOOLS.STMG_DBSIZE_INFO table. The procedure caches these values because the calculations are costly.

The SYSTOOLS.STMG_DBSIZE_INFO table is created automatically the first time the procedure runs. If there are values cached in the SYSTOOLS.STMG_DBSIZE_INFO table and they are current enough, as determined by the snapshot-timestamp and refresh-window values, then these cached values are returned.

If the cached values are not current enough, new cached values are calculated, inserted into the SYSTOOLS.STMG_DBSIZE_INFO table and returned, and the snapshot-timestamp value is updated. The last parameter in the GET_DBSIZE_INFO call is refresh window.

Default value refresh window (time difference between successive calls) is 30 minutes. If your database is growing at a faster rate, then you can set a lower value.

To make a call to GET_DBSIZE_INFO by CLP, run the following command:

db2==>CALL GET_DBSIZE_INFO(?, ?, ?, -1)

In this case, the refresh window is 30 minutes.

For more information, access the following page on the IBM website:

http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.sql.rtn.doc/doc/r0011863.html

2.3.3 Configurations Required for Statement Monitoring

To avoid metric collection errors for the statement monitoring metrics, run the following command at the DB2 prompt to update the database manager configuration so the switch for monitoring statements is on:

db2 => update dbm cfg using DFT_MON_STMT on

2.3.4 Configurations Required for Lock and Lock Waits Monitoring

To avoid metric collection errors for the lock and lock waits information in the analysis page, run the following command at the DB2 prompt to set up permissions so the monitoring plug-in user can query the lock waits administrative view in DB2.

For IBM DB2 Versions 9.1 and 9.5, update the database manager configuration so the switch for locks and lock waits is on:

db2 => update dvm cfg using DFT_MON_LOCK on

For IBM DB2 Versions 9.7 and above, ensure that the DB2 user has select permission on MON_LOCKWAITS administrative view, and has DATAACCESS authority. Run the following commands where '[username]' is the monitoring user name used when configuring the target:

db2 => GRANT DATAACCESS ON DATABASE TO USER [username]
db2 => GRANT SELECT on TABLE SYSIBMADM.MON_LOCKWAITS TO USER [username]

2.3.5 Configurations Required for Database Collection Health Indicator Metric

In order to see data for the Database Collection Health Indicator metric, you must enable table monitoring (DFT_MON_TABLE) on the database you are monitoring.

To enable or disable table monitoring by CLP, run the following command:

db2 => update dbm cfg using DFT_MON_TABLE [on; off]

3 Discovering the IBM DB2 Database Target

This chapter describes how to add an IBM DB2 Database target to Enterprise Manager Cloud Control.

The following sections are provided:

- Adding Instances for Monitoring

- Verifying and Validating the Plug-in

3.1 Adding Instances for Monitoring

After successfully deploying the plug-in, follow these steps to add the plug-in target to Cloud Control for central monitoring and management:

1. From the Setup menu, select Add Target and then Add Targets Manually.

2. In the Add Targets Manually page, select Add Targets Declaratively by Specifying Target Monitoring Properties, select Target Type as IBM DB2 Database, select a Monitoring Agent and click Add Manually.

3. In the Add IBM DB2 Database page (Figure 3-1), provide the following information for the properties:

- Target Name: Unique target name across all the Cloud Control targets, such as DB2_Hostname. This is the display name in Cloud Control.

- Monitoring Database Host Credentials

- Database Host User Name: Operating System account for the DB2 Database Host.

- Database Host Password: Corresponding password for the Database Host User Name.

- Confirm Database Host Password: Confirm the Database Host Password.

- Monitoring Database Credentials

- Database User Name: Valid User Name for the Database.

- Database Password: Password for the Database User Name.

- Confirm Database Password: Confirm the Database Password.

- Properties

- JDBC Driver: (Optional) Name of the DB2 Universal JDBC Driver. For example:

com.ibm.db2.jcc.DB2Driver

- JDBC URL: URL name for the IBM DB2 JDBC Driver connectivity. For example:

jdbc:db2://<server>:<port>/<database>

The JDBC URL argument represents a data source. Parameter definitions are shown in Table 3-1:

Table 3-1 JDBC URL Parameter Definitions

JDBC URL Parameter

Definition

jdbc:db2

Indicates that the connection is to a DB2 UDB server.

server

Fully qualified host name or IP address of the database server.

port

TCP/IP server port number assigned to the database server, which is an integer between 0 and 65535. The default port for IBM DB2 Database is 50000.

database

Database alias, which refers to the DB2 database catalog entry on the DB2 client.

The database argument is the database name defined during DB2 UDB (LUW) installation.

Figure 3-1 Add IBM DB2 Database Page

4. Click Test Connection to make sure the parameters you entered are correct.

Note:
After you deploy and configure the plug-in to monitor one or more targets in the environment, you can customize the monitoring settings of the plug-in. This alters the collection intervals and threshold settings of the metrics to meet the particular needs of your environment. If you decide to disable one or more metric collections, this could impact the reports that the metric is a part of.

3.2 Verifying and Validating the Plug-in

After waiting a few minutes for the plug-in to start collecting data, follow these steps to verify and validate that Enterprise Manager is properly monitoring the plug-in target:

1. Click the IBM DB2 Database target link from the All Targets page.
The IBM DB2 Database home page appears as shown in Figure 3-2:

Figure 3-2 IBM DB2 Database Target Home Page

2. Verify that no metric collection errors are reported by clicking Monitoring and then Metric Collection Errors from the Target menu.

3. Ensure that reports can be seen and no errors are reported by clicking Information Publisher Reports in the Target menu and viewing reports for the IBM DB2 Database target type.

4. Ensure that configuration data can be seen by clicking Configuration and then Last Collected in the Target menu. If configuration data does not immediately appear, click Refresh in the Latest Configuration page.

5. Ensure that the Analysis page can be viewed by clicking Analysis in the Target menu. The IBM DB2 Database Analysis page appears as shown in Figure 3-3:

Figure 3-3 IBM DB2 Database Plug-in Analysis Page

6. Ensure that the Performance page can be viewed by clicking Performance in the Target menu. The IBM DB2 Database Performance page appears as shown in Figure 3-4:

Figure 3-4 IBM DB2 Database Plug-in Performance Page

4 Creating and Editing Jobs

This chapter describes how to create and edit jobs in Enterprise Manager Cloud Control for the IBM DB2 Database.

To create and edit jobs, follow these steps:

1. In Enterprise Manager Cloud Control 13c, click Enterprise, then Job, then click Activity.

2. On the Job Activity page, select a job type from the Create Job menu and click Go.
Select one of the following jobs:

- Shutdown IBM DB2: Performs a Shutdown of the IBM DB2 Database Instance. When the IBM DB2 Database Instance is started, the Shutdown job icon will be accessible in the Summary section of the Target Home page.

- Startup IBM DB2: Performs a Startup of the IBM DB2 Database Instance. When the IBM DB2 Database Instance is shut down, the Startup job icon will be accessible in the Summary section of the Target Home page.

- Quiesce IBM DB2 DB: Perform a Quiesce command on the IBM DB2 Database.
(Select this option when you want to put the DB2 database into maintenance mode.)

- Unquiesce IBM DB2 DB: Perform an Unquiesce command on the IBM DB2 Database.
(Select this option when you want to remove the DB2 database from maintenance mode.)

- Kill DB2 Application: Forcibly end an agent's session in DB2 to stop an application. This job is also accessible from the Analysis page as the Kill Application button when an Application when viewing Lock Wait By Blocking Application and an application is selected.
(Select this option to end an application by specifying the agent id in the Parameters tab when creating the job.)

Note:
All jobs available for the IBM DB2 Database plug-in are only available when the plug-in is set up for local monitoring of the database.

3. In the General tab of the Create <Job Type> Job page, provide a name for the job and add the individual targets or one composite target such as a Group. If you are editing a job, then modify the job name and the selected targets.

Note:
These jobs do not require and parameters to be set in the Parameters tab of the Create <Job Type> Job page.

4. In the Credentials tab of the Create <Job Type> Job page, select an appropriate option for credentials.
You can choose to use the preferred credentials that are already set or override the preferred credentials with new credentials. In either case, you need to provide the credentials for agent host and database host.

To set the preferred credentials, click Preferences at the top-right corner of the Cloud Control console. From the left-vertical navigation bar, click Preferred Credentials. Cloud Control displays the Preferred Credentials page. On this page, you can set the preferred credentials.

5. In the Schedule tab of the Create <Job Type> Job page, schedule the job.

6. In the Access tab of the Create <Job Type> Job page, define or modify the access you want other users to have to this job.

7. Click Submit to create the job.

Note:
To enable use of the Job Buttons found in the Summary section of the Target home page, be sure to set the Preferred Credentials for the IBM DB2 Database target type.

5 IBM DB2 Database Plug-in Metrics and Reports

This chapter describes how to generate reports to further aid administrators with critical tasks such as problem diagnosis, trend analysis and capacity planning.

The following topics are provided:

- Generating a New Report From Out-of-the-Box Reports

- Deploying Reports After BI Publisher is Configured

- Using the IBM DB2 Plug-in Monitoring Templates

5.1 Generating a New Report From Out-of-the-Box Reports

The IBM DB2 Database plug-in includes 19 out-of-box reports (Figure 5-1):

Figure 5-1 IBM DB2 Database Plug-in Reports

To generate a new report from one of the out-of-the-box reports provided by Oracle, follow these steps:

1. From the Enterprise Manager Cloud Control web console, click the Enterprise menu and select Reports, then BI Publisher Enterprise Reports as shown in Figure 5-2:

Figure 5-2 BI Publisher Enterprise Reports Menu Item

2. Scroll down to the IBM DB2 section, find the desired report and click the report title hyperlink.

3. After clicking the report title hyperlink, the desired report will generate as shown in Figure 5-3:

Figure 5-3 IBM DB2 Database Plug-in BI Information Publisher Enterprise Reports Example

Table 5-1 shows the BI Publisher Enterprise Reports that are provided by Oracle:

Table 5-1 IBM DB2 Database Plug-in Reports

Report Name

Description

IBM DB2 Database DB Manager Configuration

Displays Database Manager Configuration Information for IBM DB2 Database.

IBM DB2 Database System Configuration

Displays System Configuration Information for IBM DB2 Database.

IBM DB2 Database Container Health

Displays Container Health Statistics for IBM DB2 Database.

IBM DB2 Database DB Health

Displays Database Health for IBM DB2 Database.

IBM DB2 Database DB Manager Health

Displays DBM Health Statistics for IBM DB2 Database.

IBM DB2 Database Tablespace Health

Displays Tablespace Health Statistics for IBM DB2 Database.

IBM DB2 Database Applications CPU Usage

Displays Applications CPU Usage for IBM DB2 Database.

IBM DB2 Database Applications Lock Performance

Displays Applications Lock Performance for IBM DB2 Database.

IBM DB2 Database Applications Row Accesses and Sorts Performance

Displays Applications Row Accesses and Sorts for IBM DB2 Database.

IBM DB2 Database Bufferpool and Non-Buffered IO Statistics

Displays Bufferpool and Non-Buffered IO Statistics for IBM DB2 Database.

IBM DB2 Database Cache Statistics

Displays Cache Statistics for IBM DB2 Database.

IBM DB2 Database DB Manager Agents and Connections Statistics

Displays DBM Agents and Connections Statistics for IBM DB2 Database.

IBM DB2 Database DB Manager Sorts Statistics

Displays DBM Sorts Statistics for IBM DB2 Database.

IBM DB2 Database Locks Statistics

Displays Database Locks Statistics for IBM DB2 Database.

IBM DB2 Database SQL Statement Performance

Displays SQL Statement Performance for IBM DB2 Database.

IBM DB2 Database Sort Heap and Hash Join Statistics

Displays Sort Heap and Hash Join Statistics for IBM DB2 Database.

IBM DB2 Statement and Lock Wait Analysis

Displaying Information about the Analysis of the Most Active SQL Statements and Lock Waits of the DB2 Database.

IBM DB2 Database DB Disk Storage Statistics

Displays DB Disk Storage Statistics for IBM DB2 Database.

IBM DB2 Database Tablespace Statistics

Displays Tablespace Statistics for IBM DB2 Database.

5.2 Deploying Reports After BI Publisher is Configured

If the IBM DB2 Database plug-in is deployed or upgraded after BI Publisher is already configured and the reports were not deployed automatically, execute the following command:

emcli deploy_bipublisher_reports -pluginid="oracle.em.sidb" -pluginversion="12.1.0.4.0" -force

5.3 Using the IBM DB2 Plug-in Monitoring Templates

To view the out-of-box templates, from the Enterprise menu, select Monitoring and then Monitoring Templates. Using the Target Type drop down, select IBM DB2 Database and press the arrow button.

A complete list of all out-of-box monitoring templates will be available for use as follows (see Figure 5-4):

- Basic IBM DB2 Monitoring Template: Recommended basic template for monitoring IBM DB2.

- IBM DB2 I/O Monitoring Template: Recommended template for monitoring IBM DB2 I/O.

- IBM DB2 Lock Monitoring Template: Recommended template for monitoring locks and deadlocks in IBM DB2.

Figure 5-4 IBM DB2 Database Plug-in Monitoring Templates

To apply a monitoring template to an IBM DB2 Target, perform the following actions:

1. Click the desired monitoring template to select it.

2. Click Actions and select Apply.

3. Choose to either replace or override existing thresholds with the Apply Options radial button.

4. Click Add to add the IBM DB2 Targets to apply the template to. Follow the prompts through the target Search and Select Targets screen.

5. Click Ok and a confirmation message will appear at the top of the page notifying of a successful application.

The Actions button found on the Monitoring Templates screen will also give access to setting a selected template as "Default" for all new IBM DB2 Target deployments, or Edit an existing template's threshold values.

Refer to "Using Monitoring Templates" chapter in the Oracle Enterprise Manager Cloud Control Administrator's Guide for more information on how to use Monitoring Templates in Enterprise Manager Cloud Control 13c:

https://docs.oracle.com/cd/E24628_01/doc.121/e24473/mon_temp.htm#EMADM12262

6 Inventory and Usage Details

This chapter describes the features and how to access the Inventory and Usage Details page (Figure 6-1) for the IBM DB2 Database.

Figure 6-1 Inventory and Usage Details Page

6.1 Inventory and Usage Details Page Feature Summary

With the Inventory and Usage Details page you can:

- View inventory summaries for your IBM DB2 databases.

- View inventory summary information in the context of different dimensions such as version, platform, OS version and vendor, life cycle, department, location, and cost center.

- Drill down multiple levels of inventory details.

- View to a pie chart to break down the inventory data for the roll-up option by color-coded percentages.

- Repeatedly revise selections to refresh chart and details based on new selections.

- Export deployment and details tables as a .csv file.

6.2 Accessing the Inventory and Usage Details Page

To view inventory and usage details:

1. From the Enterprise menu, select Configuration, and then select Inventory and Usage Details.
Alternatively, you can click Details in the Inventory and Usage region of the Enterprise Summary page.

2. Select the entity you want to examine and choose a roll-up option. For example, show all deployed hosts rolled up by platform. The page refreshes automatically upon selection.

3. In any given row in the top table, there is a count bar next to the count that represents a percentage of the maximum count. For example, if the maximum number of hosts by platform is four, the bar for hosts represented on two platforms would be half as long. Click the bar to refresh the details table and chart for the row.

6.3 Additional Information

For further information, refer to the "Inventory and Usage" section of the Oracle Enterprise Manager Lifecycle Management Administrator's Guide:

http://docs.oracle.com/cd/E24628_01/em.121/e27046/config_mgmt.htm#EMLCM11629

Index
D  I  J  M  P  R  U  W

D

deploy plug-in, 1.7

discovery, 3.1

document change summary, Preface

I

Inventory and Usage Details

features, 6.1

how to access, 6.2

J

JDBC driver

set up, 1.6

M

monitoring

add instance, 3.1

P

plug-in

deploy, 1.7

undeploy, 1.9

upgrade, 1.8

verify and validate, 3.2

R

remove plug-in, 1.9

U

upgrade plug-in, 1.8

W

what’s changed, Preface

Oracle Legal Notices

Copyright Notice

Copyright © 1994-2016, Oracle and/or its affiliates. All rights reserved.

License Restrictions Warranty/Consequential Damages Disclaimer

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

Warranty Disclaimer

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Restricted Rights Notice

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

Hazardous Applications Notice

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

Third-Party Content, Products, and Services Disclaimer

This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.

Alpha and Beta Draft Documentation Notice

If this document is in preproduction status:

This documentation is in preproduction status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of this documentation.

Private Alpha and Beta Draft Documentation Notice

If this document is in private preproduction status:

The information contained in this document is for informational sharing purposes only and should be considered in your capacity as a customer advisory board member or pursuant to your beta trial agreement only. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described in this document remains at the sole discretion of Oracle.

This document in any form, software or printed matter, contains proprietary information that is the exclusive property of Oracle. Your access to and use of this confidential material is subject to the terms and conditions of your Oracle Master Agreement, Oracle License and Services Agreement, Oracle PartnerNetwork Agreement, Oracle distribution agreement, or other license agreement which has been executed by you and Oracle and with which you agree to comply. This document and information contained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oracle without prior written consent of Oracle. This document is not part of your license agreement nor can it be incorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.