On this page:

Your Rating:
Results:
PatheticBadOKGoodOutstanding!
16 rates
To monitor IBM DB2 with Database Visibility, you must be running DB2 9.x or newer. 

Connection Details

FieldDescription
Database TypeThe database type that you want to monitor.
Database AgentThe Database Agent that manages the collector.
NameThe name you want to identify the collector by.
Hostname or IP AddressThe hostname or IP address of the machine that your database is running on.
DatabaseThe name of the database instance that you want to monitor.
Listener PortThe TCP/IP address of the port on which your database communicates with the Database Agent
Custom JDBC Connection StringThe JDBC connection string generated by the database agent, for example, jdbc:db2://. You can also specify a custom connection string, which is useful for setting custom authentication options.
UsernameThe name of the user who is connecting to and monitoring the database through the Database Agent. The user should have the permissions described in User Permissions for IBM DB2 LUW.
PasswordThe password of the user who is connecting to and monitoring the database through the Database Agent.
Sub-Collectors

Click to monitor multiple database instances in a consolidated view, and aggregate metrics of multiple databases. To monitor a custom cluster, you can add additional hostname or IP address, and port details for each sub-collector. You can add up to a total of 29 sub-collectors. Thereby, 30 databases can be monitored in a custom cluster. In addition to the licenses consumed by the main collector, each sub-collector consumes one or more licenses, depending on the database type.

Note

  • All connection parameters other than the hostname or IP address, and port details of the sub-collector are the same as the main collector. If you want to specify different parameters for the sub–collectors, while creating or editing the collector configuration, you can do that only via the Create Collector API.

  • You cannot convert a custom cluster collector to a standalone collector. If you want to monitor a standalone database, delete the entire custom cluster collector and create a fresh standalone collector. However, note that deleting the custom cluster collector will delete all its historical data.
Connection PropertiesClick to add a new JDBC connection property or edit an existing property for relational databases.
CyberArkClick to enable CyberArk for database username and password. When CyberArk is enabled, information about Application, Safe, Folder, and Object is required to fetch the username and password for your database. To use CyberArk with Database Visibility, you must download the JavaPasswordSDK.jar file from the CyberArk web site and rename the file to cyberark-sdk-9.5.jar. Then, you must copy the JAR file to the lib directory of the database agent zip file. 
Logging EnabledClick to enable verbose mode logging, which logs all communications between the Controller and the Collector. Enable only during troubleshooting because logging consumes a lot of disk space. If you have enabled logging, you can click the logging icon in the Log column of the Collector Administration window to view the log file. The log files are located in the <db_agent_home>\agent directory and have the format <CollectorName>_out.log and <CollectorName>_err.log.

User Permissions for IBM DB2 LUW

The monitoring user needs SYSMON authority and connect privileges to monitor. In general, this user must be a part of the sysmon_group.

To generate an execution plan, you must create the associated EXPLAIN tables in the schema.

DB2 version 9.7 and greater

For complete Database Visibility functionality, the following monitoring switches of the DB2 server need to be enabled: "TIMESTAMP".

You can enable the "TIMESTAMP" monitoring switch by the following commands:

update dbm cfg using dft_mon_timestamp on;
update db cfg using mon_act_metrics BASE


Privileges

grant select on SYSIBMADM.MON_CURRENT_SQL to user DBMon_Agent_User
grant select on SYSIBMADM.MON_LOCKWAITS to user DBMon_Agent_User
grant execute on function SYSPROC.MON_GET_CONNECTION to user DBMon_Agent_User
grant execute on function SYSPROC.MON_GET_PKG_CACHE_STMT to user DBMon_Agent_User
(version 10.5 and above) grant execute on function SYSPROC.MON_GET_TRANSACTION_LOG to DBAgent_User
(version 10.5 and above) grant execute on function SYSPROC.MON_GET_DATABASE to DBAgent_User

 

