SlideShare a Scribd company logo
Db2 Data Management Console
February 2023
V3.1.10
Cintia Ogura
§ Introduction
• What is Data Management Console
• Key Features
• Evolution
§ Installation and Configuration
• Supported Db2 offerings and platforms
• System Requirements
• Capacity Planning
• Repository Database
• Download and Installation
• Home Directory
• Required Privileges to Start Data Management Console
• Starting, Stopping, Checking Status
• Uninstalling Data Management Console
• Data Management Console HADR Configuration
• E-mail Configuration
• SNMP Configuration
• JVM Configuration
• Repository Database Configuration
§ Security
• Architecture
• SSL Certificates
• Console Privileges
• Authentication Methods
v LDAP
v Repository Database
• Connection Users
• Additional Security Parameters
• SSH Configuration
• Console Port numbers
§ Monitored Databases
• Pre-Setup
• HADR Configuration Requirements
• Required Privileges
• Adding Monitored Databases
v Adding Connection Profile
v Importing Connections from a file
v Adding Connection via REST API
v Connection Profile List
§ Monitoring Profile
• Configuration
• Data Collection Cycle
• Monitor Settings
• Alerts
v Settings
v Notification (Rules)
v Custom Alerts
v Notification Center
Table of Contents IBM Db2 - Data Management Console
§ Event Monitor
• Prerequisites
• Event Monitor Profile
• Settings
• Tablespace
• Data Collection Cycle
• Administrative Task Scheduler (ATS)
• Activity
• Locking
• Utility
• Statistics
§ Monitoring Databases
• Summary Page
v Availability
v Responsiveness
v Throughput
v Resource Usage
v Contention
v Time Spent
• Database Page
v Database Time Spent
v Database Usage
• Statements Page
v In-flight Executions
v Individual executions
v Package Cache
v Stored Procedures
• Locking Page
v Blocking and waiting connections
v Connection Statistics
v Locked objects with waiting connections
v Find Locked Objects
v Locking event monitor
• Applications Page
v Top Consumers
v Connections
v Utilities
v Utilities Event Monitor
v Units of work (UOW)
• Throughput Page
v Connection Summary
v Partition Summary
v WLM Workload Summary
v WLM Service Class Summary
v Operating System Time Spent
• Memory
v Instance memory
v Database memory
• I/O Page
v Buffer pools
v Prefetches
v Logging Performance
• Storage Page
v Table Performance
v Storage
v Table space performance
v Table space utilization
• Workload Management
v Workload Management
§ Data
• Tables
• Views
• Indexes
• Remote tables
• Aliases
• MQTs
• Schemas
• Sequences
• Storage objects
• Application objects
• Authorization
• Workloads
• Configuration – Instance
• Configuration – Database
§ SQL editor
§ Query Tuning
§ Replication
§ Additional Features
• Reporting
• Blackout
• Jobs
• REST APIs
• Auditing
§ dmctop
§ Configuration Files
§ Log Files
§ dsutil Files
§ Common issues
§ Questions?
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 2
Db2 Data Management Console
Introduction
Back to Table of Contents
• Provides easy view of performance metrics of Db2 databases, focusing on problematic statements
• Keeps historical data for analysis
• Sends alerts when a threshold is reached
• Runs SQL
• Data Explorer
• Blackout events
• Execute and manage jobs
• Query tuning
• Replication
• Same look and feel for all Db2 databases, no matter where the database is located (cloud, Db2 Warehouse, PureScale, DPF,
HADR, CP4D, etc)
• Free of charge, no license is required
What is Data Management Console? IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 4
• Real-time and historical monitoring
• Alerts, Custom Alerts and notifications
• Monitor Reports
• Fully integrated SQL editor
• Query Tuning
• Replication
• Database object exploration and management
• Jobs and Scheduler
• Blackout
• Auditing
• Team collaboration
• RESTful services APIs support
Key features IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 5
Db2
Performance
Expert
InfoShere
Optim Performance
Manager
Data Server
Manager
Db2 Data
Management
Console
Evolution IBM Db2 - Data Management Console
2001
2015
2019
2010
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 6
Db2 Data Management Console
Installation and Configuration
Back to Table of Contents
On-premises IBM Cloud Cloud Pak for Data Red Hat OpenShift
Db2 10.1.0.2
and up
IIAS
Db2 Big
SQL
Db2
Db2
Warehouse
Db2 Db2W
Data
Virtualization
Db2 Big
SQL
Db2 Db2W
DMC standalone
on premises
Yes Yes No Yes Yes Yes Yes No No Yes Yes
DMC service on
Cloud Pak for
Data
No No Yes No
Supported Db2 offerings and platforms IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 8
https://www.ibm.com/support/pages/system-requirements-ibm-db2-data-management-console
• Select DMC version and Operating System
• Operating Systems tab
• List of operating systems and levels supported for DMC server installation
• Prerequisites tab
• Databases
• List of Databases and levels supported for DMC repository database
• JDBC Drivers
• Web Browsers
• Supported Software
• Managed Resources
• List of databases and levels supported for monitored databases
• Hardware
Supported platforms
• AIX
• Linux
• Windows
• Mac OS
• zLinux
System Requirements IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 9
UNIX and Linux
At least 64K or 65536 units for both the nproc value and the nofile value in the limits file
Capacity Planning IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 10
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=setup-capacity-planning
JVM Configuration
Capacity Planning – Repository database DSM vs. DMC IBM Db2 - Data Management Console
DSM DMC Example
Some metrics are available in realtime
mode only
Some metrics are available in realtime and
historical mode
Inflight Statements
Realtime data is not saved Realtime data is saved Each page refresh in Realtime
mode
Delta data is saved Raw and delta data is saved Package cache metrics
Less metrics More metrics Index performance
Activity event monitor, only 5000 records
are saved
All collected data from Activity event monitor
is saved
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 11
§ Rules and restrictions
• User must have the DBADM WITH DATAACCESS and SYSCTRL privileges
• Dedicated database for DMC
• Cannot be Db2 database partitioning feature (DPF) or pureScale®
• Must have a temporary table space with a page size of at least 32 KB
• TS4CONSOLE_TEMP will be created during repository database setup, if there is no existing temporary table space with at least 32 KB
• Must be Unicode type to avoid SQL errors
• Db2 version 11.1 or later
• Oracle compatibility must be disabled
• AUTOMATIC STORAGE option is set to YES
• Minimum log settings: LOGPRIMARY 25 LOGSECOND 200 LOGFILSIZ 8192
• Database configuration: EXTENDED_ROW_SZ enable
• One repository database per DMC server
§ Repository database needs to be at the same level of DMC code
• Older DMC versions do not support repository databases already migrated to a newer version of DMC
• If you have already upgraded your repository to a newer DMC release, there are several changes to tables that cannot be reverted. The rollback process will only work using a
clean backup of your previous repository database, for example
• Database backup taken when DMC version was V3.1.9
• Migrate DMC to V3.1.10
• To go back and use DMC V3.1.9 again, requires to restore the database backup taken at DMC V3.1.9 version
• If an old database is restored, all information collected after that database backup will be lost
Repository Database Requirements IBM Db2 - Data Management Console
Back to Table of Contents
Additional Information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=tasks-creating-repository-database
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 12
§ Db2 Restricted License for the Repository database only, available at IBM Fix Central
§ DMC does not create the repository database
§ Repository database needs to exist before the configuration
Repository Database IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 13
§ Create database example
• db2 create database repodb pagesize 8 k
• db2 UPDATE DATABASE CONFIGURATION FOR repodb USING LOGPRIMARY 25 LOGSECOND 200 LOGFILSIZ 8192
• db2 UPDATE DATABASE CONFIGURATION FOR repodb USING EXTENDED_ROW_SZ enable
• Additional Information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=database-creating-db2-repository
§ Regularly scheduled maintenance is recommended
• Backups
• REORGs and RUNSTATs
v reorg.sql file under <dmc_home>/ samples/DB2LUW
v Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=database-maintaining-repository
§ Download
• 4 ways to download Db2 Data Management Console
v IBM Marketing Registration Services (MRS) Tool
v Marketplace
v IBM Fix Central
v Passport Advantage
• Additional information
https://www.ibm.com/support/pages/node/885789
§ Installation
• Two different installation formats
v Script
v GUI
• Backup repository database
• Unzip image file
v Existing directory is considered an upgrade
v New directory is considered a new installation
• Configure setup.conf file (ports, repository database)
• Run setup script (DMC admin user)
• Additional information
v Setting up IBM Db2 Data Management Console
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=configuring-setting-up-db2-data-management-console
v Upgrading
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=welcome-upgrading
v Migrating from Data Server Manager (DSM)
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=upgrading-upgrade-data-server-manager-db2-data-management-console
Download and Installation IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 14
§ Bash is required
§ Supported only on Power® 8 and later processors
§ AIX® POWER7® compatible systems are not supported
• prtconf | grep -i proc
v Processor Type: PowerPC_POWER8
Processor Implementation Mode: POWER 7
Processor Version: PV_7_Compat**
§ libc++.a (shr_64.o) could not be loaded error
§ Install XL C/C++ 16.1.0.10 by using the following steps:
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-cannot-install-db2-data-management-console-aix
§ Additional configuration steps when Stack Execution Disable Protection (SED) is enabled
§ https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=ts-exempting-db2-data-management-console-by-using-sed-aix
Installation on AIX IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 15
§ Each DMC server can monitor up to 300 databases
§ One repository database per DMC server
§ One installation directory per DMC server
§ If repository database and DMC server located in the same machine
• The machine needs to have enough resources (memory, CPU, disk space)
v If DMC server requires 64GB of memory according to the DMC capacity planning, the machine will need to have
96GB of memory available (DMC server plus the repository database)
§ If more than one DMC server installed on the same machine
• The machine needs to have enough resources (memory, CPU, disk space) available for each DMC installation
v If DMC server requires 96GB of memory according to the DMC capacity planning, the machine will need to have
192GB of memory available
§ Different port numbers for each DMC server
• Including internal ports and job scheduler (bootstrap.properties file)
§ Different DMC servers monitoring the same databases
• Overhead on the monitored database by collecting duplicated information
• Event monitor functions will have conflicts
v Only enable event monitor on one DMC server, and keep disabled for the other DMC servers
ü HWCMON1007W error
Several Servers considerations IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 16
Locating home installation or <dmc_home>
§ Script
• <dmc_home> is the location where the installation package was decompressed after download.
• For example, on the Windows platform, if the installation package was decompressed to the below location: C:IBMibm-datamgmtconsole, then the
path of <dmc_home> is: C:IBMibm-datamgmtconsole
§ GUI
• Windows
v Right-click on the IBM Db2 Data Management Console icon on the desktop and select Open file location
v Continue to the resourcesbin folder to find the <dmc_home> directory
v For example, if the IBM Db2 Data Management Console was installed using GUI installer in the following location: C:Program FilesIBM Db2
Data Management Console, then the path of <dmc_home> is: C:Program FilesIBM Db2 Data Management Consoleresourcesbin
• Linux
v Find the location where you extracted the installation package, and enter the resources/bin directory to find the <dmc_home> directory.
v For example, if the installation package of the GUI installer was decompressed to the below location: /opt/IBM/ibm-datamgmtconsole then the
path of <dmc_home> is: /opt/IBM/ibm-datamgmtconsole/resources/bin
• Mac
v In the Applications folder, right-click on IBM Db2 Data Management Console and select Show Package Contents.
v Enter Contents/Resources/bin directory to find the <dmc_home> directory
v For example, the default <dmc_home> path is: /Applications/IBM Db2 Data Management Console.app/Contents/Resources/bin
Home Directory IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 17
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-locating-db2-data-management-console-home-directory
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-privileges-required-installing-starting-db2-data-management-console
Required privileges to Start Data Management Console IBM Db2 - Data Management Console
Back to Table of Contents
Operating
System
Installed by Started by Supported
(Y/N)
Limitation
Windows Administrator Administrator Y
Windows Administrator Non-administrator N
Windows Non-administrator N
Linux/AIX root root Y
Linux/AIX root non-root N
Linux/AIX non-root root Y Once DMC is started by root user, a non-root user cannot start DMC, as
they do not have the required write permission to work with DMC folders
Linux/AIX non-root non-root Y A non-root user can download, extract (unzip) the installation image, and
run the setup utility
Linux/AIX non-root user A non-root user B N DMC cannot be installed by one non-root user and started by another
non-root user
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 18
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-starting-stopping-restarting-server
Starting, Stopping, Checking Status IBM Db2 - Data Management Console
Option Windows Linux and UNIX
Start the server start.bat startup.sh
Stop the server stop.bat stop.sh
Restart the server restart.bat restart.sh
Check server status status.bat status.sh
§ Scripts are located in <IBM Db2 Data Management Console install>/bin directory
§ On Windows
• Run the scripts as an administrator or from an Administrator CLP (Command Line Processor)
• Start/Stop the server is also available using Windows Services
§ Auto-start on Mac
• https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-autostarting-console
§ Data Management Console URLs
• http://server_host_name_or_ip:http_port/console
• https://server_host_name_or_ip:https_port/console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 19
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-uninstalling-db2-data-management-console
Uninstalling Data Management Console IBM Db2 - Data Management Console
§ Stop Data Management Console server
§ Verify that the server is stopped
§ On Windows
• Go to <dmc_home>/ bin directory
• Run the script undo_setup.bat as an administrator or from an Administrator CLP (Command Line Processor)
• Uninstall DMC
§ Remove DMC directory
§ Optional
• Drop DMC repository database
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 20
Data Management Console – HADR Configuration IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-setting-up-high-availability
§ Run in a highly available environment to minimize access downtime to the console
§ Example above using IBM Tivoli® System Administration for Multiplatforms (Tivoli SA MP)
§ DMC and Tivoli SA MP are installed on both the nodes
§ Connect both the DMC servers to the same repository database REPODB that is hosted by a Db2 server
§ The repository database can be hosted anywhere including on one of the two nodes, but it is recommended to host it on another independent node
§ Only one of the DMC servers is up (online) at a time
§ Tivoli SA MP monitors the status of the online DMC server and when it detects the DMC is down, it attempts to bring that DMC up
§ If startup fails, Tivoli SA MP switches (fail over) to the other node and brings up DMC server on that node
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 21
Settings
• Host name
• Server Port
• E-mail address for sender
• Use TSL
• Requires authentication
• Destination e-mail address
Email Configuration IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-configuring-email-server
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 22
SNMP Configuration
§ Supports SNMP V3
§ Settings
• Host name
• Server Port
• Username
• Security Level
IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-configuring-snmp-notifications
Integration with ServiceNow
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=notifications-integrating-db2-data-management-console-servicenow
*****************Local Engine ID:80:00:13:70:04:80:00:13:70:c0:a8:01:0d*****************
0x800013700480001370c0a8010d
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 23
JVM Configuration IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 24
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=events-configuring-java-heap-size
§ Xms is the amount of memory allocated by Java when starting DMC
§ Xmx is the maximum amount of memory that Java can allocate for DMC server
§ DMC server machine needs to have enough available memory for the Xmx
§ Increase JVM configuration according to the DMC Capacity Planning
§ Review JVM configuration after adding new monitored databases
§ HADR standby databases, database partitions, and PureScale members counts as monitored databases
§ Restart of DMC server is required after the changes
Repository Database Configuration IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 25
3 ways to add repository database information
§ Installation
• Edit setup.conf file and add the repository
database before running setup script
§ First time logging into DMC
§ Administration à Repository
hostname or ipaddress
Port number for the Db2 instance (SVCENAME)
Database name
Schema for repository tables IBMCONSOLE (default)
JDBC Properties
SSL
Userid and password to
connect to the repository
database
SSL configuration mandatory
for the Job Server
Db2 Data Management Console
Security
Back to Table of Contents
Security – Architecture IBM Db2 - Data Management Console
Back to Table of Contents
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-security-architecture-db2-data-management-console
§ Access to is controlled through authentication and authorization
§ Can be accessed using both the secure HTTPS and unsecured HTTPS
protocol
§ Access is managed either by the console itself or by authenticating
facilities that reside outside of the console, like an LDAP server or
repository database
§ Access within IBM Db2 Data Management Console (authorization) is
managed by assigning user roles and privileges
§ User privileges and operation/data collection credentials are used to
ensure the security for target databases
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 27
Personal
Repository privilege SSL Configuration
Admin/Database
Admin/User role Model
Personal/Data Collection
credentials
§ Additional configuration when using SSL Certificates
• HTTPS URL using SSL Certificate
https://www.ibm.com/support/knowledgecenter/SS5Q8A_3.1.x/com.ibm.datatools.dsweb.ots.security.doc/topics/https_cert.html
• Repository database using SSL Certificate
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-enabling-ssl-connection-job-repository
• Monitored databases using SSL Certificate
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-enabling-ssl-connectivity-managed-db2-databases
Security – SSL Certificates IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 28
§ Console Administrator
§ Database Administrator
§ Database User
Security – Console Privileges IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-assigning-privileges
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 29
§ Setup admin
• User created during installation
• Console Administrator privileges
• Resetting authentication back to Setup Admin (SuperAdmin)
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=configuration-resetting-authentication
§ LDAP
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=configuration-delegating-authentication-authorization-ldap
§ Repository
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=configuration-delegating-authentication-authorization-repository-database
Security – Authentication Methods IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 30
Only one authentication method is supported
By selecting a different authentication method, the
previous method will be disabled automatically
• Host name
The host name or IPv4 address of the target LDAP server
IPv6 address is not supported
• Port
The port of the LDAP server through which LDAP service
is provided
Number between 1 and 65535
Usually two different ports will be used by LDAP service:
one for LDAP connections and the other for LDAPS
connections.
• StartTLS ( LDAPv3 Transport Layer Security (TLS) extension)
Secure LDAP connections with StartTLS would be created
• LDAPS (LDAP over SSL)
Secure LDAPS connections would be created
Security – Authentication Methods: LDAP IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=ldap-configure-connection-settings
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 31
§ Access LDAP Server Anonymously
• Anonymous bind operations
§ Simple Authentication
• Bind DN and bind password are required
• Binding LDAP server with only bind DN or only
bind password is not supported
• Bind DN
• Full DN value of bind account
• Multiple bind accounts are not supported
• Bind password
• Clear text password associated with the
bind DN
Security – Authentication Methods: LDAP Bind Account IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=ldap-configure-bind-account
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 32
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=ldap-configure-user-group-mapping
Security – Authentication Methods: LDAP User Groups IBM Db2 - Data Management Console
§ User base DN
• Full DN value of user base entry
§ User login attribute type
• User attribute type
§ Console Administrator Group is required
• Group DN
• Member attribute type
• User ID attribute type
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 33
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-
console/3.1.x?topic=database-configure-user-role-mapping-settings
Security – Authentication Methods: Repository Database IBM Db2 - Data Management Console
User Role
Mapping Method
Description Examples
Db2 Authorities Authorities specified for the repository database DBADM|DATAACCESS|SECADM|SQLADM
Db2 Groups Groups defined in the repository database using
Db2 create group command
ADMINGROUP|GROUP1|GROUP2
Db2 UDF Execute privilege on specified UDFs created
during the repository database setup:
"<console_schema_name>.CANADMINISTER”
"<console_schema_name>.CANDBA”
"<console_schema_name>.CANVIEW”
IBMCONSOLE.CANADMINISTER
Db2 Roles Roles defined in the repository database using
Db2 create role command
ENTERPRISE_USER|SYSTS_USR
§ Console Administrator Group is required
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 34
Security – Authentication Methods: Repository Database IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 35
The test user needs to be any user who
matches one of the DMC roles to access DMC
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-managing-user-roles-privileges
Security – Connection Users IBM Db2 - Data Management Console
§ Grant access to users for monitored databases
• Profile owner
v The user who creates a connection profile is automatically granted the connection profile owner privilege
v The user can use the connection profile, and can also edit or delete the connection profile for a database
v The administrator or profile owners can assign connection profile owner or user privilege for the connection profile to
other user IDs
• Connection profile user
v The user can use the connection profile (for example, run the SQL script on the target database) for which they have the
connection profile user privilege
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 36
If the user is not granted as Profile owner or Profile user, the
database won’t show in the monitored database list for that user
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-customize-security-parameters
Security – Additional Security Parameters IBM Db2 - Data Management Console
Back to Table of Contents
§ Configure User ID rule
• Although IBM Db2 Data Management Console delegates authentication to external security systems, defining a restriction pattern
for user ID is still a good security practice
• Default rules for user ID
v Total length from 1 to 128 characters
v Allowed characters are lower-case letters(a-z), numbers(0-9), underscore(_), hyphen(-), dot(.), at(@) and comma(,);
v Begin with a lower-case letter or number
§ Append customized HTTP response headers to web resources
• Set a rule to restrict the loading of web resource to preventing attacks like Clickjacking or XSS, you can append your own headers to
HTTP responses
§ Verify server host name or IP address
• Prevent 'Host Header Injection' attack that someone intercept your HTTP requests and replace the value of host header, you can
configure a list of host names and IP address of your server where IBM Db2 Data Management Console is installed to enable
verification of the host header
§ Customize several JSSE security properties
• To meet the latest security requirement, IBM Db2 Data Management Console has overwritten some of the default JSSE security
properties of IBM SDK, Java Technology Edition, Version 8.
§ Customize idle timeout value
• Customized idle timeout value that will automatically log off the console after 'x' minutes of user inactivity
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 37
SSH Configuration
Secure shell (SSH) services protocol to establish an encrypted communication channel with remote database servers
Allows users to issue commands and complete transactions with databases on connected servers and accommodate the encryption requirements
While the console primarily uses JDBC to communicate with remote database servers, it needs SSH to perform the following:
Execute the scripts/utilities in the remote machine
§ Db2 commands, such as db2look for generating DDLs
§ Administration commands, such as db2start and db2stop
§ Operating system commands, such as ls on linux machines, to browse the folders of a remote machine
§ CLP from the SQL editor
A number of functions available which require that connected servers be configured to support SSH. The following table identifies these functions:
IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-communicating-securely-remote-servers
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 38
Category Tasks that require an SSH service
Generation of SQL queries Run SQL statements (SQL Editor) where the Run method option is set to CLP WITH SSH
Database Monitoring Collect CPU information from an AIX server
Job Run Job with type Db2 CLP Script
Executable/Shell Script
General Search for databases or objects using the Browse feature
PasswordAuthentication property must
be set to yes in sshd configuration file
Console Port Numbers
Required to be open in the Firewall configuration
IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-modifying-db2-data-management-console-ports
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 39
Property Default File location Description
port 11080 <dmc_home>/wlp/usr/servers/dsweb/bootstrap.properties The HTTP port that is used to
access the IBM Db2 Console web
console from a web browser.
If http access is not allowed, set
the value to -1
https.port 11081 <dmc_home>/wlp/usr/servers/dsweb/bootstrap.properties The HTTPS secure port that is
used to access the IBM Db2
Console web console from a web
browser
internal.port 11082 <dmc_home>/wlp/usr/servers/dsweb/bootstrap.properties Internal port for the IBM Db2
Console server
job.http.port 11088 <dmc_home>/wlp/usr/servers/dsweb/bootstrap.properties Job-scheduler service port
drs.port 11098 <dmc_home>/Config/dswebserver_override.properties Dr.s service port
Db2 Data Management Console
Monitored Databases
Back to Table of Contents
Database Parameter Description Recommended value
MON_REQ_METRICS For basic data collection of statements, activities, workloads, etc. BASE
MON_ACT_METRICS For basic data collection of statements, activities, workloads, etc. BASE
MON_OBJ_METRICS For data collection of database objects, such as TABLE, TABLESPACE, etc. BASE
MON_RTN_DATA For data collection of stored procedure BASE
MON_LW_THRESH For data collection of blocking and waiting connections 30,000,000 (microseconds)
MON_DEADLOCK For data collection of blocking and waiting connections history
MON_LOCKTIMEOUT For data collection of blocking and waiting connections history
MON_LOCKWAIT For data collection of blocking and waiting connections without_hist
Monitored Databases – Pre-Setup IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=tasks-setting-database-parameter-values
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 41
Note: Enabling Locking event monitor option in Administration > Event monitor profile page, updates the MON_LW_THRESH,
MON_DEADLOCK, MON_LOCKTIMEOUT, and MON_LOCKWAIT parameters of the target database to the recommended value
Monitored Databases – HADR Configuration Requirement IBM Db2 - Data Management Console
§ Required Configuration for historical monitoring data
• DB2_HADR_ROS is ON
• DB2_STANDBY_ISO is UR
§ Event monitoring of an HADR standby connection is not supported
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 42
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=monitoring-hadr-historical
Monitored Databases – Required Privileges IBM Db2 - Data Management Console
Data collection credential ID must meet the following requirements
§ SQLADM on the database
• This privilege provides access to most of the required functions.
§ WLMADM on the database
• This privilege is required to create console workload(s)
§ SYSMAINT_GROUP
• A few monitoring calls use admin functions that use the snapshot monitor to capture information about the database and
any connected applications
• For example: SNAP_GET_UTIL_PROGRESS table function
https://www.ibm.com/docs/en/db2/11.5?topic=views-snap-get-util-progress-progress-snapshot
Authorization
v One of the following authorizations is required:
Ø EXECUTE privilege on the SNAP_GET_UTIL_PROGRESS table function
Ø DATAACCESS authority
v In addition, to access snapshot monitor data, one of the following authorities is also required:
Ø SYSMON
Ø SYSCTRL
Ø SYSMAINT
Ø SYSADM
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 43
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=console-min-db-privileges-required-db2
Db2 version 10.1.0.2 or later after DMC V3.1.6 or later
• List of supported monitored databases in System Requirements
• Db2 10.1 databases are not enabled by default
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=new-version-316
Up to 300 monitored databases per DMC server
• To avoid performance issues in the DMC server
3 ways to add a connection profile
• Add a connection profile via Web UI
• Import connections from file
• REST API
• Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-adding-connection-profile
Adding Monitored Databases IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 44
§ Administration à Connection profile à New connection
Monitored Databases – Adding Connection Profile IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 45
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-adding-connection-profile
Monitored Databases – Adding Connection Profile IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 46
hostname or ip address where the database is located port number for the Db2 instance (SVCENAME)
Database name
§ Identify the database
§ Unique name
§ Cannot have spaces or special characters
§ Used in e-mail subject for any alerts
§ Cannot be changed
Credentials
§ Monitoring data collection: default monitoring (background collection)
§ Shared credential: run jobs
§ Personal credential: run jobs, SQL statements, editing tables, etc.
additional JDBC parameters (JDBC tracing)
Initialize HADR or Initialize pureScale
§ Each standby, or partition, or member is considered a different monitored database and is added automatically by DMC
§ Adding standby, or partition, or member manually, they will be considered regular monitored databases
Security type for JDBC and SQLJ
SSL configuration
§ Truststore location
§ Truststore password
userid / password to connect to the database
• Import is asynchronous operation, profiles will be imported in turn
• Database connection information must be in CSV (comma-separated value) text format
Monitored Databases – Importing connections from a file IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 47
• Create new connection profile REST API
Monitored Databases – Adding connection via REST API IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 48
Monitored Databases – Db2 upgrade IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 49
§ db2updvnn command on the monitored database is required to update Db2 APIs and table functions used by DMC
§ Run the following query on the monitored database to check the Db2 API level
• db2 "select versionnumber from sysibm.sysversions order by 1 desc”
§ Make sure that the query results matches db2level to avoid errors in DMC
• https://www.ibm.com/support/pages/ibm-db2-data-management-console-dmc-showing-sqlcode-206-not-
valid-context-where-it-used-error
§ Update Connection Profile
• Administration à Connection profile
• Select connection profiles
• Click on Synchronize, and Run button
Monitored Databases – Update credentials IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 50
Select one or more connection profiles
to change the same credentials
Monitored Databases – Connection Profile List IBM Db2 - Data Management Console
Connection
Profile Page
(all added
databases)
Home Page
(monitoring
enabled
databases)
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 51
Filters
Db2 Data Management Console
Monitoring Profile
Back to Table of Contents
• Administration à Monitoring profile
• Status
• Default: Yes/No (only one default Monitoring profile)
• New connection profiles will be assigned to the default monitoring profile automatically
• Active: Yes/No
• Profile name: unique name
• Database list (assigned databases)
• Description
• HADR monitoring profile
• Predefined for standby databases
Monitoring Profile – Configuration IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 53
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=monitoring-setting-up-profile
Collection
• Collect data every (minutes)
Package cache
• SQL statements captured
• Table data read for a collection
Locks
• Lock wait threshold (miliseconds)
• Table data read for a collection
Collect storage data
§ Heavy query used to capture storage data
§ It can impact the monitored database
§ Disable the query or schedule the query to run when the monitored database is not busy
§ Reorg/runstas on the monitored database catalog tables might help the query performance
Monitoring Profile – Monitor Settings IBM Db2 - Data Management Console
Package cache only displays top n
queries order by 16 KPIs
1. num_exec_with_metrics
2. stmt_exec_time
3. total_cpu_time
4. rows_read
5. rows_returned
6. total_act_wait_time
7. lock_wait_time
8. sort_overflows
9. logical_reads
10. physical_reads
11. temp_reads
12. pool_data_l_reads
13. pool_index_l_reads
14. lock_escals
15. lock_waits
16. wlm_queue_time_total
In this example:
Every 1 minute, read maximum of 1000 records from the package cache, and keep the top 200 only
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 54
Normalize captured SQL statements
SELECT * FROM TABLEA WHERE NAME = ‘IBM’
SELECT * FROM TABLEA WHERE NAME = ‘DATA’
SELECT * FROM TABLEA WHERE NAME = ‘MANAGEMENT’
SELECT * FROM TABLEA WHERE NAME = ‘CONSOLE’
SELECT * FROM TABLEA WHERE NAME = ‘SKILL’
SELECT * FROM TABLEA WHERE NAME = ‘TRANSFER’
è 6 records
SELECT * FROM TABLEA WHERE NAME = ?
è 1 records
Monitoring Profile – Monitor Settings IBM Db2 - Data Management Console
Persistence
§ Historical data
• Monitoring data
v Keep data for (weeks)
• Package cache
v Keep data for (days)
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 55
Affects disk space in repository database
In case old data is not being deleted in repository database, use the deleteRepoData_expired script:
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-deleting-expired-monitor-data
Deleting data for a deleted connection profile use the deleteRepoData4DeletedConnection script:
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-cleaning-up-monitor-data-
deleted-connections
§ Collect data every (minutes)
• Data might not be available if not captured during the cycle (snapshot)
§ The lower the number the more data will be collected
• Example of 1 hour monitoring with a database running 100 applications
v Capturing information every 1 minute: 100 x (60 / 1) = 6000 records
v Capturing information every 5 minutes: 100 x (60 / 5) = 1200 records
v Capturing information every 15 minutes: 100 x (60 / 15) = 400 records
v Multiplied by the number of tables collecting data
v Multiplied by the number of databases assigned to the monitoring profile
Monitoring Profile – Data Collection Cycle IBM Db2 - Data Management Console
This
Photo by
Unknown
Author is
licensed
under CC
BY-SA
DMC
Server
Read data
Monitored
databases
Db2 table functions
Insert
data
Repository
database
Web UI
View data
Cleaner
Threads Clean old data
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 56
4 Categories
• Availability
• Performance
• Configuration
• Custom
Thresholds
• Critical
• Warning
• Information
Monitoring Profile – Alert Settings IBM Db2 - Data Management Console
Additional information (including list of alerts available)
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=alerts-grouping-by-type
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 57
§ Name
§ 3 types of notification
• e-mail (list of e-mails for the alert)
• SNMP
• Both
§ Preference
• Send notification immediately when an alert opens
• Send notification when an alert closes
• Send a daily email summary of all open alerts in the past 24 hours
§ Alert type
§ Severity
• Critical
• Warning
• Information
§ Click on “OK” button to apply the notification changes
§ Click on “Save” button to save the monitoring profile
Monitoring Profile – Notification (Rules) IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 58
§ Script type
• SQL script
• Shell Script
§ Script text
• Scripts must return severity column (returnValue) to trigger the alert
v Information: 0
v Warning: -1
v Critical: -2
• Stored procedures
v OUT parameter must be included to return an exit code (-2,-1, or 0)
• Second column to return auxiliary information as output (optional)
§ Timeout Settings
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=profile-creating-custom-
alerts
Custom alerts samples
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=alerts-custom-code-
snippets
Monitoring Profile – Custom Alerts IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 59
Notification Center IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 60
Notification Center IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 61
Notification Center – Suggested Resolution IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 62
§ Apply Auto-Fix
Notification Center – Suggested Resolution IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 63
§ View access plan
§ Tune statement
Run Visual Explain
Query Tuning
Alerts – e-mail IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 64
Db2 Data Management Console
Event Monitor
Back to Table of Contents
Prerequisites settings for the monitored database
§ Privileges to create event monitoring-related objects: SYSCTRL or SYSADM privilege is required to create BUFFERPOOL and TABLESPACE
§ WLMADM or DBADM privilege is required to CREATE / ALTER WORKLOAD
§ ACCESSCTRL or SECADM privilege is required to GRANT EXECUTE on PROCEDURE
§ SYSADM privilege is required to run db2set (ATS)
§ Tablespace for event monitor tables
Event Monitor – Prerequisites IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 66
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=events-table-space-other-prerequisites-event-monitoring
Event Monitor Profile IBM Db2 - Data Management Console
Shows all event monitors
for each database
Pencil icon to edit
Event monitor profile
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 67
Top 20 connections
with tablespace usage
§ When enabled, DMC issues Db2 CREATE EVENT MONITOR … WRITE TO
TABLES command on the monitored database
§ Tablespace is required to store the event monitor tables
§ Db2 creates the event monitor and event monitor tables, and insert data
into those tables
§ 4 event monitors
• Activity
v Activity event monitor
v Monitor à Statement à Individual executions
• Locking
v Locking event monitor
v Monitor à Locking à Locking event monitor
• Utility
v Change history event monitor
v Monitor à Applications à Utilities event monitor
• Statistics
v Statistics event monitor
v Monitor à Summary à Responsiveness widget
Event Monitor – Settings IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 68
§ Created on monitored database
§ Not required for HADR standby databases
§ New table space (created by DMC)
• TS4MONITOR default name
§ Existing table space requirements
• 32K page
• Across all database partitions or members
• AUTOMATIC STORAGE AUTORESIZE YES
• MAXSIZE 2G
§ To increase the table space usage size, click
‘Scale’ to set new table space size
Event Monitor – Tablespace IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 69
Event Monitor – Tablespace Requirements IBM Db2 - Data Management Console
--Create a bufferpool with page size 32kb
CREATE BUFFERPOOL CONSOLEPOOL ALL DBPARTITIONNUMS SIZE 1000 AUTOMATIC PAGESIZE 32768
--Create a partition spanning all partitions
CREATE DATABASE PARTITION GROUP CONSOLEGROUP ON ALL DBPARTITIONNUMS
--Create the 32kb tablespace with max size 2G specified
CREATE TABLESPACE TS4MONITOR IN CONSOLEGROUP PAGESIZE 32768 MANAGED BY AUTOMATIC STORAGE AUTORESIZE YES INITIALSIZE 100M MAXSIZE
2G BUFFERPOOL CONSOLEPOOL
--Create a 32kb pagesize temporary tablespace if there is not an existing one
CREATE TEMPORARY TABLESPACE TEMPSPACE2 PAGESIZE 32K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4 BUFFERPOOL CONSOLEPOOL
--Disable the legacy console workload DSM_WORKLOAD if it exists
ALTER WORKLOAD DSM_WORKLOAD DISABLE
--Define a workload to filter the monitored console executed statements. Because the COLLECT ACTIVITY DATA option is not specified, the statement
history will not collect the statements of the workload.
CREATE WORKLOAD CONSOLE_WORKLOAD APPLNAME (''DSMAu*'',''DSMRt*'',''DS_ConnMgt*'',''DSSNAP*'',''DSMOQT'',''UC_*'')
--Capture the statements for the default two workloads on the coordinator node. If you want to collect the activity data for all nodes of a multi-partition
database, change the COORDINATOR option to ALL.
ALTER WORKLOAD SYSDEFAULTUSERWORKLOAD COLLECT ACTIVITY DATA ON COORDINATOR WITH DETAILS;
ALTER WORKLOAD SYSDEFAULTADMWORKLOAD COLLECT ACTIVITY DATA ON COORDINATOR WITH DETAILS;
--Capture the aggregate responsiveness workload information
ALTER WORKLOAD SYSDEFAULTUSERWORKLOAD COLLECT AGGREGATE ACTIVITY DATA BASE;
ALTER WORKLOAD SYSDEFAULTADMWORKLOAD COLLECT AGGREGATE ACTIVITY DATA BASE;
--Create a bufferpool with page size 32kb
CREATE BUFFERPOOL CONSOLEPOOL ALL DBPARTITIONNUMS SIZE 1000 AUTOMATIC PAGESIZE 32768
--Create a partition spanning all partitions
CREATE DATABASE PARTITION GROUP CONSOLEGROUP ON ALL DBPARTITIONNUMS
--Create the 32kb tablespace with max size 2G specified
CREATE TABLESPACE TS4MONITOR IN CONSOLEGROUP PAGESIZE 32768 MANAGED BY AUTOMATIC STORAGE AUTORESIZE YES INITIALSIZE 100M MAXSIZE
2G BUFFERPOOL CONSOLEPOOL
--Create a 32kb pagesize temporary tablespace if there is not an existing one
CREATE TEMPORARY TABLESPACE TEMPSPACE2 PAGESIZE 32K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4 BUFFERPOOL CONSOLEPOOL
--Disable the legacy console workload DSM_WORKLOAD if it exists
ALTER WORKLOAD DSM_WORKLOAD DISABLE
--Define a workload to filter the monitored console executed statements. Because the COLLECT ACTIVITY DATA option is not specified, the statement
history will not collect the statements of the workload.
CREATE WORKLOAD CONSOLE_WORKLOAD APPLNAME (''DSMAu*'',''DSMRt*'',''DS_ConnMgt*'',''DSSNAP*'',''DSMOQT'',''UC_*'')
--Capture the statements for the default two workloads on the coordinator node. If you want to collect the activity data for all nodes of a multi-partition
database, change the COORDINATOR option to ALL.
ALTER WORKLOAD SYSDEFAULTUSERWORKLOAD COLLECT ACTIVITY DATA ON COORDINATOR WITH DETAILS;
ALTER WORKLOAD SYSDEFAULTADMWORKLOAD COLLECT ACTIVITY DATA ON COORDINATOR WITH DETAILS;
--Capture the aggregate responsiveness workload information
ALTER WORKLOAD SYSDEFAULTUSERWORKLOAD COLLECT AGGREGATE ACTIVITY DATA BASE;
ALTER WORKLOAD SYSDEFAULTADMWORKLOAD COLLECT AGGREGATE ACTIVITY DATA BASE;
--Create SYSTOOLSPACE for Administrative Task Schedule(ATS)
CREATE TABLESPACE SYSTOOLSPACE IN IBMCATGROUP MANAGED BY AUTOMATIC STORAGE USING STOGROUP IBMSTOGROUP EXTENTSIZE 4
--Ensure you have ADMIN_TASK_ADD and ADMIN_TASK_UPDATE privileges to execute stored procedures(ATS)
GRANT EXECUTE ON PROCEDURE SYSPROC.ADMIN_TASK_ADD TO USER ${userName};
GRANT EXECUTE ON PROCEDURE SYSPROC.ADMIN_TASK_UPDATE TO USER ${userName};
--Enable on the database the setting related to ATS, please choose the "CLP with SSH" Run method in Options
!db2set DB2_ATS_ENABLE=YES;
Without ATS With ATS
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=events-table-space-other-prerequisites-event-monitoring
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 70
§ Regular event monitor scenario happens according to the Collection interval configured in
the Event monitor profile
§ ATS (Administrative Task Scheduler) watchdogs
• Helpful when DMC loses the connection to the monitored database
• On
v Automatically drop existing event monitors and event monitor tables
v ATS needs to be configured and running on the monitored database
• Off
v Possibility to reach tablespace full error
v Need to drop existing event monitors and event monitor tables manually
Event Monitor – Data Collection Cycle IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 71
START: CREATE
EVENT MONITOR
WRITE TO TABLES
STOP: DROP
EVENT
MONITOR and
TABLES
Watchdog
(ATS)
Check for
lost event
monitors
Monitored
databases
Db2 inserts data
into event monitor
tables
Insert
data
Repository
database
Web UI
DMC
Server
Regular Event
Monitor Scenario
Cleaner
Threads
View data
Clean old data
Read data from event
monitor tables
Flush event monitor
Common scenarios when DMC loses the connection to the monitored database
§ Connection from DMC to the monitored database was forced (force applications command)
§ DMC crashes
Why use Administrative Task Scheduler (ATS)?
§ Watchdogs drop the event monitors and event monitor tables automatically
Event Monitor – Administrative Task Scheduler (ATS) IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 72
Additional information about ATS:
https://www.ibm.com/docs/en/db2/11.5?topic=scheduler-administrative-task
START: CREATE
EVENT MONITOR
WRITE TO TABLES
STOP: DROP
EVENT
MONITOR and
TABLES
Watchdog
(ATS)
Disable lost event
monitors
automatically
Monitored
databases
Db2 inserts data
into event monitor
tables
Connection lost
with ATS
Insert
data
Repository
database
Web UI
DMC
Server
Cleaner
Threads
View data
Clean old data
Read data from event
monitor tables
Flush event monitor
STOP: DROP
EVENT
MONITOR and
TABLES
Connection lost
without ATS
START: CREATE
EVENT MONITOR
WRITE TO TABLES
Monitored
databases
Db2 keeps inserting
data into event
monitor tables
Insert
data
Repository
database
Web UI
DMC
Server
Cleaner
Threads
View data
Clean old data
Read data from event
monitor tables
Flush event monitor
Can cause
tablespace full
error
Event Monitor – Activity IBM Db2 - Data Management Console
Back to Table of Contents
Timestamp
changes
every cycle
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 73
Event Monitor – Locking IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 74
Only locks time up to
threshold will be collected
Event Monitor – Utility IBM Db2 - Data Management Console
Back to Table of Contents
Utility Types
BACKUP
LOAD
MOVETABLE
ONLINERECOVERY
REDISTRIBUTE
REORG
RESTORE
ROLLFORWARD
RUNSTATS
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 75
Only captures information from
the selected Utility Types
Event Monitor – Statistics IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 76
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=events-setting-up-statistics-event-monitoring-opt-in
Why should you opt-in?
Statistics event monitor must be enabled on a connected database for the ‘Responsiveness’ widget in the
Monitor > Summary page to display data in the widget.
Note: The “Responsiveness” widget is disabled (default) when the Statistics event monitor opt-in
feature is disabled (default)
What is the benefit?
The “Responsiveness” widget is a tool that gives you an insight on changes of query response time
characteristics over time. This widget uses the aggregated activity data collected by the statistics event
monitor and helps you understand how quickly the system is processing the statements. You can also
view your workload composition and capture activities for diagnostic reasons.
In most cases, statistic event monitor will only add a minor overhead to monitored databases, which
should be safe to enable it
Information coming from statistics event monitor
Db2 Data Management Console
Monitoring Databases
Back to Table of Contents
Monitor Database – Understanding Icons IBM Db2 - Data Management Console
Back to Table of Contents
Ascendant and Descendant Sort
Filter Conditions
Show/Hide Column
Export as CSV
Show/Hide System Objects
Share the page
Databases
Monitor
Run SQL
Data
Tuning
Administration
Expand Side Menu Database Selection
About
APIs
IBM Documentation
Community
Dark/Light Mode
Notification Center User
Additional
options
Data Interval Selection
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 78
Monitor Database – Show Data Interval IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 79
§ Sampling data only
§ To see all records, use Custom option and specify a date interval
Monitor Statement – Statements IBM Db2 - Data Management Console
§ All captured statements have an option to View details, Visual Explain, and Tune query
§ Force application and cancel activity options for Real Time only
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 80
Real Time only
Monitor Statement – Statements – View Details 1/4 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 81
§ Using the View details option from a statement, drill down for details
Monitor Statement – Statements – View Details 2/4 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 82
Monitor Statement – Statements – View Details 3/4 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 83
Monitor Statement – Statements – View Details 4/4 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 84
Monitor – Summary IBM Db2 - Data Management Console
Overview showing main metrics for the monitored database
Back to Table of Contents
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=metrics-summary
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=SS5Q8A_3.1.x/com.ibm.datatools.dsweb.ots.installconfig.doc/topics/consolehome.html#baselinedesc
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 85
Monitor – Summary – Availability IBM Db2 - Data Management Console
§ From Db2 table function
MON_GET_DATABASE
§ Status can be one of the following
• Available
• Unavailable
§ Repository table <SCHEMA>.DBSTATUS
Back to Table of Contents
Additional information including table description
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=summary-availability
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 86
Monitor – Summary – Responsiveness IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 87
§ Requires Statistics event monitor
§ Responsiveness contains
• Response Time (ms)
v The average SQL response time in the given time frame
• Statements
v The statement count in the given time frame
When monitoring HADR standby
Monitor – Summary – Throughput IBM Db2 - Data Management Console
§ Throughput contains
• Rows Read / (min)
v The average rows read rate (number of rows read per minute) in the given time frame
• Statements / (min)
v The average SQL rate (number of statements per minute) in the given time frame
§ From Db2 table function MON_GET_WORKLOAD
§ Repository table <SCHEMA>. DATABASE
§ The throughput metric monitors the query performance by measuring the number of statements
that are processed and the number of rows that are read from the table
§ The statements contain the activities that are completed with errors and the activities that are
completed successfully within a certain period
§ The count of rows read is not the number of rows that were returned to the calling application.
Instead, it is the number of rows that were read to return the result set
§ Additionally, this count does not include any index accesses. This metric summary represents
database throughput by quantifying the statements and rows that are read in two aspects
• An average number per minute
• Time series for an average
Back to Table of Contents
Additional information including table description
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=summary-throughput
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 88
Monitor – Summary – Resource Usage IBM Db2 - Data Management Console
Back to Table of Contents
Additional information including table description
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=summary-resource-usage
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 89
§ Resource usage contains
• CPU (%)
v The average Db2 CPU usage percentage in the given time frame
v If the database has multiple nodes, only the master node (member = 0) is considered
• Memory (%)
v The average memory usage percentage in the given time frame
• Storage (%)
v The latest storage usage percentage in the given time frame
• Log Space (%)
v The max log space usage percentage in the given time frame
§ From Db2 table function ENV_GET_DB2_SYSTEM_RESOURCES and ENV_GET_SYSTEM_RESOURCES
§ SUM(CPU_USER) and SUM(CPU_SYSTEM) from the ENV_GET_DB2_SYSTEM_RESOURCES grouped by database members and joined with the columns
from ENV_GET_SYSTEM_RESOURCES for those database members
§ Repository tables
• CPU (%)
v <SCHEMA>.RESOURCE_CPU
v Db2WoC - <SCHEMA>.WOLVERINE_API_CPU
• Memory (%)
v <SCHEMA>.RESOURCE_MEMORY
v Db2WoC - <SCHEMA>.WOLVERINE_API_MEMORY
• Storage (%)
v <SCHEMA>. RESOURCE_STORAGEGROUP
v Db2WoC - <SCHEMA>.WOLVERINE_API_STORAGE
• Log Space (%)
v <SCHEMA>. RESOURCE_LOGSPACE
Monitor – Summary – Contention IBM Db2 - Data Management Console
Back to Table of Contents
Additional information including table description
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=summary-contention
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 90
§ Contention contains
• Lock Waits(/m)
v The max lock waits number per minute in the given time frame
• Connections
v The max concurrent connections value in the given time frame
§ Database contention situation by measuring lock-waits and concurrent database connections
§ From Db2 table functions MON_GET_ACTIVITY and MON_GET_CONNECTION
§ The data for lock-waits is collected from repository table <SCHEMA>.DATABASE
§ The data for concurrent database connections is collected from
• <SCHEMA>. CONTENTION_CONNECTION
• <SCHEMA>.ONLINE_CONNECTION
§ Repository tables
• Information in <SCHEMA>. CONTENTION_CONNECTION table is from MON_GET_CONNECTION
• Information in <SCHEMA>.ONLINE_CONNECTION is from MON_GET_ACTIVITY and MON_GET_CONNECTION
Monitor – Summary – Time Spent IBM Db2 - Data Management Console
Back to Table of Contents
Additional information including table description
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=summary-time-spent
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 91
§ Displays the time spent by the metric
• Top Time Spent
v Displays which item takes most of the time in the time range
v Time spent contains SQL execution, I/O, Lock waits, Other waits, and Other processing
§ Indicates the percentage of time that is taken for database calls, by measuring the time of various database activities
(such as SQL execution time, I/O time)
§ From Db2 table function MON_GET_WORKLOAD
§ Repository table <SCHEMA>. DATABASE
§ Excludes data from
• DSM_WORKLOAD
• CONSOLE_WORKLOAD
• DV_WORKLOAD
• BIGSQL_WORKLOAD
Monitor Database – Database time spent IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 92
Additional information
• Metrics from MON_GET_WORKLOAD function
https://www.ibm.com/docs/en/db2/11.5?topic=functions-mon-get-workload-get-workload-metrics
• Additional Db2 information
https://www.ibm.com/docs/en/db2/11.5?topic=elements-time-spent-monitor
Metrics from MON_GET_WORKLOAD function:
Category: SQL execution
• TOTAL_SECTION_PROC_TIME
• TOTAL_COL_PROC_TIME
• TOTAL_ROUTINE_USER_CODE_PROC_TIME
Category: I/O
• POOL_READ_TIME
• POOL_WRITE_TIME
• DIRECT_READ_TIME
• DIRECT_WRITE_TIME
Category: Lock waits
• LOCK_WAIT_TIME
• LOCK_WAIT_TIME_GLOBAL
Category: Other waits
• AGENT_WAIT_TIME
• WLM_QUEUE_TIME_TOTAL
• LOG_BUFFER_WAIT_TIME
• LOG_DISK_WAIT_TIME
• TCPIP_RECV_WAIT_TIME
• TCPIP_SEND_WAIT_TIME
• IPC_SEND_WAIT_TIME
• IPC_RECV_WAIT_TIME
• AUDIT_SUBSYSTEM_WAIT_TIME
• AUDIT_FILE_WRITE_WAIT_TIME
• DIAGLOG_WRITE_WAIT_TIME
• EVMON_WAIT_TIME
• TOTAL_EXTENDED_LATCH_WAIT_TIME
• PREFETCH_WAIT_TIME
• COMM_EXIT_WAIT_TIME
• IDA_SEND_WAIT_TIME
• IDA_RECV_WAIT_TIME
• RECLAIM_WAIT_TIME
• SPACEMAPPAGE_RECLAIM_WAIT_TIME
• FED_WAIT_TIME
Monitor Database – Database time spent details IBM Db2 - Data Management Console
Back to Table of Contents
Category: Other processing
• TOTAL_COMPILE_PROC_TIME
• TOTAL_IMPLICIT_COMPILE_PROC_TIME
• TOTAL_LOAD_PROC_TIME
• TOTAL_REORG_PROC_TIME
• TOTAL_RUNSTATS_PROC_TIME
• TOTAL_CONNECT_REQUEST_PROC_TIME
• TOTAL_CONNECT_AUTHENTICATION_PROC_TIME
• TOTAL_COMMIT_PROC_TIME
• TOTAL_ROLLBACK_PROC_TIME
• TOTAL_BACKUP_PROC_TIME
• TOTAL_INDEX_BUILD_PROC_TIME
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 93
Monitor Database – Database usage IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 94
Monitor – HADR Information IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 95
Monitoring HADR standby database
Monitor Statement – In-flight executions IBM Db2 - Data Management Console
Current statements running at the moment of the collection interval configured in the monitoring profile
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 96
Monitor Statement – Individual executions IBM Db2 - Data Management Console
Requires Activity Event Monitor
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 97
Monitor Statement – Package cache IBM Db2 - Data Management Console
Package cache only displays top n queries order by 16 KPIs
1. num_exec_with_metrics
2. stmt_exec_time
3. total_cpu_time
4. rows_read
5. rows_returned
6. total_act_wait_time
7. lock_wait_time
8. sort_overflows
9. logical_reads
10. physical_reads
11. temp_reads
12. pool_data_l_reads
13. pool_index_l_reads
14. lock_escals
15. lock_waits
16. wlm_queue_time_total
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 98
Monitor Statement – Stored procedures IBM Db2 - Data Management Console
§ Requires MON_RTN_DATA database configuration set to BASE on the monitored database
§ Displays the aggregated execution metrics for
§ Procedures
§ External procedures
§ Compiled functions
§ External functions
§ Compiled triggers
§ Anonymous blocks invoked since database activation
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 99
Monitor Locking – Blocking and waiting connections IBM Db2 - Data Management Console
§ Information about the blocker and waiter pair
§ Table functions
• MON_GET_APPL_LOCKWAIT
• MON_GET_CONNECTION
• MON_GET_ACTIVITY
• MON_GET_PKG_CACHE_STMT
• To retrieve connection information for BLOCKER connections, information is gathered using the table function MON_GET_CONNECTION with parameters (HLD_APPLICATION_HANDLE, and HLD_MEMBER) which is
collected from MON_GET_APPL_LOCKWAIT
• To retrieve connection information for WAITER connections, information is gathered using the table function MON_GET_CONNECTION with parameters (REQ_APPLICATION_HANDLE, and REQ_MEMBER) which is
collected from MON_GET_APPL_LOCKWAIT
• To get the SQL statement of the application holding the lock, MON_GET_PKG_CACHE_STMT with parameters (NULL, LAST_EXECUTABLE_ID, NULL, and HLD_MEMBER) is used, where LAST_EXECUTABLE_ID is collected
from MON_GET_CONNECTION and HLD_MEMBER is collected from MON_GET_APPL_LOCKWAIT
• To get the SQL statement for the waiting application, MON_GET_ACTIVITY with parameters (REQ_APPLICATION_HANDLE, and REQ_MEMBER) is used, which is collected from MON_GET_APPL_LOCKWAIT
§ Repository table <SCHEMA>. LOCKPAIR
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 100
Additional information including table description
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=metrics-blocking-waiting-connections
Monitor Locking – Connection statistics IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 101
Monitor Locking – Locked objects with waiting connections IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 102
Displays the detailed data of the locked process and information of the process that blocked it
Monitor Locking – Find locked objects IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 103
Displays the detailed information of locked operations
Monitor Locking – Locking event monitor IBM Db2 - Data Management Console
Requires locking event monitor
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 104
Monitor Applications – Top consumers IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 105
Displays the top consumers of the system resources
Monitor Applications – Connections IBM Db2 - Data Management Console
§ Application details
§ Force application using Personal Credentials
§ Force application option only available for
Real time view
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 106
Monitor Applications – Utilities IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 107
Monitor Applications – Utilities event monitor IBM Db2 - Data Management Console
Back to Table of Contents
Requires Utility Event Monitor
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 108
Monitor Applications – Units of work (UOW) IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 109
Indicates what transactions (units of work) are consuming the most resources in the data server
Monitor Throughput – Connection summary IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 110
Displays a summary of all connections established to the console
Monitor Throughput – Partition summary IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 111
Displays the information for each data partition used by a database
Monitor Throughput – WLM workload summary IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 112
Represents the accumulation of all metrics for requests that were submitted by connections mapped to the identified workload objects
Monitor Throughput – WLM service class summary IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 113
Represents the accumulation of all metrics for requests that have executed under the indicated service subclass
Monitor Throughput – Operating system time spent IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 114
Monitor Memory – Instance memory IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 115
Monitor Memory – Database memory IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 116
Monitor I/O – Buffer pools IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 117
§ Displays the usage of Db2 Buffer Pools and Table Spaces
§ A directory server uses the Db2 buffer pools to store cached data and to improve database performance
§ A buffer pool is associated with a single database and can be used by more than one table space
§ Adequate buffer pool size is essential for good database performance because it reduces the disk I/O,
which uses a considerable amount of time
Monitor I/O – Prefetchers IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 118
Monitor I/O – Logging performance IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 119
Monitor Storage – Table performance IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 120
Displays the performance data of each table or each schema
Monitor Storage – Storage IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 121
Displays the storage usage data of each table or each schema
Monitor Storage – Table space performance IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 122
Monitor Storage – Table space utilization IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 123
Monitor Workload Management IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 124
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=console-min-db-privileges-required-db2
User connecting to the monitored database
requires to have additional privilege
Db2 Data Management Console
Data
Back to Table of Contents
Data IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 126
• Generate DDL
• Generate SQL
• Object dependency
• Object level privilege
• Table-like object
• Browse data
Data – Tables IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 127
Data – Views IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 128
Data – Indexes IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 129
Data – Remote tables IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 130
Data – Aliases IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 131
Data – MQTs IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 132
Data – Schemas IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 133
Data – Sequences IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 134
Data – Storage Objects – Table spaces IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 135
Data – Storage Objects – Buffer pools IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 136
Data – Application Objects – Stored procedures IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 137
Data – Application Objects – User-defined Types IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 138
Data – Application Objects – User-defined Functions IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 139
Data – Authorization IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 140
Data – Workloads IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 141
Data – Configuration – Instance IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 142
Make the change
Save to apply the changes
Data – Configuration – Database IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 143
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-updating-configuration-parameters
Make the change
Save to apply the changes
Db2 Data Management Console
SQL Editor
Back to Table of Contents
Integrated SQL Editor IBM Db2 - Data Management Console
• Check SQL syntax
• Requires Personal Credential to run statements
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 145
Filter database objects
Save or export query for later use (script)
Explain SQL statement (Visual Explain) Tune SQL statement (Query Tuning)
Search/Replace in the SQL text panel
Right click for additional options
Editor/Builder
Run SQL – Editor IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 146
Right click on table name
Select the statement
Generated query
Run query
Run SQL – Editor IBM Db2 - Data Management Console
• List of scripts
• History
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 147
Run SQL – Visual Explain IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 148
§ The Db2 EXPLAIN command will try to use the explain tables
under the user connected to the database.
§ If there is no explain tables under that user, then DB2 will try to
use the explain tables under the SYSTOOLS schema, and the
user connected to the database needs to have the
INSERT/SELECT privileges for all the explain tables under
SYSTOOLS.
Run SQL – Builder IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 149
Drag and drop tables
Create join
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=sql-using-builder
Db2 Data Management Console
Query Tuning
Back to Table of Contents
Query Tuning IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=welcome-tuning
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 151
§ Format and annotate the statement
§ Generate access plan graph
• Access plan graph describes both the operational details of query execution and how the data flows
• A leaf node of an access plan graph is either a table node or an index node that represents a data source in the query execution plan
• Typically a table node is at the bottom of the graph, and the access plan proceeds upward from there
§ Recommend RUNSTATS commands
• Generated by the Statistics Analyzer
• Lists all the tables that are accessed by the queries in the single-query or workload that are tuned and recommended actions for
updating their associated catalog statistics
§ Recommend new indexes
• The Storage comparison chart, Performance comparison chart, and Index recommendations table are displayed
• The Storage comparison chart and Performance comparison chart provide a comparison between the original cost and the after-
change cost if index recommendations are applied
Query Tuning – Creating a Tuning Task IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=tuning-creating-task
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 152
3 ways to create a tuning task
§ From Run SQL Editor
§ From any of Statement tabs
§ From Notification Center
Tune query when one statement is selected
Tune workload when more than one statements are selected
Query Tuning – Tuning Task definition IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 153
Tuning task name
Tuning options
Set values for Db2 special registers (EXPLAIN
options), used by Db2 to create an access plan
List of e-mails to receive notifications
Query Tuning – View Results IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 154
Tuning task name
Tuning Menu
Db2 Data Management Console
Replication
Back to Table of Contents
Replication IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 156
§ Available in V3.1.9 or later
§ Enhancements in V3.1.10
• Enhanced throughput chart to use bar chart format
• Introduced the following tabs in throughput chart for displaying the Q capture and Q depth details
v Capture throughput Capture throughput
Ø Number of rows that are sent from the source table
v Capture Q depth
Ø Number of messages on the transmission queue that are associated with the send queue
v Apply throughput Apply throughput
Ø Number of rows that are applied to the target table
v Apply Q depth
Ø Number of messages on the receive queue.
• Enhanced latency chart with an interactive legend
• Improved performance on latency and throughput charts by reducing the data points and fetch time
• Improved Replication home page load speed and performance
• Added 15-minutes time interval in the monitoring group details page
• Introduced bidirectional configuration type option for creating a monitoring group
Replication – Monitoring Group IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=replication-creating-monitoring-group
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 157
Data retrieval frequency to determine how often the console must refresh in
the replication monitoring page
Note: The console reads the monitoring information that the Q Capture and Q
Apply program insert into their control tables. If you need granular monitoring
information, you must set a low value for the Q Capture, and Q Apply
monitor_interval parameters to enable the programs to update the
performance information more frequently
Name of the monitoring group to be created
Optional: Short description of the monitoring group
Replication – Database Server IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 158
Database connection profile that corresponds to the database server
Test connection to validate the connection to the selected connection profile
Replication – Schema IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 159
Select the schema that identifies the Q Capture or Q Apply program that you
are interested in monitoring.
Note: The console automatically detects all the schemas that are created on
the selected connection profile for Q Capture or Q Apply program. You can
select a single schema.
Replication – Configurations IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 160
Select the QMAP configurations
Note: The console automatically detects all the QMAP configurations on the
connection profile for the selected schema. You can select a single or multiple
configurations.
Replication – Map Aliases IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 161
Connection profile for the other end of the selected QMAP configuration
Note: If you selected the QMAP configuration from DBSAMP1 to DBSAMP2
in the previous step, you must select the DBSAMP2 connection profile
Test connection to validate the connection to the selected connection profile
Replication – Summary IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 162
Connection profile for the other end of the selected QMAP configuration
Note: If you selected the QMAP configuration from DBSAMP1 to DBSAMP2
in the previous step, you must select the DBSAMP2 connection profile
Test connection to validate the connection to the selected connection profile
Review the information and click on Create button
Replication – Monitoring IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 163
Click on Monitoring group name to see data
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=replication-monitoring
Replication – Monitoring IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 164
Click on Consistency group name to see data
Replication – Monitoring IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 165
Click on Consistency group name to see data
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=replication-monitoring
Average
The end-to-end latency is the average time per transaction between commit at the
source by the application and commits at the target by the replication process. The
details page for each replication set depicts latency with a multicolored graph that gives
you an at-a-glance view of the different types of replication latency.
Queue latency
The average elapsed seconds between the time that messages are put on the send
queue and the time that the target apply program gets them from the receive queue.
This statistic includes the time that transactions were waiting in the receive queue of
the target system, and is not necessarily a reflection of network performance.
Apply latency
The average elapsed milliseconds that it takes the replication programs at the target to
read transactions and commit them to target tables. This statistic includes the database
latency.
Point-in-time latency
The average elapsed milliseconds per transaction between the time that the first row
change for a replicated transaction was applied at the target database and the time that
the transaction was committed at the target database. This statistic indicates the
performance of Db2® at the target system.
Capture latency
The average elapsed milliseconds between the time transactions were committed to the
source table by the application and the time that the transactions were put on the
transmission queue for transport to the target. It indicates the performance of the log
capture process. If you suspend replication, this number is high on restart because the
capture process is reading older logs.
Consistency point
It shows the Consistency point of transactions at the
target for the active tables in the replication set, which
helps you determine how caught up replication at the
target is regarding database activity at the source. It is
the source commit time for which all transactions to
that point were applied to the target.
The graph also displays whether the replication set is
active, and then breaks down activity by table to show
which tables in the set are active, which tables have
errors, and the status of target table loading activity.
Throughput
The number of insert, update, and delete operations per second that were applied to
the target for all tables in the replication set.
The graph breaks down throughput into two categories:
Capture throughput
The number of rows per second that were sent from the source during the sampling
interval.
You can see the table details at the bottom of the page. The table name, schema,
alert, and status are shown in the table. If the table is in error state, the alert column
will show the error details. There is a filter, which can be used for filtering out the
tables based on their status.
Apply throughput
The number of rows per second that were applied at the target during the sampling
interval.
Db2 Data Management Console
Additional Features
Back to Table of Contents
Reporting IBM Db2 - Data Management Console
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=monitoring-creating-monitor-reports
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 167
§ Database performance
• Information on the overall status of each database and analyze the usage of key metrics in the database, such as CPU, memory,
storage, throughput, SQL statements and more
§ Enterprise trends
• Information about the top ten representative databases that use the most CPU, memory, storage, and log space resources
• It is compiled from data in the representative databases which can be used to evaluate the usage trends in those resource categories
§ Top statements
• Details on the monitoring metrics of top N SQL statements
• The monitoring data is retrieved from package cache
§ Table usage
• Details on the top n table objects and related key metrics information
§ Disk space usage
• Information on the storage usage of the database
Report name
Connection profile name
Reporting IBM Db2 - Data Management Console
Select metrics for the report
* A shorter interval
equates to higher
graph detail
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 168
Summary Page
Click on Finish
Reporting – Scheduling IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 169
Reporting – View Results IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 170
§ Active
• Definition of reports and all scheduled reports
• The on-demand reports are automatically deleted when the execution is complete
§ Completed
• The completed data table displays the execution results of all scheduled and on-demand reports
Reporting – Pruning IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 171
Prune Reports
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=reports-pruning-report
§ Prune by status
• Prune report data based on execution status
v Keep succeed report records keeps 7 days of succeeded report records by default
Ø Data pruning success reports include the reports with Success, Stopping, or Warning status
v Keep failed report records keeps 30 days of failed report records by default
Ø Data pruning failed reports include the reports with Error status
Note: All other reports cannot be pruned, for example, reports with Running status
§ Prune by schedule
• Prune report data based on job schedule type
v Keep hourly records keeps 30 days for report records for scheduled by hourly by default
v Keep daily records keeps 90 days for report records for scheduled by daily by default
v Keep weekly records keeps 180 days for report reports for scheduled by weekly by default
v Keep monthly records keeps 360 days for job records for scheduled by monthly by default
v Keep annually records keeps 720 days for report records for scheduled by annually by default
v Keep on demand records keeps 30 days for job records for on demand by default
§ Prune by the number of records
• Prune report data based on report record number and run number for each report
v Keep record for keeps 30 days for all records by default
v Keep run records for each report keeps last 12 run records for each report by default
Note: The report data is pruned only if both rules are satisfied
§ Disable pruning
• Disable report data pruning
Note: Disabling pruning keeps all the records indefinitely. This increases the overhead and impacts storage capacity
and performance
The console scans the report data periodically in the background and prunes report data history.
The default scan time is in 24:00:00 for console server time.
The console pruning scan time can be modified in the configuration file as follows:
a.) Go to the folder <dmc_home>/Config/dswebserver_override.properties
b.) Add or modify the following parameter 'pruning_start_time = {HH}:{MM}:{SS}'
where, {HH}:{MM}:{SS} is the console server time, for example:'pruning_start_time = 14:13:30’
c.) Restart the console server
Blackout – Web UI IBM Db2 - Data Management Console
Back to Table of Contents
Used to avoid a database connection from DMC to the monitored
database, or disabling some of the functions such as monitoring and
alerting during database maintenance window
3 Types of Blackout
§ Full blackout
v Disconnects databases from console
§ Monitor and alert blackout
v Pauses monitoring and alerts for databases. The monitor does
not collect metric data and the alert are not generated.
§ Alert blackout
v Pauses only alerts for databases. The alerts are not generated.
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-blackouts
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 172
Blackout – Pruning IBM Db2 - Data Management Console
Back to Table of Contents
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=blackouts-pruning
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 173
§ Prune by status
• Prune blackouts based on blackout execution status
v Keep succeed blackout records keeps 7 days of succeeded blackout records by default
Ø Data pruning success blackout includes blackouts with Success, Stopping, or Warning status
v Keep failed blackout records keeps 30 days of failed blackout records by default
Ø Data pruning failed blackout includes blackouts with Error status
Note: All other blackouts cannot be pruned, for example, blackouts with Running status
§ Prune by schedule
• Prune blackouts based on blackout schedule type
v Keep daily records keeps 90 days for blackout records for scheduled by daily by default
v Keep weekly records keeps 180 days for blackout records for scheduled by weekly by default
v Keep monthly records keeps 360 days for blackout records for scheduled by monthly by default
v Keep on demand records keeps 30 days for blackout records for on demand by default
§ Prune by the number of records
• Prune blackouts based on blackout record number and run number for each blackout
v Keep record for keeps 30 days for all blackouts by default
v Keep run records for each blackout keeps last 12 run records for each blackout by default
Note: The blackout is pruned only if both rules are satisfied
§ Disable pruning
• Disable blackout data pruning
Note: Disabling pruning keeps all the records indefinitely. This increases the overhead and impacts storage capacity
and performance
Prune Blackouts
The console scans the blackout data periodically in the background and prunes blackout data history.
The default scan time is in 24:00:00 for console server time.
The console pruning scan time can be modified in the configuration file as follows:
a.) Go to the folder <dmc_home>/Config/dswebserver_override.properties
b.) Add or modify the following parameter 'pruning_start_time = {HH}:{MM}:{SS}'
where, {HH}:{MM}:{SS} is the console server time, for example:'pruning_start_time = 14:13:30’
c.) Restart the console server
Blackout – REST API IBM Db2 - Data Management Console
Back to Table of Contents
§ Does not support scheduling a blackout event
§ You can setup a cronjob to enable and disable a blackout
event by calling the RESTful APIs
§ While setting a blackout event for a connection profile,
every HADR/pureScale profile is considered as a common
profile and the blackout event is set one at a time
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 174
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=apis-configuring-blackout-event-rest-api
Jobs IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 175
Create a job
Prune jobs
History
Job Chain
Jobs – Creating a Job 1/3 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 176
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-creating-scheduling-jobs
§ SQL script
• The job manager connects to the database and runs the SQL commands that are included in the job script directly on
the database
§ CLP and shell script
• The job manager uses SSH to log in to the database server as the user ID that is defined in the database connection,
and then runs the command line processor commands directly on the Db2 console of the server
• Not supported on container-based Db2 products
Note: To run the Db2 CLP script jobs on a database, the user ID that is used to run the job must have permission to log in to the
database server by using SSH. Ensure to specify the complete path if you want to read or execute files by using CLP script because the
console might not receive the environment variable from the Db2 server.
Job name
Job Status
§ Error - Job execution returns an error
§ Stopped - Job execution is terminated or stopped due to timeout
§ Success - Job execution succeeds
§ Warning - Job execution succeeds with warning
Copy statement
Format SQL statement
Job code
Jobs – Creating a Job 2/3 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 177
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-creating-scheduling-jobs
Credential Type
Select database(s)
Jobs – Creating a Job 3/3 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 178
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-creating-scheduling-jobs
Summary Page
Click on Finish
Jobs – Running On-demand Jobs IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 179
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-creating-scheduling-jobs
View options
Jobs – History IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 180
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-creating-scheduling-jobs
View options
Status
Jobs – Status IBM Db2 - Data Management Console
Back to Table of Contents
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-job-status
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 181
Jobs – Pruning Jobs IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 182
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-pruning-job
View options
Prune jobs
§ Prune by status
• Prune jobs based on job execution status
v Keep succeed job records keeps 7 days of succeeded job records by default
Ø Data pruning success job includes jobs with Success, Stopping, or Warning status
v Keep failed job records keeps 30 days of failed job records by default
Ø Data pruning failed job includes jobs with Error status
Note: All other jobs cannot be pruned, for example, jobs with Running status
§ Prune by schedule
• Prune jobs based on job schedule type
Ø Keep minutes records keeps 7 days for job records for scheduled by every minute by default
Ø Keep hourly records keeps 30 days for job records for scheduled by hourly by default
Ø Keep daily records keeps 90 days for job records for scheduled by daily by default
Ø Keep weekly records keeps 180 days for job reports for scheduled by weekly by default
Ø Keep monthly records keeps 360 days for job records for scheduled by monthly by default
Ø Keep on demand records keeps 30 days for job records for on demand by default
§ Prune by the number of records
• Prune jobs based on job record number and run number for each job
v Keep record for keeps 30 days for all jobs by default
v Keep run records for each job keeps last 12 run records for each job by default
Note: The job is pruned only if both rules are satisfied
§ Disable pruning
• Disable job data pruning
Note: Disabling pruning keeps all the records indefinitely. This increases the overhead and impacts storage
capacity and performance
The console scans the job data periodically in the background and prunes job data history.
The default scan time is in 24:00:00 for console server time.
The console pruning scan time can be modified in the configuration file as follows:
a.) Go to the folder <dmc_home>/Config/dswebserver_override.properties
b.) Add or modify the following parameter 'pruning_start_time = {HH}:{MM}:{SS}'
where, {HH}:{MM}:{SS} is the console server time, for example:'pruning_start_time = 14:13:30’
c.) Restart the console server
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-updating-job-chain
Job Chain – Creating a Job Chain 1/4 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 183
Job chain name
Job Chain Status
§ Error – Job Chain execution returns an error
§ Stopped - Job Chain execution is terminated or stopped due to timeout
§ Success - Job Chain execution succeeds
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-updating-job-chain
Job Chain – Creating a Job Chain 2/4 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 184
Main Job
Run Condition Success Run Condition Success
§ You can combine the job nodes into a job chain. Each job that you add to the chain
is triggered based on the run condition that is set for each node
§ To add a node, click the overflow menu
§ To edit an existing node, click the node and view the properties on the right panel
Overflow menu
Properties
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-updating-job-chain
Job Chain – Creating a Job Chain 3/4 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 185
Credential Type
Select database(s)
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-updating-job-chain
Job Chain – Creating a Job Chain 4/4 IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 186
Summary Page
Click on Finish
Job Chain – Running On-demand Job Chain IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 187
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-updating-job-chain
View options
Job Chain – Pruning Job Chain IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 188
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=chain-pruning-job
Prune job chain
§ Prune by status
• Prune job chains based on job execution status
v Keep succeed job chain records keeps 7 days of succeeded job records by default
Ø Data pruning success job includes jobs with Success, Stopping, or Warning status
v Keep failed job chain records keeps 30 days of failed job records by default
Ø Data pruning failed job chain includes job chains with Error status
Note: All other job chains cannot be pruned, for example, job chains with Running status
§ Prune by schedule
• Prune job chains based on job schedule type
v Keep minutes records keeps 7 days for job chain records for scheduled by every minute by default
v Keep hourly records keeps 30 days for job chain records for scheduled by hourly by default
v Keep daily records keeps 90 days for job chain records for scheduled by daily by default
v Keep weekly records keeps 180 days for job chain records for scheduled by weekly by default
v Keep monthly records keeps 360 days for job chain records for scheduled by monthly by default
v Keep on demand records keeps 30 days for job chain records for on demand by default
§ Prune by the number of records
• Prune jobs based on job chain record number and run number for each job chain
v Keep record for keeps 30 days for all job chains by default
v Keep run records for each job keeps last 12 run records for each job chain by default
Note: The job chain is pruned only if both rules are satisfied
§ Disable pruning
• Disable job chain data pruning
Note: Disabling pruning keeps all the records indefinitely. This increases the overhead and impacts storage
capacity and performance
The console scans the job chain data periodically in the background and prunes job chain data history.
The default scan time is in 24:00:00 for console server time.
The console pruning scan time can be modified in the configuration file as follows:
a.) Go to the folder <dmc_home>/Config/dswebserver_override.properties
b.) Add or modify the following parameter 'pruning_start_time = {HH}:{MM}:{SS}'
where, {HH}:{MM}:{SS} is the console server time, for example:'pruning_start_time = 14:13:30’
c.) Restart the console server
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=welcome-working-apis
RESTful Services APIs Support IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 189
REST API – Examples IBM Db2 - Data Management Console
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 190
TOKEN=$(curl -X POST 
http://localhost:11080/dbapi/v4/auth/tokens 
-H 'content-type: application/json' 
-d '{"userid":"admin","password":"admin"}' 
| jq -r '.token'
)
echo $TOKEN
TOKEN=$(curl --silent --insecure -X POST 
http://localhost:11080/dbapi/v4/auth/tokens 
-H 'content-type: application/json' 
-d '{"userid":”’admin’”,”password":”’admin'"}' 
| jq -r '.token'
)
BLACKOUTSTATUS=$(curl --silent --insecure -X PUT 
http://localhost:11080/dbapi/v4/dbprofiles/blackout/SAMPLE 
-H 'authorization: Bearer '$TOKEN 
-H 'content-type: application/json' 
-d '{"blackout":"'$BLACKOUT'"}'
)
Getting a token
Setting up blackout
Back to Table of Contents
TOKEN=$(curl --silent --insecure -X POST 
http://localhost:11080/dbapi/v4/auth/tokens 
-H 'content-type: application/json' 
-d '{"userid":”’admin'","password":”’admin’"}' 
| jq -r '.token’
)
STORAGESTATUS=$(curl --silent --insecure -X $PARAMETER 
http://localhost:11080/dbapi/v4/monitorprofile/front/config/tablestorage 
-H 'accept: application/json' 
-H 'authorization: Bearer '$TOKEN 
-H 'content-type: application/json;charset=utf-8' 
-d '{"enabled":”’POST'","include_sys":"false","max_rows_read":5000,"schedule_rule":"0 0 12 * * ?"}'
)
Disabling Storage Query
Requires jq command installed on the machine
Audit Logging IBM Db2 - Data Management Console
§ Audit event types
• All successful and unsuccessful login attempts
• All logoff attempts
• Attempts to perform unauthorized functions
• Activities performed by admin accounts
• Attempts to update console settings
• Connection profile privilege management audit
§ Audit storage methods
• Db2 Data Management Console's repository
v AUDIT_LOG table (Default)
Ø Two columns
q TIMESTAMP which is the timestamp in milliseconds since Jan 1 00:00, 1970
q LOG which is the audit record
• Server's file system
v audit.* under <dmc installation dir>/logs directory
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 191
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=apis-audit-logs
Audit REST API IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 192
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=logs-configuring-audit
§ You can view and update audit settings using APIs
§ The settings are saved in the repository table named AUDIT_CONFIG
§ Audit settings are configured dynamically, and are effective when the API is called successfully
§ Audit setting APIs are available in two groups
• one group is to return or update settings individually
• one group is to return or update settings collectively or as a whole
§ By default, when the Audit APIs are called, the console uses the repository connection credential to perform Auditing
actions. If additional security is added to SELECT or UPDATE of AUDIT_CONFIG table, and the credential used is different
from the repository connection credential, then, an optional input parameter to the API can be used to pass in the security
credential.
Db2 Data Management Console
dmctop
Back to Table of Contents
dmctop – Key Features IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 194
§ Sessions
• See at a glance which connections are active, blocked, or idle
• Drill down on a connection to see details of the current state of execution of SQL that is in question
§ Running SQL
• See a list of recently run statements
• Drill down is provided to see the full SQL text or run explain on a statement
§ Top Consumers
• Find which connections or activities are consuming the most CPU, IO or other resource
§ Time spent
• Shows a breakdown of where the monitored database is spending time broken down to the full
granularity provided by Db2
§ pureScale performance
• See Db2 pureScale performance metrics and cache facility state
§ HADR status
• See primary and standby database HADR configuration state
§ Federation
• View federated activity for the federated database
dmctop – Download and Installation IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 195
§ Simple text-based tool for monitoring, similar to the
dsmtop and db2top
§ Can monitor Db2 V11.1 and above
§ Beginning with IBM Db2 Data Management Console v3.1.5,
dmctop v1.0.2 is bundled with Db2 v11.5.6
§ Download the latest dmctop at IBM Fix Central
§ Supported only on Power® 8 and later processors
§ Setting up dmctop
• https://www.ibm.com/docs/en/db2-data-mgr-
console/3.1.x?topic=dmctop-setting-up
§ dmctop manual
• https://ibm.github.io/dmctop-wiki/
dmctop – Comparing dmctop and db2top IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 196
Improvements and new features
§ Default secured connection (SSL) support
§ Support for Db2 features including pureScale, BLU (column store tables) and workload management
§ Monitor remote database
§ Monitor federated database
§ Easier navigation with menus, view specific help available in the footer section
§ Reset baseline, hide idle connections, visual alerts, spanning view across multiple monitors
Running dmctop IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 197
§ Running dmctop from Db2 server
• When running on database server, dmctop
connects to local database without requiring
credentials
• Uses existing ODBC driver on the server hence
installation of separate ODBC driver is not required
Ø Note: Db2 v11.5.5. databases only contain
dmctop v1.0.0.0 on Linux and Windows
operating systems
1) Copy dmctop on server under the desired location
Ø Note: If you want to use dmctop v1.0.0.0 for
Db2 v11.5.5. databases, skip step1 and go
directly to step 2
2) Run the dmctop
v For Linux/AIX/MacOS
dmctop -d SAMPLE
v For Windows
dmctop.exe -d SAMPLE
§ Running dmctop remotely
• The easiest way to run dmctop is to fully specify the database and
user credentials
• dmctop utility will use the CLI driver
• For Linux/AIX/MacOS
v dmctop -d <database_name> -n <host_name> -r
<port_number> -u <user_id> [-cert-path Root-CA certificate
absolute path]
• For Windows
v dmctop.exe -d <database_name> -n <host_name> -r
<port_number> -u <user_id> [-cert-path Root-CA certificate
absolute path]
• For example
v For Linux/AIX/MacOS
dmctop -d SAMPLE -n localhost -r 50000 -u db2inst1
v For Windows
dmctop.exe -d SAMPLE -n localhost -r 50000 -u db2inst1
Running dmctop IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 198
§ Run dmctop in background mode
• When using the -b parameter, saves information to file in CSV format
• Issuing multiple sub-options for background mode (-b) is not supported
• The -b parameter takes one of the following single character sub-option values
v d - overview
v l - connections
v a - top consumer activities
v J - Skew monitor
v s - in-flight statements
v D - Package cache
v L - Lock statistics
v m - DB memory
v I - Instance memory
v F - Federation
v A - HADR
• For example
v Using default file name
Ø For Linux/AIX/MacOS
dmctop -d SAMPLE -n localhost -r 50000 -u db2inst1 -
insecure -b d
Ø For Windows
dmctop.exe -d SAMPLE -n localhost -r 50000 -u db2inst1 -
insecure -b d
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=dmctop-setting-up
v Specifying output file name
Ø For Linux/AIX/MacOS
dmctop -d SAMPLE -n localhost -r 50000 -u db2inst1 -insecure -b d -f
<outputFile>.csv
Ø For Windows
dmctop.exe -d SAMPLE -n localhost -r 50000 -u db2inst1 -insecure -b d -f
<outputFile>.csv
dmctop IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 199
dmctop – Shortcuts IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 200
Use shortcuts to drill down information
Db2 Data Management Console
Configuration Files
Back to Table of Contents
Configuration Files – Config directory IBM Db2 - Data Management Console
Back to Table of Contents
Configuration files are located under <dmc_home>/Config directory
§ dswebserver_override.properties
• Overrides the configuration in dswebserver.properties file
• Not changed during DMC upgrade
• Console hostname, ipaddress, URL
• Authentication Configuration (SuperAdmin, LDAP, Repository Database)
• e-mail configuration (e-mail host, port number, e-mail address)
§ dswebserver.properties
• Overwritten during DMC upgrade
• Contains the current DMC version (build and release)
• 10.01 support enabled/disabled
§ ext_ldap_config_v2.json
• LDAP configuration information when LDAP authentication is used
§ metadb_override.properties
• Overrides the configuration in metadb.properties file
• Not changed during DMC upgrade
• Repository database information (host, port number, database name)
§ metadb.properties
• Overwritten during DMC upgrade
• Repository database internal information
§ monitorProfile directory
• Default configuration when creating new monitoring profiles
§ product directory
• about.properties file
• License files
§ Configuration files for logging
• admin_log.properties
• alert_log.properties
• deletedDBData_log.properties
• diagnosis_log.properties
• DS_System_log.properties
• explain_log.properties
• fixnow_log.properties
• home_log.properties
• LOAD_log.properties
• monitor_log.properties
• repoUtil_log.properties
• runsql_log.properties
• sample_log.properties
• setup_log.properties
• tuning_log.properties
• UserUtils_log.properties
Relevant information only, do not to
change the contents, unless requested
by development or DMC manual
§ server.crt and server.key
• Original certificate to be used for SSL configuration
• Recommended to be changed by using the steps from
https://www.ibm.com/docs/en/db2-data-mgr-
console/3.1.x?topic=securing-enabling-https-db2-data-
management-console
§ SSLConfig.xml
• SSL configuration
§ TLSOnlyConfig.xml
• TLS configuration sslProtocol="TLSv1.2"
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 202
Additional Configuration Files IBM Db2 - Data Management Console
Back to Table of Contents
Under <dmc_home>/wlp/usr/servers/dsweb
§ bootstrap.properties
• Port numbers
v port=11080
v https.port=11081
v job.http.port=11088
v internal.port=11082
• SSL configuration
v https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-enabling-https-db2-data-management-console
• Ciphers
§ jvm.options
• Contains the JVM configuration, memory allocation for the DMC java process
v -Xms (start)
v -Xmx (maximum)
• Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-resolving-out-memory-errors
§ server.env
• WLP_OUTPUT_DIR dump files directory configuration
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 203
Relevant information only, do not to
change the contents, unless requested
by development or DMC manual
Db2 Data Management Console
Log Files
Back to Table of Contents
Log Files IBM Db2 - Data Management Console
Back to Table of Contents
§ Configuration files for logging located under <dmc_home>/Config directory
§ Log files are located under <dmc_home>/logs directory
§ DMC start is required after changing the logging property files
§ Circular logging
§ Parameters
• MaxEdition
v Default 4
v Starts from 0, where 0 is the most recent data
• MaxFileSizeInM
v Default 10
v Size in megabites
• LogInitialLevel
v Default 6
v Frequently used
Ø LOG_ERROR = 2
Ø LOG_WARNING = 4
Ø LOG_INFO = 6
Ø LOG_DEBUG = 9
Ø LOG_TRACE = 13
Component Property File Log File
Admin admin_log.properties admin.0
Alert alert_log.properties alert.0
deletedDBData_log.properties deletedDBData.0
diagnosis_log.properties diagnosis.0
General DS_System_log.properties DS_System.0
Explain explain_log.properties explain.0
fixnow_log.properties fixnow.0
home_log.properties home.0
LOAD_log.properties LOAD.0
monconn_log.properties monconn.0
Monitor monitor_log.properties monitor.0
Repository repoUtil_log.properties repoUtil.0
Run SQL runsql_log.properties runsql.0
sample_log.properties sample.0
Setup setup_log.properties setup.0
Query Tuning tuning_log.properties tuning.0
UserUtils_log.properties UserUtils.0
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 205
Additional Ways to Change Log Level IBM Db2 - Data Management Console
Back to Table of Contents
Logs level can also be changed by
§ logUtils.sh script
Additional info
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-customizing-trace-log-settings
§ Logger REST API
curl –X PUT ‘SCHEME://HOST:PORT/<component>/logger’ 
-H ‘Authorization: Bearer {getting_a_token}’ 
-H ‘cache-control: no-cache’-H ‘content-type: application/jason’ 
-d ‘{“loggerName”:”<component>”,”logLevel”:”13”,”maxFileSize”:”10”,”editions”:”4”, “enableRolling”:”true”}’ –k
Where
• component: dbapi/v3, admin, monitor, run_sql
• Parameters
v loggerName is a must, accepted values are DS_System, admin, monitor, runsql
v logLevel: logger level, accepted values are 2, 4, 6, 9, and 13
Ø LOG_ERROR = 2
Ø LOG_WARNING = 4
Ø LOG_INFO = 6
Ø LOG_DEBUG = 9
Ø LOG_TRACE = 13
v enableRolling: Whether to enable the rolling log – true or false
v maxFileSize: Maximum size of rolling log files (MB)
v editions: Maximum number of rolling log files
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 206
Additional Log Files IBM Db2 - Data Management Console
Back to Table of Contents
§ messages.log file
• Under <dmc_home>/logs directory
• Show status of DMC server
• Last date and time that the server was started
§ ffdc directory
• The FFDC (First Failure Data Capture) directory preserves the information that is generated from a processing failure used by
IBM Support
• You can remove the FFDC information after investigation
• The dump file is created in the <dmc_home>/work/dsweb directory. If you modify the WLP_OUTPUT_DIR attribute in
server.env, the dump file will be stored in <WLP_OUTPUT_DIR>/dsweb directory. You can remove the dump files (javadump,
core, heapdump etc.) after investigation
§ Job Scheduler Server log files
• Under <dmc_home>/addons/job-scheduler/logs
§ Dr S log files
• Under <dmc_home>/addons/drs/drs-agent/logs
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 207
Db2 Data Management Console
dsutil Files
Back to Table of Contents
dsutil/bin Files – Utilities directory IBM Db2 - Data Management Console
Back to Table of Contents
Script files under <dmc_home>/dsutil/bin directory
§ crypt.sh
• Encrypt password
• Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=installation-customized-
product-setup
§ deleteRepoData4DeletedConnection.sh
• Clean up monitor data for deleted database connections
• Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-cleaning-up-
monitor-data-deleted-connections
§ deleteRepoData_expired.sh
• Clean up monitor data for deleted database connections
• Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-deleting-expired-
monitor-data
§ enable_setup_admin.sh
• Reset the authentication configuration settings back to the SuperAdmin user during the
installation
• Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=configuration-resetting-
authentication
§ libertyCertsCrypt.sh
• Encrypt SSL certificate password
• Additional information
• https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-enabling-
https-db2-data-management-console
§ logUtils.sh
• Change log level script
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 209
§ repoUtil.sh
• Resolving transaction log for the database is full error
• Additional information
• https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-resolving-
transaction-log-database-is-full-error
§ retrieveAdminCred.sh
• Retrieve SuperAdmin credentials
§ setupRepo.sh
• Avoid LOB errors when setting up DMC repository database
• Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-resolving-transaction-
log-database-is-full-error
§ changeRepoDbUserPWD.sh
• Change password for the userid connecting to the repository database
• Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-resetting-
repository-user-password
Relevant information only, do not to
change the contents, unless requested
by development or DMC manual
dsutil/bin/pre_req_script Files – Utilities directory IBM Db2 - Data Management Console
Back to Table of Contents
Script files under <dmc_home>/dsutil/bin/pre_req_script directory
§ dmc sub-directory
• aix_bash_check.sh
v Check if bash is enabled on AIX only
• check_dmc_server.sh
v Check if the server has enough resources according to the DMC capacity planning
• check_dmc_capacity.sh
v Called by check_dmc_server.sh script
§ monitor_db sub directory
• aix_bash_check.sh
v Check if bash is enabled on AIX only
• check_mon_db.sh
v Check required AIX bash if applicable
v Check DB configuration for minimum requirements to collect monitor statistics
v Check userid for minimum required object privileges
• check_monitor_dbcfg_with_auth.sh
v Check target database to ensure database configuration parameters meet the
minimum requirements to collect monitor statistics
• grant_mondb_min.sh
v Grant the user minimum object privileges on a restrictive monitoring database
v Exceptions
1) user issuing job cancellation may require higher privileges.
2) user running REORG or RUNSTAT in tuning may require higher privileges
• verify_mondb_min.sh
v Verify if the user meets minimum required privileges on the monitored database
§ repository sub-directory
• aix_bash_check.sh
v Check if bash is enabled on AIX only
• check_repo_capacity.sh
v Check CPU, memory, and disk space for the repository database
• check_repo_config.sh
v Check required repository database configuration
• check_repo_server.sh
v Check if the user has required privileges for the repository database
• create_repodb.sh
v Create the repository database
• create_repo_objects.sh
• create_repo.sh
v Check requirements and create repository database
Ø check_repo_config.sh
Ø create_repo_objects.sh
Ø create_repodb.sh
Ø create_repo_objects.sh
Ø create_repodb.sh
• grant_repodb_min.sh
v Grant the user minimum object privileges on the repository database
• verify_repodb_min.sh
v Script to verify if a user on repodb database meets minimum required object
prilvileges
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 210
Relevant information only, do not to
change the contents, unless requested
by development or DMC manual
Db2 Data Management Console
Common issues
Back to Table of Contents
Out of Memory Errors IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 212
§ Symptoms
• DMC server runs for a while and it gets unresponsive or has unpredictable behavior
§ Causes
• By default, the Java virtual manager that is installed with IBM Db2 Data Management Console uses up to a certain amount of
memory. The memory that is needed to monitor databases depends on the monitoring profile settings and the number of databases
being monitored. If the memory that is needed to monitor databases is significant, you will see out-of-memory errors.
§ Diagnosing the problem
• Investigate the resources available to the server according to the Capacity Planning
• Make sure that you have enough resources available for DMC server, increasing the configuration but not having enough memory
available, DMC server will crash again
§ Resolving the problem
• 2 ways to change JVM configuration
v Web UI Administration à Settings à JVM, if the DMC server is not down
v Edit the <dmc_home>/ wlp/usr/servers/dsweb/jvm.options file
• Default JVM configuration
v -Xms512m
v -Xmx2048m
• Modify the default JVM options for the initial (Xms) and maximum (Xmx) heap size values for memory allocation
• Restart DMC server
Additional information
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-resolving-out-memory-errors
https://www.ibm.com/support/pages/data-management-console-dmc-server-reports-out-memory-errors
Timestamp conversion IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 213
§ Export data into a flat file (CSV), the timestamp value format in the exported file is unsupported
• Changing the date format
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-changing-date-format-in-excel-reports
§ Timestamp Converter
• https://timestamp.online/
We are here to help!
§ Data Management Console Community page
• https://community.ibm.com/community/user/hybriddatamanagement/blogs/maryia-rakina1/2021/04/21/db2-
data-management-console-product-hub?CommunityKey=ea909850-39ea-4ac4-9512-
8e2eb37ea09a&Tab=groupdetails
§ Help us improve our product using IBM Aha!
• https://ibm-data-and-ai.ideas.ibm.com/?category=7093947472735440072
§ Create a case with IBM Data Management Console Support team
• https://www.ibm.com/mysupport/s/?language=en_US
• Attach screen shots showing the problem
• Provide monitored database name having the issue
• dmccollector
https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-exchanging-information
Questions? IBM Db2 - Data Management Console
Back to Table of Contents
IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 214

More Related Content

TXT
Db2 hadr commands
PDF
Upgrade to IBM z/OS V2.5 Planning
PPT
Db2
PPTX
z/OS SMPE Software Control PART 1 & PART2.pptx
PPT
IBM DB2 LUW UDB DBA Training by www.etraining.guru
PDF
Z4R: Intro to Storage and DFSMS for z/OS
DOC
DB2 utilities
Db2 hadr commands
Upgrade to IBM z/OS V2.5 Planning
Db2
z/OS SMPE Software Control PART 1 & PART2.pptx
IBM DB2 LUW UDB DBA Training by www.etraining.guru
Z4R: Intro to Storage and DFSMS for z/OS
DB2 utilities

What's hot (20)

PPTX
Skillwise JCL
PDF
Ibm db2 interview questions and answers
PDF
Upgrade to IBM z/OS V2.5 technical actions
PDF
Introduction to FOSS
PPT
Zettabyte File Storage System
PDF
PDF
Best practices for DB2 for z/OS log based recovery
PDF
Hypervisors
PPTX
Ibm db2
DOC
Top jcl interview questions and answers job interview tips
PPTX
SKILLWISE-DB2 DBA
PPTX
Datastage to ODI
PPTX
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
PDF
Oracle db performance tuning
PDF
Redefining tables online without surprises
PDF
Tuning Android for low RAM
PPTX
SQLcl overview - A new Command Line Interface for Oracle Database
PDF
Upgrade to 3.1 Planning.pdf
Skillwise JCL
Ibm db2 interview questions and answers
Upgrade to IBM z/OS V2.5 technical actions
Introduction to FOSS
Zettabyte File Storage System
Best practices for DB2 for z/OS log based recovery
Hypervisors
Ibm db2
Top jcl interview questions and answers job interview tips
SKILLWISE-DB2 DBA
Datastage to ODI
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Oracle db performance tuning
Redefining tables online without surprises
Tuning Android for low RAM
SQLcl overview - A new Command Line Interface for Oracle Database
Upgrade to 3.1 Planning.pdf
Ad