Replace DBMon_Agent_User with the user name under which you run the Database Visibility Agent.

DB2 version 9.5

For complete Database Visibility functionality, the following monitoring switches of the DB2 server need to be enabled: "STATEMENT", and "TIMESTAMP".

You can enable these monitoring switches by the following commands:

update dbm cfg using dft_mon_stmt on;
update dbm cfg using dft_mon_timestamp on;

 

Privileges

grant select on SYSIBMADM.SNAPSTMT to user DBMon_Agent_User 
grant select on SYSIBMADM.SNAPAPPL_INFO to user DBMon_Agent_User 
grant select on table SYSIBMADM.ENV_PROD_INFO to user DBMon_Agent_User 

where DBMon_Agent_User is the user name under which you run the Database Visibility Agent.

User Permissions when restrict_access is set to YES

If your database has the restrict_access parameter set to YES, you must grant the following privileges.

grant select on SYSIBMADM.MON_CURRENT_SQL to user DBMon_Agent_User;
grant select on SYSIBMADM.MON_LOCKWAITS to user DBMon_Agent_User;
grant execute on function SYSPROC.MON_GET_CONNECTION to user DBMon_Agent_User;
grant select on SYSIBMADM.SNAPAPPL_INFO to user DBMon_Agent_User;
grant EXECUTE on function SYSPROC.MON_GET_PKG_CACHE_STMT to user DBMon_Agent_User;
grant execute on function SYSPROC.MON_GET_TRANSACTION_LOG to user DBMon_Agent_User;
grant EXECUTE on package NULLID.SQLC2K26 to user DBMon_Agent_User;
grant select on SYSIBM.SYSDUMMY1 to user DBMon_Agent_User;
grant select on SYSIBMADM.ENV_PROD_INFO to user DBMon_Agent_User;
grant select on SYSIBMADM.ENV_SYS_RESOURCES to user DBMon_Agent_User;
grant execute on function SYSPROC.SNAP_GET_STMT(varchar(),Integer) to user DBMon_Agent_User;
grant select on SYSCAT.STATEMENTS to user DBMon_Agent_User;
grant select on SYSIBMADM.DBCFG to user DBMon_Agent_User;
grant execute on function SYSPROC.SNAP_GET_DB(varchar(),Integer) to user DBMon_Agent_User;
grant EXECUTE on package NULLID.SYSSH200 to user DBMon_Agent_User;
grant select on SYSIBMADM.ENV_SYS_RESOURCESto user DBMon_Agent_User;
grant select on SYSCAT.DBAUTH to user DBMon_Agent_User;
grant execute on function SYSPROC.SNAP_GET_DBM(Integer) to user DBMon_Agent_User;
grant select on syscat.schemata to user DBMon_Agent_User;

Replace DBMon_Agent_User with the user name under which you run the Database Visibility Agent.

Generate Execution Plans

To generate an execution plan in DB2 10.1 or later, you must create the associated EXPLAIN tables in the schema.

  1. Create a separate file system.
  2. Create a separate tablespace.

    db2 "CREATE STOGROUP DBMon_Agent_User ON '/srv/db2/username1/$\{INSTANCENAME\}'" db2 "CREATE TABLESPACE DBMon_Agent_User MANAGED BY AUTOMATIC STORAGE USING STOGROUP DBMon_Agent_User"
  3. Create a schema.

    db2 "CREATE SCHEMA DBMon_Agent_User"
  4. Grant the following privileges:

    db2 "GRANT USE OF TABLESPACE DBMon_Agent_User to user DBMon_Agent_User" db2 "CREATEIN ON SCHEMA DBMon_Agent_User TO USER DBMon_Agent_User"
  5. Call the SYSPROC.SYSINSTALLOBJECTS procedure:

    db2 "CALL SYSPROC.SYSINSTALLOBJECTS('EXPLAIN', 'C', 'tablespace-name', 'schema-name' ) "
  • No labels