Similar to Db2 Data Management Console User Manual - April 2023.pdf (20)

PPT
DB2UDB_the_Basics
PDF
DBA Basics guide
PDF
Db2 tools
PDF
Data Server Manager for DB2 for z/OS
PDF
DB2 10 & 11 for z/OS System Performance Monitoring and Optimisation
PDF
Ibm db2 10.5 for linux, unix, and windows what's new for db2 version 10.5
PPT
MAINVIEW for DB2.ppt
PPTX
Db2 10 memory management uk db2 user group june 2013
PDF
PDF
Db2 and storage management (mullins)
PDF
Db2 10 memory management uk db2 user group june 2013 [read-only]
PDF
Episode 2 Installation Triton Slides
PDF
Ibm db2 10.5 for linux, unix, and windows db2 connect user's guide
PDF
Ibm db2 10.5 for linux, unix, and windows upgrading to db2 version 10.5
PDF
Advantages of migrating to db2 v11.1
PDF
IMS09 ims v14 higlights
PDF
Db2 on cloud overview
PDF
Quick beginning for db2 server
PDF
Dell Storage Management
DB2UDB_the_Basics
DBA Basics guide
Db2 tools
Data Server Manager for DB2 for z/OS
DB2 10 & 11 for z/OS System Performance Monitoring and Optimisation
Ibm db2 10.5 for linux, unix, and windows what's new for db2 version 10.5
MAINVIEW for DB2.ppt
Db2 10 memory management uk db2 user group june 2013
Db2 and storage management (mullins)
Db2 10 memory management uk db2 user group june 2013 [read-only]
Episode 2 Installation Triton Slides
Ibm db2 10.5 for linux, unix, and windows db2 connect user's guide
Ibm db2 10.5 for linux, unix, and windows upgrading to db2 version 10.5
Advantages of migrating to db2 v11.1
IMS09 ims v14 higlights
Db2 on cloud overview
Quick beginning for db2 server
Dell Storage Management
Ad

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Electronic commerce courselecture one. Pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
cuic standard and advanced reporting.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Network Security Unit 5.pdf for BCA BBA.
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
KodekX | Application Modernization Development
PDF
Approach and Philosophy of On baking technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
MYSQL Presentation for SQL database connectivity
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Electronic commerce courselecture one. Pdf
20250228 LYD VKU AI Blended-Learning.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced methodologies resolving dimensionality complications for autism neur...
cuic standard and advanced reporting.pdf
Spectroscopy.pptx food analysis technology
Network Security Unit 5.pdf for BCA BBA.
The AUB Centre for AI in Media Proposal.docx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
KodekX | Application Modernization Development
Approach and Philosophy of On baking technology
Review of recent advances in non-invasive hemoglobin estimation
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf

Db2 Data Management Console User Manual - April 2023.pdf

  • 1. Db2 Data Management Console February 2023 V3.1.10 Cintia Ogura
  • 2. § Introduction • What is Data Management Console • Key Features • Evolution § Installation and Configuration • Supported Db2 offerings and platforms • System Requirements • Capacity Planning • Repository Database • Download and Installation • Home Directory • Required Privileges to Start Data Management Console • Starting, Stopping, Checking Status • Uninstalling Data Management Console • Data Management Console HADR Configuration • E-mail Configuration • SNMP Configuration • JVM Configuration • Repository Database Configuration § Security • Architecture • SSL Certificates • Console Privileges • Authentication Methods v LDAP v Repository Database • Connection Users • Additional Security Parameters • SSH Configuration • Console Port numbers § Monitored Databases • Pre-Setup • HADR Configuration Requirements • Required Privileges • Adding Monitored Databases v Adding Connection Profile v Importing Connections from a file v Adding Connection via REST API v Connection Profile List § Monitoring Profile • Configuration • Data Collection Cycle • Monitor Settings • Alerts v Settings v Notification (Rules) v Custom Alerts v Notification Center Table of Contents IBM Db2 - Data Management Console § Event Monitor • Prerequisites • Event Monitor Profile • Settings • Tablespace • Data Collection Cycle • Administrative Task Scheduler (ATS) • Activity • Locking • Utility • Statistics § Monitoring Databases • Summary Page v Availability v Responsiveness v Throughput v Resource Usage v Contention v Time Spent • Database Page v Database Time Spent v Database Usage • Statements Page v In-flight Executions v Individual executions v Package Cache v Stored Procedures • Locking Page v Blocking and waiting connections v Connection Statistics v Locked objects with waiting connections v Find Locked Objects v Locking event monitor • Applications Page v Top Consumers v Connections v Utilities v Utilities Event Monitor v Units of work (UOW) • Throughput Page v Connection Summary v Partition Summary v WLM Workload Summary v WLM Service Class Summary v Operating System Time Spent • Memory v Instance memory v Database memory • I/O Page v Buffer pools v Prefetches v Logging Performance • Storage Page v Table Performance v Storage v Table space performance v Table space utilization • Workload Management v Workload Management § Data • Tables • Views • Indexes • Remote tables • Aliases • MQTs • Schemas • Sequences • Storage objects • Application objects • Authorization • Workloads • Configuration – Instance • Configuration – Database § SQL editor § Query Tuning § Replication § Additional Features • Reporting • Blackout • Jobs • REST APIs • Auditing § dmctop § Configuration Files § Log Files § dsutil Files § Common issues § Questions? IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 2
  • 3. Db2 Data Management Console Introduction Back to Table of Contents
  • 4. • Provides easy view of performance metrics of Db2 databases, focusing on problematic statements • Keeps historical data for analysis • Sends alerts when a threshold is reached • Runs SQL • Data Explorer • Blackout events • Execute and manage jobs • Query tuning • Replication • Same look and feel for all Db2 databases, no matter where the database is located (cloud, Db2 Warehouse, PureScale, DPF, HADR, CP4D, etc) • Free of charge, no license is required What is Data Management Console? IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 4
  • 5. • Real-time and historical monitoring • Alerts, Custom Alerts and notifications • Monitor Reports • Fully integrated SQL editor • Query Tuning • Replication • Database object exploration and management • Jobs and Scheduler • Blackout • Auditing • Team collaboration • RESTful services APIs support Key features IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 5
  • 6. Db2 Performance Expert InfoShere Optim Performance Manager Data Server Manager Db2 Data Management Console Evolution IBM Db2 - Data Management Console 2001 2015 2019 2010 Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 6
  • 7. Db2 Data Management Console Installation and Configuration Back to Table of Contents
  • 8. On-premises IBM Cloud Cloud Pak for Data Red Hat OpenShift Db2 10.1.0.2 and up IIAS Db2 Big SQL Db2 Db2 Warehouse Db2 Db2W Data Virtualization Db2 Big SQL Db2 Db2W DMC standalone on premises Yes Yes No Yes Yes Yes Yes No No Yes Yes DMC service on Cloud Pak for Data No No Yes No Supported Db2 offerings and platforms IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 8
  • 9. https://www.ibm.com/support/pages/system-requirements-ibm-db2-data-management-console • Select DMC version and Operating System • Operating Systems tab • List of operating systems and levels supported for DMC server installation • Prerequisites tab • Databases • List of Databases and levels supported for DMC repository database • JDBC Drivers • Web Browsers • Supported Software • Managed Resources • List of databases and levels supported for monitored databases • Hardware Supported platforms • AIX • Linux • Windows • Mac OS • zLinux System Requirements IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 9
  • 10. UNIX and Linux At least 64K or 65536 units for both the nproc value and the nofile value in the limits file Capacity Planning IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 10 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=setup-capacity-planning JVM Configuration
  • 11. Capacity Planning – Repository database DSM vs. DMC IBM Db2 - Data Management Console DSM DMC Example Some metrics are available in realtime mode only Some metrics are available in realtime and historical mode Inflight Statements Realtime data is not saved Realtime data is saved Each page refresh in Realtime mode Delta data is saved Raw and delta data is saved Package cache metrics Less metrics More metrics Index performance Activity event monitor, only 5000 records are saved All collected data from Activity event monitor is saved Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 11
  • 12. § Rules and restrictions • User must have the DBADM WITH DATAACCESS and SYSCTRL privileges • Dedicated database for DMC • Cannot be Db2 database partitioning feature (DPF) or pureScale® • Must have a temporary table space with a page size of at least 32 KB • TS4CONSOLE_TEMP will be created during repository database setup, if there is no existing temporary table space with at least 32 KB • Must be Unicode type to avoid SQL errors • Db2 version 11.1 or later • Oracle compatibility must be disabled • AUTOMATIC STORAGE option is set to YES • Minimum log settings: LOGPRIMARY 25 LOGSECOND 200 LOGFILSIZ 8192 • Database configuration: EXTENDED_ROW_SZ enable • One repository database per DMC server § Repository database needs to be at the same level of DMC code • Older DMC versions do not support repository databases already migrated to a newer version of DMC • If you have already upgraded your repository to a newer DMC release, there are several changes to tables that cannot be reverted. The rollback process will only work using a clean backup of your previous repository database, for example • Database backup taken when DMC version was V3.1.9 • Migrate DMC to V3.1.10 • To go back and use DMC V3.1.9 again, requires to restore the database backup taken at DMC V3.1.9 version • If an old database is restored, all information collected after that database backup will be lost Repository Database Requirements IBM Db2 - Data Management Console Back to Table of Contents Additional Information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=tasks-creating-repository-database IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 12
  • 13. § Db2 Restricted License for the Repository database only, available at IBM Fix Central § DMC does not create the repository database § Repository database needs to exist before the configuration Repository Database IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 13 § Create database example • db2 create database repodb pagesize 8 k • db2 UPDATE DATABASE CONFIGURATION FOR repodb USING LOGPRIMARY 25 LOGSECOND 200 LOGFILSIZ 8192 • db2 UPDATE DATABASE CONFIGURATION FOR repodb USING EXTENDED_ROW_SZ enable • Additional Information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=database-creating-db2-repository § Regularly scheduled maintenance is recommended • Backups • REORGs and RUNSTATs v reorg.sql file under <dmc_home>/ samples/DB2LUW v Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=database-maintaining-repository
  • 14. § Download • 4 ways to download Db2 Data Management Console v IBM Marketing Registration Services (MRS) Tool v Marketplace v IBM Fix Central v Passport Advantage • Additional information https://www.ibm.com/support/pages/node/885789 § Installation • Two different installation formats v Script v GUI • Backup repository database • Unzip image file v Existing directory is considered an upgrade v New directory is considered a new installation • Configure setup.conf file (ports, repository database) • Run setup script (DMC admin user) • Additional information v Setting up IBM Db2 Data Management Console https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=configuring-setting-up-db2-data-management-console v Upgrading https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=welcome-upgrading v Migrating from Data Server Manager (DSM) https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=upgrading-upgrade-data-server-manager-db2-data-management-console Download and Installation IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 14
  • 15. § Bash is required § Supported only on Power® 8 and later processors § AIX® POWER7® compatible systems are not supported • prtconf | grep -i proc v Processor Type: PowerPC_POWER8 Processor Implementation Mode: POWER 7 Processor Version: PV_7_Compat** § libc++.a (shr_64.o) could not be loaded error § Install XL C/C++ 16.1.0.10 by using the following steps: https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-cannot-install-db2-data-management-console-aix § Additional configuration steps when Stack Execution Disable Protection (SED) is enabled § https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=ts-exempting-db2-data-management-console-by-using-sed-aix Installation on AIX IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 15
  • 16. § Each DMC server can monitor up to 300 databases § One repository database per DMC server § One installation directory per DMC server § If repository database and DMC server located in the same machine • The machine needs to have enough resources (memory, CPU, disk space) v If DMC server requires 64GB of memory according to the DMC capacity planning, the machine will need to have 96GB of memory available (DMC server plus the repository database) § If more than one DMC server installed on the same machine • The machine needs to have enough resources (memory, CPU, disk space) available for each DMC installation v If DMC server requires 96GB of memory according to the DMC capacity planning, the machine will need to have 192GB of memory available § Different port numbers for each DMC server • Including internal ports and job scheduler (bootstrap.properties file) § Different DMC servers monitoring the same databases • Overhead on the monitored database by collecting duplicated information • Event monitor functions will have conflicts v Only enable event monitor on one DMC server, and keep disabled for the other DMC servers ü HWCMON1007W error Several Servers considerations IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 16
  • 17. Locating home installation or <dmc_home> § Script • <dmc_home> is the location where the installation package was decompressed after download. • For example, on the Windows platform, if the installation package was decompressed to the below location: C:IBMibm-datamgmtconsole, then the path of <dmc_home> is: C:IBMibm-datamgmtconsole § GUI • Windows v Right-click on the IBM Db2 Data Management Console icon on the desktop and select Open file location v Continue to the resourcesbin folder to find the <dmc_home> directory v For example, if the IBM Db2 Data Management Console was installed using GUI installer in the following location: C:Program FilesIBM Db2 Data Management Console, then the path of <dmc_home> is: C:Program FilesIBM Db2 Data Management Consoleresourcesbin • Linux v Find the location where you extracted the installation package, and enter the resources/bin directory to find the <dmc_home> directory. v For example, if the installation package of the GUI installer was decompressed to the below location: /opt/IBM/ibm-datamgmtconsole then the path of <dmc_home> is: /opt/IBM/ibm-datamgmtconsole/resources/bin • Mac v In the Applications folder, right-click on IBM Db2 Data Management Console and select Show Package Contents. v Enter Contents/Resources/bin directory to find the <dmc_home> directory v For example, the default <dmc_home> path is: /Applications/IBM Db2 Data Management Console.app/Contents/Resources/bin Home Directory IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 17 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-locating-db2-data-management-console-home-directory
  • 18. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-privileges-required-installing-starting-db2-data-management-console Required privileges to Start Data Management Console IBM Db2 - Data Management Console Back to Table of Contents Operating System Installed by Started by Supported (Y/N) Limitation Windows Administrator Administrator Y Windows Administrator Non-administrator N Windows Non-administrator N Linux/AIX root root Y Linux/AIX root non-root N Linux/AIX non-root root Y Once DMC is started by root user, a non-root user cannot start DMC, as they do not have the required write permission to work with DMC folders Linux/AIX non-root non-root Y A non-root user can download, extract (unzip) the installation image, and run the setup utility Linux/AIX non-root user A non-root user B N DMC cannot be installed by one non-root user and started by another non-root user IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 18
  • 19. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-starting-stopping-restarting-server Starting, Stopping, Checking Status IBM Db2 - Data Management Console Option Windows Linux and UNIX Start the server start.bat startup.sh Stop the server stop.bat stop.sh Restart the server restart.bat restart.sh Check server status status.bat status.sh § Scripts are located in <IBM Db2 Data Management Console install>/bin directory § On Windows • Run the scripts as an administrator or from an Administrator CLP (Command Line Processor) • Start/Stop the server is also available using Windows Services § Auto-start on Mac • https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-autostarting-console § Data Management Console URLs • http://server_host_name_or_ip:http_port/console • https://server_host_name_or_ip:https_port/console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 19
  • 20. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-uninstalling-db2-data-management-console Uninstalling Data Management Console IBM Db2 - Data Management Console § Stop Data Management Console server § Verify that the server is stopped § On Windows • Go to <dmc_home>/ bin directory • Run the script undo_setup.bat as an administrator or from an Administrator CLP (Command Line Processor) • Uninstall DMC § Remove DMC directory § Optional • Drop DMC repository database Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 20
  • 21. Data Management Console – HADR Configuration IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-setting-up-high-availability § Run in a highly available environment to minimize access downtime to the console § Example above using IBM Tivoli® System Administration for Multiplatforms (Tivoli SA MP) § DMC and Tivoli SA MP are installed on both the nodes § Connect both the DMC servers to the same repository database REPODB that is hosted by a Db2 server § The repository database can be hosted anywhere including on one of the two nodes, but it is recommended to host it on another independent node § Only one of the DMC servers is up (online) at a time § Tivoli SA MP monitors the status of the online DMC server and when it detects the DMC is down, it attempts to bring that DMC up § If startup fails, Tivoli SA MP switches (fail over) to the other node and brings up DMC server on that node Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 21
  • 22. Settings • Host name • Server Port • E-mail address for sender • Use TSL • Requires authentication • Destination e-mail address Email Configuration IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-configuring-email-server Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 22
  • 23. SNMP Configuration § Supports SNMP V3 § Settings • Host name • Server Port • Username • Security Level IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-configuring-snmp-notifications Integration with ServiceNow https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=notifications-integrating-db2-data-management-console-servicenow *****************Local Engine ID:80:00:13:70:04:80:00:13:70:c0:a8:01:0d***************** 0x800013700480001370c0a8010d Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 23
  • 24. JVM Configuration IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 24 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=events-configuring-java-heap-size § Xms is the amount of memory allocated by Java when starting DMC § Xmx is the maximum amount of memory that Java can allocate for DMC server § DMC server machine needs to have enough available memory for the Xmx § Increase JVM configuration according to the DMC Capacity Planning § Review JVM configuration after adding new monitored databases § HADR standby databases, database partitions, and PureScale members counts as monitored databases § Restart of DMC server is required after the changes
  • 25. Repository Database Configuration IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 25 3 ways to add repository database information § Installation • Edit setup.conf file and add the repository database before running setup script § First time logging into DMC § Administration à Repository hostname or ipaddress Port number for the Db2 instance (SVCENAME) Database name Schema for repository tables IBMCONSOLE (default) JDBC Properties SSL Userid and password to connect to the repository database SSL configuration mandatory for the Job Server
  • 26. Db2 Data Management Console Security Back to Table of Contents
  • 27. Security – Architecture IBM Db2 - Data Management Console Back to Table of Contents Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-security-architecture-db2-data-management-console § Access to is controlled through authentication and authorization § Can be accessed using both the secure HTTPS and unsecured HTTPS protocol § Access is managed either by the console itself or by authenticating facilities that reside outside of the console, like an LDAP server or repository database § Access within IBM Db2 Data Management Console (authorization) is managed by assigning user roles and privileges § User privileges and operation/data collection credentials are used to ensure the security for target databases IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 27 Personal Repository privilege SSL Configuration Admin/Database Admin/User role Model Personal/Data Collection credentials
  • 28. § Additional configuration when using SSL Certificates • HTTPS URL using SSL Certificate https://www.ibm.com/support/knowledgecenter/SS5Q8A_3.1.x/com.ibm.datatools.dsweb.ots.security.doc/topics/https_cert.html • Repository database using SSL Certificate https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-enabling-ssl-connection-job-repository • Monitored databases using SSL Certificate https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-enabling-ssl-connectivity-managed-db2-databases Security – SSL Certificates IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 28
  • 29. § Console Administrator § Database Administrator § Database User Security – Console Privileges IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-assigning-privileges Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 29
  • 30. § Setup admin • User created during installation • Console Administrator privileges • Resetting authentication back to Setup Admin (SuperAdmin) https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=configuration-resetting-authentication § LDAP https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=configuration-delegating-authentication-authorization-ldap § Repository https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=configuration-delegating-authentication-authorization-repository-database Security – Authentication Methods IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 30 Only one authentication method is supported By selecting a different authentication method, the previous method will be disabled automatically
  • 31. • Host name The host name or IPv4 address of the target LDAP server IPv6 address is not supported • Port The port of the LDAP server through which LDAP service is provided Number between 1 and 65535 Usually two different ports will be used by LDAP service: one for LDAP connections and the other for LDAPS connections. • StartTLS ( LDAPv3 Transport Layer Security (TLS) extension) Secure LDAP connections with StartTLS would be created • LDAPS (LDAP over SSL) Secure LDAPS connections would be created Security – Authentication Methods: LDAP IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=ldap-configure-connection-settings Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 31
  • 32. § Access LDAP Server Anonymously • Anonymous bind operations § Simple Authentication • Bind DN and bind password are required • Binding LDAP server with only bind DN or only bind password is not supported • Bind DN • Full DN value of bind account • Multiple bind accounts are not supported • Bind password • Clear text password associated with the bind DN Security – Authentication Methods: LDAP Bind Account IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=ldap-configure-bind-account Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 32
  • 33. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=ldap-configure-user-group-mapping Security – Authentication Methods: LDAP User Groups IBM Db2 - Data Management Console § User base DN • Full DN value of user base entry § User login attribute type • User attribute type § Console Administrator Group is required • Group DN • Member attribute type • User ID attribute type Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 33
  • 34. Additional information https://www.ibm.com/docs/en/db2-data-mgr- console/3.1.x?topic=database-configure-user-role-mapping-settings Security – Authentication Methods: Repository Database IBM Db2 - Data Management Console User Role Mapping Method Description Examples Db2 Authorities Authorities specified for the repository database DBADM|DATAACCESS|SECADM|SQLADM Db2 Groups Groups defined in the repository database using Db2 create group command ADMINGROUP|GROUP1|GROUP2 Db2 UDF Execute privilege on specified UDFs created during the repository database setup: "<console_schema_name>.CANADMINISTER” "<console_schema_name>.CANDBA” "<console_schema_name>.CANVIEW” IBMCONSOLE.CANADMINISTER Db2 Roles Roles defined in the repository database using Db2 create role command ENTERPRISE_USER|SYSTS_USR § Console Administrator Group is required Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 34
  • 35. Security – Authentication Methods: Repository Database IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 35 The test user needs to be any user who matches one of the DMC roles to access DMC
  • 36. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-managing-user-roles-privileges Security – Connection Users IBM Db2 - Data Management Console § Grant access to users for monitored databases • Profile owner v The user who creates a connection profile is automatically granted the connection profile owner privilege v The user can use the connection profile, and can also edit or delete the connection profile for a database v The administrator or profile owners can assign connection profile owner or user privilege for the connection profile to other user IDs • Connection profile user v The user can use the connection profile (for example, run the SQL script on the target database) for which they have the connection profile user privilege Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 36 If the user is not granted as Profile owner or Profile user, the database won’t show in the monitored database list for that user
  • 37. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-customize-security-parameters Security – Additional Security Parameters IBM Db2 - Data Management Console Back to Table of Contents § Configure User ID rule • Although IBM Db2 Data Management Console delegates authentication to external security systems, defining a restriction pattern for user ID is still a good security practice • Default rules for user ID v Total length from 1 to 128 characters v Allowed characters are lower-case letters(a-z), numbers(0-9), underscore(_), hyphen(-), dot(.), at(@) and comma(,); v Begin with a lower-case letter or number § Append customized HTTP response headers to web resources • Set a rule to restrict the loading of web resource to preventing attacks like Clickjacking or XSS, you can append your own headers to HTTP responses § Verify server host name or IP address • Prevent 'Host Header Injection' attack that someone intercept your HTTP requests and replace the value of host header, you can configure a list of host names and IP address of your server where IBM Db2 Data Management Console is installed to enable verification of the host header § Customize several JSSE security properties • To meet the latest security requirement, IBM Db2 Data Management Console has overwritten some of the default JSSE security properties of IBM SDK, Java Technology Edition, Version 8. § Customize idle timeout value • Customized idle timeout value that will automatically log off the console after 'x' minutes of user inactivity IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 37
  • 38. SSH Configuration Secure shell (SSH) services protocol to establish an encrypted communication channel with remote database servers Allows users to issue commands and complete transactions with databases on connected servers and accommodate the encryption requirements While the console primarily uses JDBC to communicate with remote database servers, it needs SSH to perform the following: Execute the scripts/utilities in the remote machine § Db2 commands, such as db2look for generating DDLs § Administration commands, such as db2start and db2stop § Operating system commands, such as ls on linux machines, to browse the folders of a remote machine § CLP from the SQL editor A number of functions available which require that connected servers be configured to support SSH. The following table identifies these functions: IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-communicating-securely-remote-servers Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 38 Category Tasks that require an SSH service Generation of SQL queries Run SQL statements (SQL Editor) where the Run method option is set to CLP WITH SSH Database Monitoring Collect CPU information from an AIX server Job Run Job with type Db2 CLP Script Executable/Shell Script General Search for databases or objects using the Browse feature PasswordAuthentication property must be set to yes in sshd configuration file
  • 39. Console Port Numbers Required to be open in the Firewall configuration IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-modifying-db2-data-management-console-ports Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 39 Property Default File location Description port 11080 <dmc_home>/wlp/usr/servers/dsweb/bootstrap.properties The HTTP port that is used to access the IBM Db2 Console web console from a web browser. If http access is not allowed, set the value to -1 https.port 11081 <dmc_home>/wlp/usr/servers/dsweb/bootstrap.properties The HTTPS secure port that is used to access the IBM Db2 Console web console from a web browser internal.port 11082 <dmc_home>/wlp/usr/servers/dsweb/bootstrap.properties Internal port for the IBM Db2 Console server job.http.port 11088 <dmc_home>/wlp/usr/servers/dsweb/bootstrap.properties Job-scheduler service port drs.port 11098 <dmc_home>/Config/dswebserver_override.properties Dr.s service port
  • 40. Db2 Data Management Console Monitored Databases Back to Table of Contents
  • 41. Database Parameter Description Recommended value MON_REQ_METRICS For basic data collection of statements, activities, workloads, etc. BASE MON_ACT_METRICS For basic data collection of statements, activities, workloads, etc. BASE MON_OBJ_METRICS For data collection of database objects, such as TABLE, TABLESPACE, etc. BASE MON_RTN_DATA For data collection of stored procedure BASE MON_LW_THRESH For data collection of blocking and waiting connections 30,000,000 (microseconds) MON_DEADLOCK For data collection of blocking and waiting connections history MON_LOCKTIMEOUT For data collection of blocking and waiting connections history MON_LOCKWAIT For data collection of blocking and waiting connections without_hist Monitored Databases – Pre-Setup IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=tasks-setting-database-parameter-values Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 41 Note: Enabling Locking event monitor option in Administration > Event monitor profile page, updates the MON_LW_THRESH, MON_DEADLOCK, MON_LOCKTIMEOUT, and MON_LOCKWAIT parameters of the target database to the recommended value
  • 42. Monitored Databases – HADR Configuration Requirement IBM Db2 - Data Management Console § Required Configuration for historical monitoring data • DB2_HADR_ROS is ON • DB2_STANDBY_ISO is UR § Event monitoring of an HADR standby connection is not supported Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 42 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=monitoring-hadr-historical
  • 43. Monitored Databases – Required Privileges IBM Db2 - Data Management Console Data collection credential ID must meet the following requirements § SQLADM on the database • This privilege provides access to most of the required functions. § WLMADM on the database • This privilege is required to create console workload(s) § SYSMAINT_GROUP • A few monitoring calls use admin functions that use the snapshot monitor to capture information about the database and any connected applications • For example: SNAP_GET_UTIL_PROGRESS table function https://www.ibm.com/docs/en/db2/11.5?topic=views-snap-get-util-progress-progress-snapshot Authorization v One of the following authorizations is required: Ø EXECUTE privilege on the SNAP_GET_UTIL_PROGRESS table function Ø DATAACCESS authority v In addition, to access snapshot monitor data, one of the following authorities is also required: Ø SYSMON Ø SYSCTRL Ø SYSMAINT Ø SYSADM Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 43 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=console-min-db-privileges-required-db2
  • 44. Db2 version 10.1.0.2 or later after DMC V3.1.6 or later • List of supported monitored databases in System Requirements • Db2 10.1 databases are not enabled by default https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=new-version-316 Up to 300 monitored databases per DMC server • To avoid performance issues in the DMC server 3 ways to add a connection profile • Add a connection profile via Web UI • Import connections from file • REST API • Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-adding-connection-profile Adding Monitored Databases IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 44
  • 45. § Administration à Connection profile à New connection Monitored Databases – Adding Connection Profile IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 45 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-adding-connection-profile
  • 46. Monitored Databases – Adding Connection Profile IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 46 hostname or ip address where the database is located port number for the Db2 instance (SVCENAME) Database name § Identify the database § Unique name § Cannot have spaces or special characters § Used in e-mail subject for any alerts § Cannot be changed Credentials § Monitoring data collection: default monitoring (background collection) § Shared credential: run jobs § Personal credential: run jobs, SQL statements, editing tables, etc. additional JDBC parameters (JDBC tracing) Initialize HADR or Initialize pureScale § Each standby, or partition, or member is considered a different monitored database and is added automatically by DMC § Adding standby, or partition, or member manually, they will be considered regular monitored databases Security type for JDBC and SQLJ SSL configuration § Truststore location § Truststore password userid / password to connect to the database
  • 47. • Import is asynchronous operation, profiles will be imported in turn • Database connection information must be in CSV (comma-separated value) text format Monitored Databases – Importing connections from a file IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 47
  • 48. • Create new connection profile REST API Monitored Databases – Adding connection via REST API IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 48
  • 49. Monitored Databases – Db2 upgrade IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 49 § db2updvnn command on the monitored database is required to update Db2 APIs and table functions used by DMC § Run the following query on the monitored database to check the Db2 API level • db2 "select versionnumber from sysibm.sysversions order by 1 desc” § Make sure that the query results matches db2level to avoid errors in DMC • https://www.ibm.com/support/pages/ibm-db2-data-management-console-dmc-showing-sqlcode-206-not- valid-context-where-it-used-error § Update Connection Profile • Administration à Connection profile • Select connection profiles • Click on Synchronize, and Run button
  • 50. Monitored Databases – Update credentials IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 50 Select one or more connection profiles to change the same credentials
  • 51. Monitored Databases – Connection Profile List IBM Db2 - Data Management Console Connection Profile Page (all added databases) Home Page (monitoring enabled databases) Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 51 Filters
  • 52. Db2 Data Management Console Monitoring Profile Back to Table of Contents
  • 53. • Administration à Monitoring profile • Status • Default: Yes/No (only one default Monitoring profile) • New connection profiles will be assigned to the default monitoring profile automatically • Active: Yes/No • Profile name: unique name • Database list (assigned databases) • Description • HADR monitoring profile • Predefined for standby databases Monitoring Profile – Configuration IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 53 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=monitoring-setting-up-profile
  • 54. Collection • Collect data every (minutes) Package cache • SQL statements captured • Table data read for a collection Locks • Lock wait threshold (miliseconds) • Table data read for a collection Collect storage data § Heavy query used to capture storage data § It can impact the monitored database § Disable the query or schedule the query to run when the monitored database is not busy § Reorg/runstas on the monitored database catalog tables might help the query performance Monitoring Profile – Monitor Settings IBM Db2 - Data Management Console Package cache only displays top n queries order by 16 KPIs 1. num_exec_with_metrics 2. stmt_exec_time 3. total_cpu_time 4. rows_read 5. rows_returned 6. total_act_wait_time 7. lock_wait_time 8. sort_overflows 9. logical_reads 10. physical_reads 11. temp_reads 12. pool_data_l_reads 13. pool_index_l_reads 14. lock_escals 15. lock_waits 16. wlm_queue_time_total In this example: Every 1 minute, read maximum of 1000 records from the package cache, and keep the top 200 only Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 54
  • 55. Normalize captured SQL statements SELECT * FROM TABLEA WHERE NAME = ‘IBM’ SELECT * FROM TABLEA WHERE NAME = ‘DATA’ SELECT * FROM TABLEA WHERE NAME = ‘MANAGEMENT’ SELECT * FROM TABLEA WHERE NAME = ‘CONSOLE’ SELECT * FROM TABLEA WHERE NAME = ‘SKILL’ SELECT * FROM TABLEA WHERE NAME = ‘TRANSFER’ è 6 records SELECT * FROM TABLEA WHERE NAME = ? è 1 records Monitoring Profile – Monitor Settings IBM Db2 - Data Management Console Persistence § Historical data • Monitoring data v Keep data for (weeks) • Package cache v Keep data for (days) Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 55 Affects disk space in repository database In case old data is not being deleted in repository database, use the deleteRepoData_expired script: https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-deleting-expired-monitor-data Deleting data for a deleted connection profile use the deleteRepoData4DeletedConnection script: https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-cleaning-up-monitor-data- deleted-connections
  • 56. § Collect data every (minutes) • Data might not be available if not captured during the cycle (snapshot) § The lower the number the more data will be collected • Example of 1 hour monitoring with a database running 100 applications v Capturing information every 1 minute: 100 x (60 / 1) = 6000 records v Capturing information every 5 minutes: 100 x (60 / 5) = 1200 records v Capturing information every 15 minutes: 100 x (60 / 15) = 400 records v Multiplied by the number of tables collecting data v Multiplied by the number of databases assigned to the monitoring profile Monitoring Profile – Data Collection Cycle IBM Db2 - Data Management Console This Photo by Unknown Author is licensed under CC BY-SA DMC Server Read data Monitored databases Db2 table functions Insert data Repository database Web UI View data Cleaner Threads Clean old data Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 56
  • 57. 4 Categories • Availability • Performance • Configuration • Custom Thresholds • Critical • Warning • Information Monitoring Profile – Alert Settings IBM Db2 - Data Management Console Additional information (including list of alerts available) https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=alerts-grouping-by-type Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 57
  • 58. § Name § 3 types of notification • e-mail (list of e-mails for the alert) • SNMP • Both § Preference • Send notification immediately when an alert opens • Send notification when an alert closes • Send a daily email summary of all open alerts in the past 24 hours § Alert type § Severity • Critical • Warning • Information § Click on “OK” button to apply the notification changes § Click on “Save” button to save the monitoring profile Monitoring Profile – Notification (Rules) IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 58
  • 59. § Script type • SQL script • Shell Script § Script text • Scripts must return severity column (returnValue) to trigger the alert v Information: 0 v Warning: -1 v Critical: -2 • Stored procedures v OUT parameter must be included to return an exit code (-2,-1, or 0) • Second column to return auxiliary information as output (optional) § Timeout Settings Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=profile-creating-custom- alerts Custom alerts samples https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=alerts-custom-code- snippets Monitoring Profile – Custom Alerts IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 59
  • 60. Notification Center IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 60
  • 61. Notification Center IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 61
  • 62. Notification Center – Suggested Resolution IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 62 § Apply Auto-Fix
  • 63. Notification Center – Suggested Resolution IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 63 § View access plan § Tune statement Run Visual Explain Query Tuning
  • 64. Alerts – e-mail IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 64
  • 65. Db2 Data Management Console Event Monitor Back to Table of Contents
  • 66. Prerequisites settings for the monitored database § Privileges to create event monitoring-related objects: SYSCTRL or SYSADM privilege is required to create BUFFERPOOL and TABLESPACE § WLMADM or DBADM privilege is required to CREATE / ALTER WORKLOAD § ACCESSCTRL or SECADM privilege is required to GRANT EXECUTE on PROCEDURE § SYSADM privilege is required to run db2set (ATS) § Tablespace for event monitor tables Event Monitor – Prerequisites IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 66 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=events-table-space-other-prerequisites-event-monitoring
  • 67. Event Monitor Profile IBM Db2 - Data Management Console Shows all event monitors for each database Pencil icon to edit Event monitor profile Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 67 Top 20 connections with tablespace usage
  • 68. § When enabled, DMC issues Db2 CREATE EVENT MONITOR … WRITE TO TABLES command on the monitored database § Tablespace is required to store the event monitor tables § Db2 creates the event monitor and event monitor tables, and insert data into those tables § 4 event monitors • Activity v Activity event monitor v Monitor à Statement à Individual executions • Locking v Locking event monitor v Monitor à Locking à Locking event monitor • Utility v Change history event monitor v Monitor à Applications à Utilities event monitor • Statistics v Statistics event monitor v Monitor à Summary à Responsiveness widget Event Monitor – Settings IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 68
  • 69. § Created on monitored database § Not required for HADR standby databases § New table space (created by DMC) • TS4MONITOR default name § Existing table space requirements • 32K page • Across all database partitions or members • AUTOMATIC STORAGE AUTORESIZE YES • MAXSIZE 2G § To increase the table space usage size, click ‘Scale’ to set new table space size Event Monitor – Tablespace IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 69
  • 70. Event Monitor – Tablespace Requirements IBM Db2 - Data Management Console --Create a bufferpool with page size 32kb CREATE BUFFERPOOL CONSOLEPOOL ALL DBPARTITIONNUMS SIZE 1000 AUTOMATIC PAGESIZE 32768 --Create a partition spanning all partitions CREATE DATABASE PARTITION GROUP CONSOLEGROUP ON ALL DBPARTITIONNUMS --Create the 32kb tablespace with max size 2G specified CREATE TABLESPACE TS4MONITOR IN CONSOLEGROUP PAGESIZE 32768 MANAGED BY AUTOMATIC STORAGE AUTORESIZE YES INITIALSIZE 100M MAXSIZE 2G BUFFERPOOL CONSOLEPOOL --Create a 32kb pagesize temporary tablespace if there is not an existing one CREATE TEMPORARY TABLESPACE TEMPSPACE2 PAGESIZE 32K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4 BUFFERPOOL CONSOLEPOOL --Disable the legacy console workload DSM_WORKLOAD if it exists ALTER WORKLOAD DSM_WORKLOAD DISABLE --Define a workload to filter the monitored console executed statements. Because the COLLECT ACTIVITY DATA option is not specified, the statement history will not collect the statements of the workload. CREATE WORKLOAD CONSOLE_WORKLOAD APPLNAME (''DSMAu*'',''DSMRt*'',''DS_ConnMgt*'',''DSSNAP*'',''DSMOQT'',''UC_*'') --Capture the statements for the default two workloads on the coordinator node. If you want to collect the activity data for all nodes of a multi-partition database, change the COORDINATOR option to ALL. ALTER WORKLOAD SYSDEFAULTUSERWORKLOAD COLLECT ACTIVITY DATA ON COORDINATOR WITH DETAILS; ALTER WORKLOAD SYSDEFAULTADMWORKLOAD COLLECT ACTIVITY DATA ON COORDINATOR WITH DETAILS; --Capture the aggregate responsiveness workload information ALTER WORKLOAD SYSDEFAULTUSERWORKLOAD COLLECT AGGREGATE ACTIVITY DATA BASE; ALTER WORKLOAD SYSDEFAULTADMWORKLOAD COLLECT AGGREGATE ACTIVITY DATA BASE; --Create a bufferpool with page size 32kb CREATE BUFFERPOOL CONSOLEPOOL ALL DBPARTITIONNUMS SIZE 1000 AUTOMATIC PAGESIZE 32768 --Create a partition spanning all partitions CREATE DATABASE PARTITION GROUP CONSOLEGROUP ON ALL DBPARTITIONNUMS --Create the 32kb tablespace with max size 2G specified CREATE TABLESPACE TS4MONITOR IN CONSOLEGROUP PAGESIZE 32768 MANAGED BY AUTOMATIC STORAGE AUTORESIZE YES INITIALSIZE 100M MAXSIZE 2G BUFFERPOOL CONSOLEPOOL --Create a 32kb pagesize temporary tablespace if there is not an existing one CREATE TEMPORARY TABLESPACE TEMPSPACE2 PAGESIZE 32K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4 BUFFERPOOL CONSOLEPOOL --Disable the legacy console workload DSM_WORKLOAD if it exists ALTER WORKLOAD DSM_WORKLOAD DISABLE --Define a workload to filter the monitored console executed statements. Because the COLLECT ACTIVITY DATA option is not specified, the statement history will not collect the statements of the workload. CREATE WORKLOAD CONSOLE_WORKLOAD APPLNAME (''DSMAu*'',''DSMRt*'',''DS_ConnMgt*'',''DSSNAP*'',''DSMOQT'',''UC_*'') --Capture the statements for the default two workloads on the coordinator node. If you want to collect the activity data for all nodes of a multi-partition database, change the COORDINATOR option to ALL. ALTER WORKLOAD SYSDEFAULTUSERWORKLOAD COLLECT ACTIVITY DATA ON COORDINATOR WITH DETAILS; ALTER WORKLOAD SYSDEFAULTADMWORKLOAD COLLECT ACTIVITY DATA ON COORDINATOR WITH DETAILS; --Capture the aggregate responsiveness workload information ALTER WORKLOAD SYSDEFAULTUSERWORKLOAD COLLECT AGGREGATE ACTIVITY DATA BASE; ALTER WORKLOAD SYSDEFAULTADMWORKLOAD COLLECT AGGREGATE ACTIVITY DATA BASE; --Create SYSTOOLSPACE for Administrative Task Schedule(ATS) CREATE TABLESPACE SYSTOOLSPACE IN IBMCATGROUP MANAGED BY AUTOMATIC STORAGE USING STOGROUP IBMSTOGROUP EXTENTSIZE 4 --Ensure you have ADMIN_TASK_ADD and ADMIN_TASK_UPDATE privileges to execute stored procedures(ATS) GRANT EXECUTE ON PROCEDURE SYSPROC.ADMIN_TASK_ADD TO USER ${userName}; GRANT EXECUTE ON PROCEDURE SYSPROC.ADMIN_TASK_UPDATE TO USER ${userName}; --Enable on the database the setting related to ATS, please choose the "CLP with SSH" Run method in Options !db2set DB2_ATS_ENABLE=YES; Without ATS With ATS Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=events-table-space-other-prerequisites-event-monitoring Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 70
  • 71. § Regular event monitor scenario happens according to the Collection interval configured in the Event monitor profile § ATS (Administrative Task Scheduler) watchdogs • Helpful when DMC loses the connection to the monitored database • On v Automatically drop existing event monitors and event monitor tables v ATS needs to be configured and running on the monitored database • Off v Possibility to reach tablespace full error v Need to drop existing event monitors and event monitor tables manually Event Monitor – Data Collection Cycle IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 71 START: CREATE EVENT MONITOR WRITE TO TABLES STOP: DROP EVENT MONITOR and TABLES Watchdog (ATS) Check for lost event monitors Monitored databases Db2 inserts data into event monitor tables Insert data Repository database Web UI DMC Server Regular Event Monitor Scenario Cleaner Threads View data Clean old data Read data from event monitor tables Flush event monitor
  • 72. Common scenarios when DMC loses the connection to the monitored database § Connection from DMC to the monitored database was forced (force applications command) § DMC crashes Why use Administrative Task Scheduler (ATS)? § Watchdogs drop the event monitors and event monitor tables automatically Event Monitor – Administrative Task Scheduler (ATS) IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 72 Additional information about ATS: https://www.ibm.com/docs/en/db2/11.5?topic=scheduler-administrative-task START: CREATE EVENT MONITOR WRITE TO TABLES STOP: DROP EVENT MONITOR and TABLES Watchdog (ATS) Disable lost event monitors automatically Monitored databases Db2 inserts data into event monitor tables Connection lost with ATS Insert data Repository database Web UI DMC Server Cleaner Threads View data Clean old data Read data from event monitor tables Flush event monitor STOP: DROP EVENT MONITOR and TABLES Connection lost without ATS START: CREATE EVENT MONITOR WRITE TO TABLES Monitored databases Db2 keeps inserting data into event monitor tables Insert data Repository database Web UI DMC Server Cleaner Threads View data Clean old data Read data from event monitor tables Flush event monitor Can cause tablespace full error
  • 73. Event Monitor – Activity IBM Db2 - Data Management Console Back to Table of Contents Timestamp changes every cycle IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 73
  • 74. Event Monitor – Locking IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 74 Only locks time up to threshold will be collected
  • 75. Event Monitor – Utility IBM Db2 - Data Management Console Back to Table of Contents Utility Types BACKUP LOAD MOVETABLE ONLINERECOVERY REDISTRIBUTE REORG RESTORE ROLLFORWARD RUNSTATS IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 75 Only captures information from the selected Utility Types
  • 76. Event Monitor – Statistics IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 76 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=events-setting-up-statistics-event-monitoring-opt-in Why should you opt-in? Statistics event monitor must be enabled on a connected database for the ‘Responsiveness’ widget in the Monitor > Summary page to display data in the widget. Note: The “Responsiveness” widget is disabled (default) when the Statistics event monitor opt-in feature is disabled (default) What is the benefit? The “Responsiveness” widget is a tool that gives you an insight on changes of query response time characteristics over time. This widget uses the aggregated activity data collected by the statistics event monitor and helps you understand how quickly the system is processing the statements. You can also view your workload composition and capture activities for diagnostic reasons. In most cases, statistic event monitor will only add a minor overhead to monitored databases, which should be safe to enable it Information coming from statistics event monitor
  • 77. Db2 Data Management Console Monitoring Databases Back to Table of Contents
  • 78. Monitor Database – Understanding Icons IBM Db2 - Data Management Console Back to Table of Contents Ascendant and Descendant Sort Filter Conditions Show/Hide Column Export as CSV Show/Hide System Objects Share the page Databases Monitor Run SQL Data Tuning Administration Expand Side Menu Database Selection About APIs IBM Documentation Community Dark/Light Mode Notification Center User Additional options Data Interval Selection IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 78
  • 79. Monitor Database – Show Data Interval IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 79 § Sampling data only § To see all records, use Custom option and specify a date interval
  • 80. Monitor Statement – Statements IBM Db2 - Data Management Console § All captured statements have an option to View details, Visual Explain, and Tune query § Force application and cancel activity options for Real Time only Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 80 Real Time only
  • 81. Monitor Statement – Statements – View Details 1/4 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 81 § Using the View details option from a statement, drill down for details
  • 82. Monitor Statement – Statements – View Details 2/4 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 82
  • 83. Monitor Statement – Statements – View Details 3/4 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 83
  • 84. Monitor Statement – Statements – View Details 4/4 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 84
  • 85. Monitor – Summary IBM Db2 - Data Management Console Overview showing main metrics for the monitored database Back to Table of Contents Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=metrics-summary https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=SS5Q8A_3.1.x/com.ibm.datatools.dsweb.ots.installconfig.doc/topics/consolehome.html#baselinedesc IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 85
  • 86. Monitor – Summary – Availability IBM Db2 - Data Management Console § From Db2 table function MON_GET_DATABASE § Status can be one of the following • Available • Unavailable § Repository table <SCHEMA>.DBSTATUS Back to Table of Contents Additional information including table description https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=summary-availability IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 86
  • 87. Monitor – Summary – Responsiveness IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 87 § Requires Statistics event monitor § Responsiveness contains • Response Time (ms) v The average SQL response time in the given time frame • Statements v The statement count in the given time frame When monitoring HADR standby
  • 88. Monitor – Summary – Throughput IBM Db2 - Data Management Console § Throughput contains • Rows Read / (min) v The average rows read rate (number of rows read per minute) in the given time frame • Statements / (min) v The average SQL rate (number of statements per minute) in the given time frame § From Db2 table function MON_GET_WORKLOAD § Repository table <SCHEMA>. DATABASE § The throughput metric monitors the query performance by measuring the number of statements that are processed and the number of rows that are read from the table § The statements contain the activities that are completed with errors and the activities that are completed successfully within a certain period § The count of rows read is not the number of rows that were returned to the calling application. Instead, it is the number of rows that were read to return the result set § Additionally, this count does not include any index accesses. This metric summary represents database throughput by quantifying the statements and rows that are read in two aspects • An average number per minute • Time series for an average Back to Table of Contents Additional information including table description https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=summary-throughput IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 88
  • 89. Monitor – Summary – Resource Usage IBM Db2 - Data Management Console Back to Table of Contents Additional information including table description https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=summary-resource-usage IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 89 § Resource usage contains • CPU (%) v The average Db2 CPU usage percentage in the given time frame v If the database has multiple nodes, only the master node (member = 0) is considered • Memory (%) v The average memory usage percentage in the given time frame • Storage (%) v The latest storage usage percentage in the given time frame • Log Space (%) v The max log space usage percentage in the given time frame § From Db2 table function ENV_GET_DB2_SYSTEM_RESOURCES and ENV_GET_SYSTEM_RESOURCES § SUM(CPU_USER) and SUM(CPU_SYSTEM) from the ENV_GET_DB2_SYSTEM_RESOURCES grouped by database members and joined with the columns from ENV_GET_SYSTEM_RESOURCES for those database members § Repository tables • CPU (%) v <SCHEMA>.RESOURCE_CPU v Db2WoC - <SCHEMA>.WOLVERINE_API_CPU • Memory (%) v <SCHEMA>.RESOURCE_MEMORY v Db2WoC - <SCHEMA>.WOLVERINE_API_MEMORY • Storage (%) v <SCHEMA>. RESOURCE_STORAGEGROUP v Db2WoC - <SCHEMA>.WOLVERINE_API_STORAGE • Log Space (%) v <SCHEMA>. RESOURCE_LOGSPACE
  • 90. Monitor – Summary – Contention IBM Db2 - Data Management Console Back to Table of Contents Additional information including table description https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=summary-contention IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 90 § Contention contains • Lock Waits(/m) v The max lock waits number per minute in the given time frame • Connections v The max concurrent connections value in the given time frame § Database contention situation by measuring lock-waits and concurrent database connections § From Db2 table functions MON_GET_ACTIVITY and MON_GET_CONNECTION § The data for lock-waits is collected from repository table <SCHEMA>.DATABASE § The data for concurrent database connections is collected from • <SCHEMA>. CONTENTION_CONNECTION • <SCHEMA>.ONLINE_CONNECTION § Repository tables • Information in <SCHEMA>. CONTENTION_CONNECTION table is from MON_GET_CONNECTION • Information in <SCHEMA>.ONLINE_CONNECTION is from MON_GET_ACTIVITY and MON_GET_CONNECTION
  • 91. Monitor – Summary – Time Spent IBM Db2 - Data Management Console Back to Table of Contents Additional information including table description https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=summary-time-spent IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 91 § Displays the time spent by the metric • Top Time Spent v Displays which item takes most of the time in the time range v Time spent contains SQL execution, I/O, Lock waits, Other waits, and Other processing § Indicates the percentage of time that is taken for database calls, by measuring the time of various database activities (such as SQL execution time, I/O time) § From Db2 table function MON_GET_WORKLOAD § Repository table <SCHEMA>. DATABASE § Excludes data from • DSM_WORKLOAD • CONSOLE_WORKLOAD • DV_WORKLOAD • BIGSQL_WORKLOAD
  • 92. Monitor Database – Database time spent IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 92
  • 93. Additional information • Metrics from MON_GET_WORKLOAD function https://www.ibm.com/docs/en/db2/11.5?topic=functions-mon-get-workload-get-workload-metrics • Additional Db2 information https://www.ibm.com/docs/en/db2/11.5?topic=elements-time-spent-monitor Metrics from MON_GET_WORKLOAD function: Category: SQL execution • TOTAL_SECTION_PROC_TIME • TOTAL_COL_PROC_TIME • TOTAL_ROUTINE_USER_CODE_PROC_TIME Category: I/O • POOL_READ_TIME • POOL_WRITE_TIME • DIRECT_READ_TIME • DIRECT_WRITE_TIME Category: Lock waits • LOCK_WAIT_TIME • LOCK_WAIT_TIME_GLOBAL Category: Other waits • AGENT_WAIT_TIME • WLM_QUEUE_TIME_TOTAL • LOG_BUFFER_WAIT_TIME • LOG_DISK_WAIT_TIME • TCPIP_RECV_WAIT_TIME • TCPIP_SEND_WAIT_TIME • IPC_SEND_WAIT_TIME • IPC_RECV_WAIT_TIME • AUDIT_SUBSYSTEM_WAIT_TIME • AUDIT_FILE_WRITE_WAIT_TIME • DIAGLOG_WRITE_WAIT_TIME • EVMON_WAIT_TIME • TOTAL_EXTENDED_LATCH_WAIT_TIME • PREFETCH_WAIT_TIME • COMM_EXIT_WAIT_TIME • IDA_SEND_WAIT_TIME • IDA_RECV_WAIT_TIME • RECLAIM_WAIT_TIME • SPACEMAPPAGE_RECLAIM_WAIT_TIME • FED_WAIT_TIME Monitor Database – Database time spent details IBM Db2 - Data Management Console Back to Table of Contents Category: Other processing • TOTAL_COMPILE_PROC_TIME • TOTAL_IMPLICIT_COMPILE_PROC_TIME • TOTAL_LOAD_PROC_TIME • TOTAL_REORG_PROC_TIME • TOTAL_RUNSTATS_PROC_TIME • TOTAL_CONNECT_REQUEST_PROC_TIME • TOTAL_CONNECT_AUTHENTICATION_PROC_TIME • TOTAL_COMMIT_PROC_TIME • TOTAL_ROLLBACK_PROC_TIME • TOTAL_BACKUP_PROC_TIME • TOTAL_INDEX_BUILD_PROC_TIME IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 93
  • 94. Monitor Database – Database usage IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 94
  • 95. Monitor – HADR Information IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 95 Monitoring HADR standby database
  • 96. Monitor Statement – In-flight executions IBM Db2 - Data Management Console Current statements running at the moment of the collection interval configured in the monitoring profile Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 96
  • 97. Monitor Statement – Individual executions IBM Db2 - Data Management Console Requires Activity Event Monitor Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 97
  • 98. Monitor Statement – Package cache IBM Db2 - Data Management Console Package cache only displays top n queries order by 16 KPIs 1. num_exec_with_metrics 2. stmt_exec_time 3. total_cpu_time 4. rows_read 5. rows_returned 6. total_act_wait_time 7. lock_wait_time 8. sort_overflows 9. logical_reads 10. physical_reads 11. temp_reads 12. pool_data_l_reads 13. pool_index_l_reads 14. lock_escals 15. lock_waits 16. wlm_queue_time_total Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 98
  • 99. Monitor Statement – Stored procedures IBM Db2 - Data Management Console § Requires MON_RTN_DATA database configuration set to BASE on the monitored database § Displays the aggregated execution metrics for § Procedures § External procedures § Compiled functions § External functions § Compiled triggers § Anonymous blocks invoked since database activation Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 99
  • 100. Monitor Locking – Blocking and waiting connections IBM Db2 - Data Management Console § Information about the blocker and waiter pair § Table functions • MON_GET_APPL_LOCKWAIT • MON_GET_CONNECTION • MON_GET_ACTIVITY • MON_GET_PKG_CACHE_STMT • To retrieve connection information for BLOCKER connections, information is gathered using the table function MON_GET_CONNECTION with parameters (HLD_APPLICATION_HANDLE, and HLD_MEMBER) which is collected from MON_GET_APPL_LOCKWAIT • To retrieve connection information for WAITER connections, information is gathered using the table function MON_GET_CONNECTION with parameters (REQ_APPLICATION_HANDLE, and REQ_MEMBER) which is collected from MON_GET_APPL_LOCKWAIT • To get the SQL statement of the application holding the lock, MON_GET_PKG_CACHE_STMT with parameters (NULL, LAST_EXECUTABLE_ID, NULL, and HLD_MEMBER) is used, where LAST_EXECUTABLE_ID is collected from MON_GET_CONNECTION and HLD_MEMBER is collected from MON_GET_APPL_LOCKWAIT • To get the SQL statement for the waiting application, MON_GET_ACTIVITY with parameters (REQ_APPLICATION_HANDLE, and REQ_MEMBER) is used, which is collected from MON_GET_APPL_LOCKWAIT § Repository table <SCHEMA>. LOCKPAIR Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 100 Additional information including table description https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=metrics-blocking-waiting-connections
  • 101. Monitor Locking – Connection statistics IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 101
  • 102. Monitor Locking – Locked objects with waiting connections IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 102 Displays the detailed data of the locked process and information of the process that blocked it
  • 103. Monitor Locking – Find locked objects IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 103 Displays the detailed information of locked operations
  • 104. Monitor Locking – Locking event monitor IBM Db2 - Data Management Console Requires locking event monitor Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 104
  • 105. Monitor Applications – Top consumers IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 105 Displays the top consumers of the system resources
  • 106. Monitor Applications – Connections IBM Db2 - Data Management Console § Application details § Force application using Personal Credentials § Force application option only available for Real time view Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 106
  • 107. Monitor Applications – Utilities IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 107
  • 108. Monitor Applications – Utilities event monitor IBM Db2 - Data Management Console Back to Table of Contents Requires Utility Event Monitor IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 108
  • 109. Monitor Applications – Units of work (UOW) IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 109 Indicates what transactions (units of work) are consuming the most resources in the data server
  • 110. Monitor Throughput – Connection summary IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 110 Displays a summary of all connections established to the console
  • 111. Monitor Throughput – Partition summary IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 111 Displays the information for each data partition used by a database
  • 112. Monitor Throughput – WLM workload summary IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 112 Represents the accumulation of all metrics for requests that were submitted by connections mapped to the identified workload objects
  • 113. Monitor Throughput – WLM service class summary IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 113 Represents the accumulation of all metrics for requests that have executed under the indicated service subclass
  • 114. Monitor Throughput – Operating system time spent IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 114
  • 115. Monitor Memory – Instance memory IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 115
  • 116. Monitor Memory – Database memory IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 116
  • 117. Monitor I/O – Buffer pools IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 117 § Displays the usage of Db2 Buffer Pools and Table Spaces § A directory server uses the Db2 buffer pools to store cached data and to improve database performance § A buffer pool is associated with a single database and can be used by more than one table space § Adequate buffer pool size is essential for good database performance because it reduces the disk I/O, which uses a considerable amount of time
  • 118. Monitor I/O – Prefetchers IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 118
  • 119. Monitor I/O – Logging performance IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 119
  • 120. Monitor Storage – Table performance IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 120 Displays the performance data of each table or each schema
  • 121. Monitor Storage – Storage IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 121 Displays the storage usage data of each table or each schema
  • 122. Monitor Storage – Table space performance IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 122
  • 123. Monitor Storage – Table space utilization IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 123
  • 124. Monitor Workload Management IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 124 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=console-min-db-privileges-required-db2 User connecting to the monitored database requires to have additional privilege
  • 125. Db2 Data Management Console Data Back to Table of Contents
  • 126. Data IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 126 • Generate DDL • Generate SQL • Object dependency • Object level privilege • Table-like object • Browse data
  • 127. Data – Tables IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 127
  • 128. Data – Views IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 128
  • 129. Data – Indexes IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 129
  • 130. Data – Remote tables IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 130
  • 131. Data – Aliases IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 131
  • 132. Data – MQTs IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 132
  • 133. Data – Schemas IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 133
  • 134. Data – Sequences IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 134
  • 135. Data – Storage Objects – Table spaces IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 135
  • 136. Data – Storage Objects – Buffer pools IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 136
  • 137. Data – Application Objects – Stored procedures IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 137
  • 138. Data – Application Objects – User-defined Types IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 138
  • 139. Data – Application Objects – User-defined Functions IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 139
  • 140. Data – Authorization IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 140
  • 141. Data – Workloads IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 141
  • 142. Data – Configuration – Instance IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 142 Make the change Save to apply the changes
  • 143. Data – Configuration – Database IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 143 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-updating-configuration-parameters Make the change Save to apply the changes
  • 144. Db2 Data Management Console SQL Editor Back to Table of Contents
  • 145. Integrated SQL Editor IBM Db2 - Data Management Console • Check SQL syntax • Requires Personal Credential to run statements Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 145 Filter database objects Save or export query for later use (script) Explain SQL statement (Visual Explain) Tune SQL statement (Query Tuning) Search/Replace in the SQL text panel Right click for additional options Editor/Builder
  • 146. Run SQL – Editor IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 146 Right click on table name Select the statement Generated query Run query
  • 147. Run SQL – Editor IBM Db2 - Data Management Console • List of scripts • History Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 147
  • 148. Run SQL – Visual Explain IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 148 § The Db2 EXPLAIN command will try to use the explain tables under the user connected to the database. § If there is no explain tables under that user, then DB2 will try to use the explain tables under the SYSTOOLS schema, and the user connected to the database needs to have the INSERT/SELECT privileges for all the explain tables under SYSTOOLS.
  • 149. Run SQL – Builder IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 149 Drag and drop tables Create join Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=sql-using-builder
  • 150. Db2 Data Management Console Query Tuning Back to Table of Contents
  • 151. Query Tuning IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=welcome-tuning Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 151 § Format and annotate the statement § Generate access plan graph • Access plan graph describes both the operational details of query execution and how the data flows • A leaf node of an access plan graph is either a table node or an index node that represents a data source in the query execution plan • Typically a table node is at the bottom of the graph, and the access plan proceeds upward from there § Recommend RUNSTATS commands • Generated by the Statistics Analyzer • Lists all the tables that are accessed by the queries in the single-query or workload that are tuned and recommended actions for updating their associated catalog statistics § Recommend new indexes • The Storage comparison chart, Performance comparison chart, and Index recommendations table are displayed • The Storage comparison chart and Performance comparison chart provide a comparison between the original cost and the after- change cost if index recommendations are applied
  • 152. Query Tuning – Creating a Tuning Task IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=tuning-creating-task Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 152 3 ways to create a tuning task § From Run SQL Editor § From any of Statement tabs § From Notification Center Tune query when one statement is selected Tune workload when more than one statements are selected
  • 153. Query Tuning – Tuning Task definition IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 153 Tuning task name Tuning options Set values for Db2 special registers (EXPLAIN options), used by Db2 to create an access plan List of e-mails to receive notifications
  • 154. Query Tuning – View Results IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 154 Tuning task name Tuning Menu
  • 155. Db2 Data Management Console Replication Back to Table of Contents
  • 156. Replication IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 156 § Available in V3.1.9 or later § Enhancements in V3.1.10 • Enhanced throughput chart to use bar chart format • Introduced the following tabs in throughput chart for displaying the Q capture and Q depth details v Capture throughput Capture throughput Ø Number of rows that are sent from the source table v Capture Q depth Ø Number of messages on the transmission queue that are associated with the send queue v Apply throughput Apply throughput Ø Number of rows that are applied to the target table v Apply Q depth Ø Number of messages on the receive queue. • Enhanced latency chart with an interactive legend • Improved performance on latency and throughput charts by reducing the data points and fetch time • Improved Replication home page load speed and performance • Added 15-minutes time interval in the monitoring group details page • Introduced bidirectional configuration type option for creating a monitoring group
  • 157. Replication – Monitoring Group IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=replication-creating-monitoring-group Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 157 Data retrieval frequency to determine how often the console must refresh in the replication monitoring page Note: The console reads the monitoring information that the Q Capture and Q Apply program insert into their control tables. If you need granular monitoring information, you must set a low value for the Q Capture, and Q Apply monitor_interval parameters to enable the programs to update the performance information more frequently Name of the monitoring group to be created Optional: Short description of the monitoring group
  • 158. Replication – Database Server IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 158 Database connection profile that corresponds to the database server Test connection to validate the connection to the selected connection profile
  • 159. Replication – Schema IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 159 Select the schema that identifies the Q Capture or Q Apply program that you are interested in monitoring. Note: The console automatically detects all the schemas that are created on the selected connection profile for Q Capture or Q Apply program. You can select a single schema.
  • 160. Replication – Configurations IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 160 Select the QMAP configurations Note: The console automatically detects all the QMAP configurations on the connection profile for the selected schema. You can select a single or multiple configurations.
  • 161. Replication – Map Aliases IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 161 Connection profile for the other end of the selected QMAP configuration Note: If you selected the QMAP configuration from DBSAMP1 to DBSAMP2 in the previous step, you must select the DBSAMP2 connection profile Test connection to validate the connection to the selected connection profile
  • 162. Replication – Summary IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 162 Connection profile for the other end of the selected QMAP configuration Note: If you selected the QMAP configuration from DBSAMP1 to DBSAMP2 in the previous step, you must select the DBSAMP2 connection profile Test connection to validate the connection to the selected connection profile Review the information and click on Create button
  • 163. Replication – Monitoring IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 163 Click on Monitoring group name to see data Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=replication-monitoring
  • 164. Replication – Monitoring IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 164 Click on Consistency group name to see data
  • 165. Replication – Monitoring IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 165 Click on Consistency group name to see data Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=replication-monitoring Average The end-to-end latency is the average time per transaction between commit at the source by the application and commits at the target by the replication process. The details page for each replication set depicts latency with a multicolored graph that gives you an at-a-glance view of the different types of replication latency. Queue latency The average elapsed seconds between the time that messages are put on the send queue and the time that the target apply program gets them from the receive queue. This statistic includes the time that transactions were waiting in the receive queue of the target system, and is not necessarily a reflection of network performance. Apply latency The average elapsed milliseconds that it takes the replication programs at the target to read transactions and commit them to target tables. This statistic includes the database latency. Point-in-time latency The average elapsed milliseconds per transaction between the time that the first row change for a replicated transaction was applied at the target database and the time that the transaction was committed at the target database. This statistic indicates the performance of Db2® at the target system. Capture latency The average elapsed milliseconds between the time transactions were committed to the source table by the application and the time that the transactions were put on the transmission queue for transport to the target. It indicates the performance of the log capture process. If you suspend replication, this number is high on restart because the capture process is reading older logs. Consistency point It shows the Consistency point of transactions at the target for the active tables in the replication set, which helps you determine how caught up replication at the target is regarding database activity at the source. It is the source commit time for which all transactions to that point were applied to the target. The graph also displays whether the replication set is active, and then breaks down activity by table to show which tables in the set are active, which tables have errors, and the status of target table loading activity. Throughput The number of insert, update, and delete operations per second that were applied to the target for all tables in the replication set. The graph breaks down throughput into two categories: Capture throughput The number of rows per second that were sent from the source during the sampling interval. You can see the table details at the bottom of the page. The table name, schema, alert, and status are shown in the table. If the table is in error state, the alert column will show the error details. There is a filter, which can be used for filtering out the tables based on their status. Apply throughput The number of rows per second that were applied at the target during the sampling interval.
  • 166. Db2 Data Management Console Additional Features Back to Table of Contents
  • 167. Reporting IBM Db2 - Data Management Console Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=monitoring-creating-monitor-reports Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 167 § Database performance • Information on the overall status of each database and analyze the usage of key metrics in the database, such as CPU, memory, storage, throughput, SQL statements and more § Enterprise trends • Information about the top ten representative databases that use the most CPU, memory, storage, and log space resources • It is compiled from data in the representative databases which can be used to evaluate the usage trends in those resource categories § Top statements • Details on the monitoring metrics of top N SQL statements • The monitoring data is retrieved from package cache § Table usage • Details on the top n table objects and related key metrics information § Disk space usage • Information on the storage usage of the database Report name Connection profile name
  • 168. Reporting IBM Db2 - Data Management Console Select metrics for the report * A shorter interval equates to higher graph detail Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 168 Summary Page Click on Finish
  • 169. Reporting – Scheduling IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 169
  • 170. Reporting – View Results IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 170 § Active • Definition of reports and all scheduled reports • The on-demand reports are automatically deleted when the execution is complete § Completed • The completed data table displays the execution results of all scheduled and on-demand reports
  • 171. Reporting – Pruning IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 171 Prune Reports Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=reports-pruning-report § Prune by status • Prune report data based on execution status v Keep succeed report records keeps 7 days of succeeded report records by default Ø Data pruning success reports include the reports with Success, Stopping, or Warning status v Keep failed report records keeps 30 days of failed report records by default Ø Data pruning failed reports include the reports with Error status Note: All other reports cannot be pruned, for example, reports with Running status § Prune by schedule • Prune report data based on job schedule type v Keep hourly records keeps 30 days for report records for scheduled by hourly by default v Keep daily records keeps 90 days for report records for scheduled by daily by default v Keep weekly records keeps 180 days for report reports for scheduled by weekly by default v Keep monthly records keeps 360 days for job records for scheduled by monthly by default v Keep annually records keeps 720 days for report records for scheduled by annually by default v Keep on demand records keeps 30 days for job records for on demand by default § Prune by the number of records • Prune report data based on report record number and run number for each report v Keep record for keeps 30 days for all records by default v Keep run records for each report keeps last 12 run records for each report by default Note: The report data is pruned only if both rules are satisfied § Disable pruning • Disable report data pruning Note: Disabling pruning keeps all the records indefinitely. This increases the overhead and impacts storage capacity and performance The console scans the report data periodically in the background and prunes report data history. The default scan time is in 24:00:00 for console server time. The console pruning scan time can be modified in the configuration file as follows: a.) Go to the folder <dmc_home>/Config/dswebserver_override.properties b.) Add or modify the following parameter 'pruning_start_time = {HH}:{MM}:{SS}' where, {HH}:{MM}:{SS} is the console server time, for example:'pruning_start_time = 14:13:30’ c.) Restart the console server
  • 172. Blackout – Web UI IBM Db2 - Data Management Console Back to Table of Contents Used to avoid a database connection from DMC to the monitored database, or disabling some of the functions such as monitoring and alerting during database maintenance window 3 Types of Blackout § Full blackout v Disconnects databases from console § Monitor and alert blackout v Pauses monitoring and alerts for databases. The monitor does not collect metric data and the alert are not generated. § Alert blackout v Pauses only alerts for databases. The alerts are not generated. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-blackouts IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 172
  • 173. Blackout – Pruning IBM Db2 - Data Management Console Back to Table of Contents Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=blackouts-pruning IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 173 § Prune by status • Prune blackouts based on blackout execution status v Keep succeed blackout records keeps 7 days of succeeded blackout records by default Ø Data pruning success blackout includes blackouts with Success, Stopping, or Warning status v Keep failed blackout records keeps 30 days of failed blackout records by default Ø Data pruning failed blackout includes blackouts with Error status Note: All other blackouts cannot be pruned, for example, blackouts with Running status § Prune by schedule • Prune blackouts based on blackout schedule type v Keep daily records keeps 90 days for blackout records for scheduled by daily by default v Keep weekly records keeps 180 days for blackout records for scheduled by weekly by default v Keep monthly records keeps 360 days for blackout records for scheduled by monthly by default v Keep on demand records keeps 30 days for blackout records for on demand by default § Prune by the number of records • Prune blackouts based on blackout record number and run number for each blackout v Keep record for keeps 30 days for all blackouts by default v Keep run records for each blackout keeps last 12 run records for each blackout by default Note: The blackout is pruned only if both rules are satisfied § Disable pruning • Disable blackout data pruning Note: Disabling pruning keeps all the records indefinitely. This increases the overhead and impacts storage capacity and performance Prune Blackouts The console scans the blackout data periodically in the background and prunes blackout data history. The default scan time is in 24:00:00 for console server time. The console pruning scan time can be modified in the configuration file as follows: a.) Go to the folder <dmc_home>/Config/dswebserver_override.properties b.) Add or modify the following parameter 'pruning_start_time = {HH}:{MM}:{SS}' where, {HH}:{MM}:{SS} is the console server time, for example:'pruning_start_time = 14:13:30’ c.) Restart the console server
  • 174. Blackout – REST API IBM Db2 - Data Management Console Back to Table of Contents § Does not support scheduling a blackout event § You can setup a cronjob to enable and disable a blackout event by calling the RESTful APIs § While setting a blackout event for a connection profile, every HADR/pureScale profile is considered as a common profile and the blackout event is set one at a time IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 174 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=apis-configuring-blackout-event-rest-api
  • 175. Jobs IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 175 Create a job Prune jobs History Job Chain
  • 176. Jobs – Creating a Job 1/3 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 176 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-creating-scheduling-jobs § SQL script • The job manager connects to the database and runs the SQL commands that are included in the job script directly on the database § CLP and shell script • The job manager uses SSH to log in to the database server as the user ID that is defined in the database connection, and then runs the command line processor commands directly on the Db2 console of the server • Not supported on container-based Db2 products Note: To run the Db2 CLP script jobs on a database, the user ID that is used to run the job must have permission to log in to the database server by using SSH. Ensure to specify the complete path if you want to read or execute files by using CLP script because the console might not receive the environment variable from the Db2 server. Job name Job Status § Error - Job execution returns an error § Stopped - Job execution is terminated or stopped due to timeout § Success - Job execution succeeds § Warning - Job execution succeeds with warning Copy statement Format SQL statement Job code
  • 177. Jobs – Creating a Job 2/3 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 177 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-creating-scheduling-jobs Credential Type Select database(s)
  • 178. Jobs – Creating a Job 3/3 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 178 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-creating-scheduling-jobs Summary Page Click on Finish
  • 179. Jobs – Running On-demand Jobs IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 179 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-creating-scheduling-jobs View options
  • 180. Jobs – History IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 180 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=environment-creating-scheduling-jobs View options Status
  • 181. Jobs – Status IBM Db2 - Data Management Console Back to Table of Contents Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-job-status IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 181
  • 182. Jobs – Pruning Jobs IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 182 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-pruning-job View options Prune jobs § Prune by status • Prune jobs based on job execution status v Keep succeed job records keeps 7 days of succeeded job records by default Ø Data pruning success job includes jobs with Success, Stopping, or Warning status v Keep failed job records keeps 30 days of failed job records by default Ø Data pruning failed job includes jobs with Error status Note: All other jobs cannot be pruned, for example, jobs with Running status § Prune by schedule • Prune jobs based on job schedule type Ø Keep minutes records keeps 7 days for job records for scheduled by every minute by default Ø Keep hourly records keeps 30 days for job records for scheduled by hourly by default Ø Keep daily records keeps 90 days for job records for scheduled by daily by default Ø Keep weekly records keeps 180 days for job reports for scheduled by weekly by default Ø Keep monthly records keeps 360 days for job records for scheduled by monthly by default Ø Keep on demand records keeps 30 days for job records for on demand by default § Prune by the number of records • Prune jobs based on job record number and run number for each job v Keep record for keeps 30 days for all jobs by default v Keep run records for each job keeps last 12 run records for each job by default Note: The job is pruned only if both rules are satisfied § Disable pruning • Disable job data pruning Note: Disabling pruning keeps all the records indefinitely. This increases the overhead and impacts storage capacity and performance The console scans the job data periodically in the background and prunes job data history. The default scan time is in 24:00:00 for console server time. The console pruning scan time can be modified in the configuration file as follows: a.) Go to the folder <dmc_home>/Config/dswebserver_override.properties b.) Add or modify the following parameter 'pruning_start_time = {HH}:{MM}:{SS}' where, {HH}:{MM}:{SS} is the console server time, for example:'pruning_start_time = 14:13:30’ c.) Restart the console server
  • 183. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-updating-job-chain Job Chain – Creating a Job Chain 1/4 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 183 Job chain name Job Chain Status § Error – Job Chain execution returns an error § Stopped - Job Chain execution is terminated or stopped due to timeout § Success - Job Chain execution succeeds
  • 184. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-updating-job-chain Job Chain – Creating a Job Chain 2/4 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 184 Main Job Run Condition Success Run Condition Success § You can combine the job nodes into a job chain. Each job that you add to the chain is triggered based on the run condition that is set for each node § To add a node, click the overflow menu § To edit an existing node, click the node and view the properties on the right panel Overflow menu Properties
  • 185. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-updating-job-chain Job Chain – Creating a Job Chain 3/4 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 185 Credential Type Select database(s)
  • 186. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-updating-job-chain Job Chain – Creating a Job Chain 4/4 IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 186 Summary Page Click on Finish
  • 187. Job Chain – Running On-demand Job Chain IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 187 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=jobs-creating-updating-job-chain View options
  • 188. Job Chain – Pruning Job Chain IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 188 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=chain-pruning-job Prune job chain § Prune by status • Prune job chains based on job execution status v Keep succeed job chain records keeps 7 days of succeeded job records by default Ø Data pruning success job includes jobs with Success, Stopping, or Warning status v Keep failed job chain records keeps 30 days of failed job records by default Ø Data pruning failed job chain includes job chains with Error status Note: All other job chains cannot be pruned, for example, job chains with Running status § Prune by schedule • Prune job chains based on job schedule type v Keep minutes records keeps 7 days for job chain records for scheduled by every minute by default v Keep hourly records keeps 30 days for job chain records for scheduled by hourly by default v Keep daily records keeps 90 days for job chain records for scheduled by daily by default v Keep weekly records keeps 180 days for job chain records for scheduled by weekly by default v Keep monthly records keeps 360 days for job chain records for scheduled by monthly by default v Keep on demand records keeps 30 days for job chain records for on demand by default § Prune by the number of records • Prune jobs based on job chain record number and run number for each job chain v Keep record for keeps 30 days for all job chains by default v Keep run records for each job keeps last 12 run records for each job chain by default Note: The job chain is pruned only if both rules are satisfied § Disable pruning • Disable job chain data pruning Note: Disabling pruning keeps all the records indefinitely. This increases the overhead and impacts storage capacity and performance The console scans the job chain data periodically in the background and prunes job chain data history. The default scan time is in 24:00:00 for console server time. The console pruning scan time can be modified in the configuration file as follows: a.) Go to the folder <dmc_home>/Config/dswebserver_override.properties b.) Add or modify the following parameter 'pruning_start_time = {HH}:{MM}:{SS}' where, {HH}:{MM}:{SS} is the console server time, for example:'pruning_start_time = 14:13:30’ c.) Restart the console server
  • 189. Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=welcome-working-apis RESTful Services APIs Support IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 189
  • 190. REST API – Examples IBM Db2 - Data Management Console IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 190 TOKEN=$(curl -X POST http://localhost:11080/dbapi/v4/auth/tokens -H 'content-type: application/json' -d '{"userid":"admin","password":"admin"}' | jq -r '.token' ) echo $TOKEN TOKEN=$(curl --silent --insecure -X POST http://localhost:11080/dbapi/v4/auth/tokens -H 'content-type: application/json' -d '{"userid":”’admin’”,”password":”’admin'"}' | jq -r '.token' ) BLACKOUTSTATUS=$(curl --silent --insecure -X PUT http://localhost:11080/dbapi/v4/dbprofiles/blackout/SAMPLE -H 'authorization: Bearer '$TOKEN -H 'content-type: application/json' -d '{"blackout":"'$BLACKOUT'"}' ) Getting a token Setting up blackout Back to Table of Contents TOKEN=$(curl --silent --insecure -X POST http://localhost:11080/dbapi/v4/auth/tokens -H 'content-type: application/json' -d '{"userid":”’admin'","password":”’admin’"}' | jq -r '.token’ ) STORAGESTATUS=$(curl --silent --insecure -X $PARAMETER http://localhost:11080/dbapi/v4/monitorprofile/front/config/tablestorage -H 'accept: application/json' -H 'authorization: Bearer '$TOKEN -H 'content-type: application/json;charset=utf-8' -d '{"enabled":”’POST'","include_sys":"false","max_rows_read":5000,"schedule_rule":"0 0 12 * * ?"}' ) Disabling Storage Query Requires jq command installed on the machine
  • 191. Audit Logging IBM Db2 - Data Management Console § Audit event types • All successful and unsuccessful login attempts • All logoff attempts • Attempts to perform unauthorized functions • Activities performed by admin accounts • Attempts to update console settings • Connection profile privilege management audit § Audit storage methods • Db2 Data Management Console's repository v AUDIT_LOG table (Default) Ø Two columns q TIMESTAMP which is the timestamp in milliseconds since Jan 1 00:00, 1970 q LOG which is the audit record • Server's file system v audit.* under <dmc installation dir>/logs directory Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 191 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=apis-audit-logs
  • 192. Audit REST API IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 192 Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=logs-configuring-audit § You can view and update audit settings using APIs § The settings are saved in the repository table named AUDIT_CONFIG § Audit settings are configured dynamically, and are effective when the API is called successfully § Audit setting APIs are available in two groups • one group is to return or update settings individually • one group is to return or update settings collectively or as a whole § By default, when the Audit APIs are called, the console uses the repository connection credential to perform Auditing actions. If additional security is added to SELECT or UPDATE of AUDIT_CONFIG table, and the credential used is different from the repository connection credential, then, an optional input parameter to the API can be used to pass in the security credential.
  • 193. Db2 Data Management Console dmctop Back to Table of Contents
  • 194. dmctop – Key Features IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 194 § Sessions • See at a glance which connections are active, blocked, or idle • Drill down on a connection to see details of the current state of execution of SQL that is in question § Running SQL • See a list of recently run statements • Drill down is provided to see the full SQL text or run explain on a statement § Top Consumers • Find which connections or activities are consuming the most CPU, IO or other resource § Time spent • Shows a breakdown of where the monitored database is spending time broken down to the full granularity provided by Db2 § pureScale performance • See Db2 pureScale performance metrics and cache facility state § HADR status • See primary and standby database HADR configuration state § Federation • View federated activity for the federated database
  • 195. dmctop – Download and Installation IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 195 § Simple text-based tool for monitoring, similar to the dsmtop and db2top § Can monitor Db2 V11.1 and above § Beginning with IBM Db2 Data Management Console v3.1.5, dmctop v1.0.2 is bundled with Db2 v11.5.6 § Download the latest dmctop at IBM Fix Central § Supported only on Power® 8 and later processors § Setting up dmctop • https://www.ibm.com/docs/en/db2-data-mgr- console/3.1.x?topic=dmctop-setting-up § dmctop manual • https://ibm.github.io/dmctop-wiki/
  • 196. dmctop – Comparing dmctop and db2top IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 196 Improvements and new features § Default secured connection (SSL) support § Support for Db2 features including pureScale, BLU (column store tables) and workload management § Monitor remote database § Monitor federated database § Easier navigation with menus, view specific help available in the footer section § Reset baseline, hide idle connections, visual alerts, spanning view across multiple monitors
  • 197. Running dmctop IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 197 § Running dmctop from Db2 server • When running on database server, dmctop connects to local database without requiring credentials • Uses existing ODBC driver on the server hence installation of separate ODBC driver is not required Ø Note: Db2 v11.5.5. databases only contain dmctop v1.0.0.0 on Linux and Windows operating systems 1) Copy dmctop on server under the desired location Ø Note: If you want to use dmctop v1.0.0.0 for Db2 v11.5.5. databases, skip step1 and go directly to step 2 2) Run the dmctop v For Linux/AIX/MacOS dmctop -d SAMPLE v For Windows dmctop.exe -d SAMPLE § Running dmctop remotely • The easiest way to run dmctop is to fully specify the database and user credentials • dmctop utility will use the CLI driver • For Linux/AIX/MacOS v dmctop -d <database_name> -n <host_name> -r <port_number> -u <user_id> [-cert-path Root-CA certificate absolute path] • For Windows v dmctop.exe -d <database_name> -n <host_name> -r <port_number> -u <user_id> [-cert-path Root-CA certificate absolute path] • For example v For Linux/AIX/MacOS dmctop -d SAMPLE -n localhost -r 50000 -u db2inst1 v For Windows dmctop.exe -d SAMPLE -n localhost -r 50000 -u db2inst1
  • 198. Running dmctop IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 198 § Run dmctop in background mode • When using the -b parameter, saves information to file in CSV format • Issuing multiple sub-options for background mode (-b) is not supported • The -b parameter takes one of the following single character sub-option values v d - overview v l - connections v a - top consumer activities v J - Skew monitor v s - in-flight statements v D - Package cache v L - Lock statistics v m - DB memory v I - Instance memory v F - Federation v A - HADR • For example v Using default file name Ø For Linux/AIX/MacOS dmctop -d SAMPLE -n localhost -r 50000 -u db2inst1 - insecure -b d Ø For Windows dmctop.exe -d SAMPLE -n localhost -r 50000 -u db2inst1 - insecure -b d Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=dmctop-setting-up v Specifying output file name Ø For Linux/AIX/MacOS dmctop -d SAMPLE -n localhost -r 50000 -u db2inst1 -insecure -b d -f <outputFile>.csv Ø For Windows dmctop.exe -d SAMPLE -n localhost -r 50000 -u db2inst1 -insecure -b d -f <outputFile>.csv
  • 199. dmctop IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 199
  • 200. dmctop – Shortcuts IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 200 Use shortcuts to drill down information
  • 201. Db2 Data Management Console Configuration Files Back to Table of Contents
  • 202. Configuration Files – Config directory IBM Db2 - Data Management Console Back to Table of Contents Configuration files are located under <dmc_home>/Config directory § dswebserver_override.properties • Overrides the configuration in dswebserver.properties file • Not changed during DMC upgrade • Console hostname, ipaddress, URL • Authentication Configuration (SuperAdmin, LDAP, Repository Database) • e-mail configuration (e-mail host, port number, e-mail address) § dswebserver.properties • Overwritten during DMC upgrade • Contains the current DMC version (build and release) • 10.01 support enabled/disabled § ext_ldap_config_v2.json • LDAP configuration information when LDAP authentication is used § metadb_override.properties • Overrides the configuration in metadb.properties file • Not changed during DMC upgrade • Repository database information (host, port number, database name) § metadb.properties • Overwritten during DMC upgrade • Repository database internal information § monitorProfile directory • Default configuration when creating new monitoring profiles § product directory • about.properties file • License files § Configuration files for logging • admin_log.properties • alert_log.properties • deletedDBData_log.properties • diagnosis_log.properties • DS_System_log.properties • explain_log.properties • fixnow_log.properties • home_log.properties • LOAD_log.properties • monitor_log.properties • repoUtil_log.properties • runsql_log.properties • sample_log.properties • setup_log.properties • tuning_log.properties • UserUtils_log.properties Relevant information only, do not to change the contents, unless requested by development or DMC manual § server.crt and server.key • Original certificate to be used for SSL configuration • Recommended to be changed by using the steps from https://www.ibm.com/docs/en/db2-data-mgr- console/3.1.x?topic=securing-enabling-https-db2-data- management-console § SSLConfig.xml • SSL configuration § TLSOnlyConfig.xml • TLS configuration sslProtocol="TLSv1.2" IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 202
  • 203. Additional Configuration Files IBM Db2 - Data Management Console Back to Table of Contents Under <dmc_home>/wlp/usr/servers/dsweb § bootstrap.properties • Port numbers v port=11080 v https.port=11081 v job.http.port=11088 v internal.port=11082 • SSL configuration v https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-enabling-https-db2-data-management-console • Ciphers § jvm.options • Contains the JVM configuration, memory allocation for the DMC java process v -Xms (start) v -Xmx (maximum) • Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-resolving-out-memory-errors § server.env • WLP_OUTPUT_DIR dump files directory configuration IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 203 Relevant information only, do not to change the contents, unless requested by development or DMC manual
  • 204. Db2 Data Management Console Log Files Back to Table of Contents
  • 205. Log Files IBM Db2 - Data Management Console Back to Table of Contents § Configuration files for logging located under <dmc_home>/Config directory § Log files are located under <dmc_home>/logs directory § DMC start is required after changing the logging property files § Circular logging § Parameters • MaxEdition v Default 4 v Starts from 0, where 0 is the most recent data • MaxFileSizeInM v Default 10 v Size in megabites • LogInitialLevel v Default 6 v Frequently used Ø LOG_ERROR = 2 Ø LOG_WARNING = 4 Ø LOG_INFO = 6 Ø LOG_DEBUG = 9 Ø LOG_TRACE = 13 Component Property File Log File Admin admin_log.properties admin.0 Alert alert_log.properties alert.0 deletedDBData_log.properties deletedDBData.0 diagnosis_log.properties diagnosis.0 General DS_System_log.properties DS_System.0 Explain explain_log.properties explain.0 fixnow_log.properties fixnow.0 home_log.properties home.0 LOAD_log.properties LOAD.0 monconn_log.properties monconn.0 Monitor monitor_log.properties monitor.0 Repository repoUtil_log.properties repoUtil.0 Run SQL runsql_log.properties runsql.0 sample_log.properties sample.0 Setup setup_log.properties setup.0 Query Tuning tuning_log.properties tuning.0 UserUtils_log.properties UserUtils.0 IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 205
  • 206. Additional Ways to Change Log Level IBM Db2 - Data Management Console Back to Table of Contents Logs level can also be changed by § logUtils.sh script Additional info https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-customizing-trace-log-settings § Logger REST API curl –X PUT ‘SCHEME://HOST:PORT/<component>/logger’ -H ‘Authorization: Bearer {getting_a_token}’ -H ‘cache-control: no-cache’-H ‘content-type: application/jason’ -d ‘{“loggerName”:”<component>”,”logLevel”:”13”,”maxFileSize”:”10”,”editions”:”4”, “enableRolling”:”true”}’ –k Where • component: dbapi/v3, admin, monitor, run_sql • Parameters v loggerName is a must, accepted values are DS_System, admin, monitor, runsql v logLevel: logger level, accepted values are 2, 4, 6, 9, and 13 Ø LOG_ERROR = 2 Ø LOG_WARNING = 4 Ø LOG_INFO = 6 Ø LOG_DEBUG = 9 Ø LOG_TRACE = 13 v enableRolling: Whether to enable the rolling log – true or false v maxFileSize: Maximum size of rolling log files (MB) v editions: Maximum number of rolling log files IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 206
  • 207. Additional Log Files IBM Db2 - Data Management Console Back to Table of Contents § messages.log file • Under <dmc_home>/logs directory • Show status of DMC server • Last date and time that the server was started § ffdc directory • The FFDC (First Failure Data Capture) directory preserves the information that is generated from a processing failure used by IBM Support • You can remove the FFDC information after investigation • The dump file is created in the <dmc_home>/work/dsweb directory. If you modify the WLP_OUTPUT_DIR attribute in server.env, the dump file will be stored in <WLP_OUTPUT_DIR>/dsweb directory. You can remove the dump files (javadump, core, heapdump etc.) after investigation § Job Scheduler Server log files • Under <dmc_home>/addons/job-scheduler/logs § Dr S log files • Under <dmc_home>/addons/drs/drs-agent/logs IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 207
  • 208. Db2 Data Management Console dsutil Files Back to Table of Contents
  • 209. dsutil/bin Files – Utilities directory IBM Db2 - Data Management Console Back to Table of Contents Script files under <dmc_home>/dsutil/bin directory § crypt.sh • Encrypt password • Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=installation-customized- product-setup § deleteRepoData4DeletedConnection.sh • Clean up monitor data for deleted database connections • Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-cleaning-up- monitor-data-deleted-connections § deleteRepoData_expired.sh • Clean up monitor data for deleted database connections • Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-deleting-expired- monitor-data § enable_setup_admin.sh • Reset the authentication configuration settings back to the SuperAdmin user during the installation • Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=configuration-resetting- authentication § libertyCertsCrypt.sh • Encrypt SSL certificate password • Additional information • https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=securing-enabling- https-db2-data-management-console § logUtils.sh • Change log level script IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 209 § repoUtil.sh • Resolving transaction log for the database is full error • Additional information • https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-resolving- transaction-log-database-is-full-error § retrieveAdminCred.sh • Retrieve SuperAdmin credentials § setupRepo.sh • Avoid LOB errors when setting up DMC repository database • Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-resolving-transaction- log-database-is-full-error § changeRepoDbUserPWD.sh • Change password for the userid connecting to the repository database • Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=administering-resetting- repository-user-password Relevant information only, do not to change the contents, unless requested by development or DMC manual
  • 210. dsutil/bin/pre_req_script Files – Utilities directory IBM Db2 - Data Management Console Back to Table of Contents Script files under <dmc_home>/dsutil/bin/pre_req_script directory § dmc sub-directory • aix_bash_check.sh v Check if bash is enabled on AIX only • check_dmc_server.sh v Check if the server has enough resources according to the DMC capacity planning • check_dmc_capacity.sh v Called by check_dmc_server.sh script § monitor_db sub directory • aix_bash_check.sh v Check if bash is enabled on AIX only • check_mon_db.sh v Check required AIX bash if applicable v Check DB configuration for minimum requirements to collect monitor statistics v Check userid for minimum required object privileges • check_monitor_dbcfg_with_auth.sh v Check target database to ensure database configuration parameters meet the minimum requirements to collect monitor statistics • grant_mondb_min.sh v Grant the user minimum object privileges on a restrictive monitoring database v Exceptions 1) user issuing job cancellation may require higher privileges. 2) user running REORG or RUNSTAT in tuning may require higher privileges • verify_mondb_min.sh v Verify if the user meets minimum required privileges on the monitored database § repository sub-directory • aix_bash_check.sh v Check if bash is enabled on AIX only • check_repo_capacity.sh v Check CPU, memory, and disk space for the repository database • check_repo_config.sh v Check required repository database configuration • check_repo_server.sh v Check if the user has required privileges for the repository database • create_repodb.sh v Create the repository database • create_repo_objects.sh • create_repo.sh v Check requirements and create repository database Ø check_repo_config.sh Ø create_repo_objects.sh Ø create_repodb.sh Ø create_repo_objects.sh Ø create_repodb.sh • grant_repodb_min.sh v Grant the user minimum object privileges on the repository database • verify_repodb_min.sh v Script to verify if a user on repodb database meets minimum required object prilvileges IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 210 Relevant information only, do not to change the contents, unless requested by development or DMC manual
  • 211. Db2 Data Management Console Common issues Back to Table of Contents
  • 212. Out of Memory Errors IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 212 § Symptoms • DMC server runs for a while and it gets unresponsive or has unpredictable behavior § Causes • By default, the Java virtual manager that is installed with IBM Db2 Data Management Console uses up to a certain amount of memory. The memory that is needed to monitor databases depends on the monitoring profile settings and the number of databases being monitored. If the memory that is needed to monitor databases is significant, you will see out-of-memory errors. § Diagnosing the problem • Investigate the resources available to the server according to the Capacity Planning • Make sure that you have enough resources available for DMC server, increasing the configuration but not having enough memory available, DMC server will crash again § Resolving the problem • 2 ways to change JVM configuration v Web UI Administration à Settings à JVM, if the DMC server is not down v Edit the <dmc_home>/ wlp/usr/servers/dsweb/jvm.options file • Default JVM configuration v -Xms512m v -Xmx2048m • Modify the default JVM options for the initial (Xms) and maximum (Xmx) heap size values for memory allocation • Restart DMC server Additional information https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-resolving-out-memory-errors https://www.ibm.com/support/pages/data-management-console-dmc-server-reports-out-memory-errors
  • 213. Timestamp conversion IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 213 § Export data into a flat file (CSV), the timestamp value format in the exported file is unsupported • Changing the date format https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-changing-date-format-in-excel-reports § Timestamp Converter • https://timestamp.online/
  • 214. We are here to help! § Data Management Console Community page • https://community.ibm.com/community/user/hybriddatamanagement/blogs/maryia-rakina1/2021/04/21/db2- data-management-console-product-hub?CommunityKey=ea909850-39ea-4ac4-9512- 8e2eb37ea09a&Tab=groupdetails § Help us improve our product using IBM Aha! • https://ibm-data-and-ai.ideas.ibm.com/?category=7093947472735440072 § Create a case with IBM Data Management Console Support team • https://www.ibm.com/mysupport/s/?language=en_US • Attach screen shots showing the problem • Provide monitored database name having the issue • dmccollector https://www.ibm.com/docs/en/db2-data-mgr-console/3.1.x?topic=support-exchanging-information Questions? IBM Db2 - Data Management Console Back to Table of Contents IBM Corp. - V3.1.10 - February 2023 - Cintia Ogura 214