Database Agent configuration - DB2

DB2 9.7.0.11, 10.1, 10.5, 11.1

DB2 9.8 is not supported.

The sysmon authority assigned to the group specified by the sysmon_group configuration parameter (run db2 get database manager cfg on the DB2 machine to check). If the parameter is null it defaults to the administrators group (Windows) or the primary group of the DB2 instance owner (Linux/Unix).

grant sqladm on database to <dtagent>
grant dataaccess on database to <dtagent>
CALL SYSPROC.SYSINSTALLOBJECTS('EXPLAIN', 'C', CAST (NULL AS VARCHAR(128)), CAST (NULL AS VARCHAR(128))) -- optional, used for explain plan retrieval

Replacement for DATAACCESS authority (AppMon 7.0.2):


	grant execute on function SYSPROC.COMPILATION_ENV to <dtagent>
	grant execute on function SYSPROC.AUTH_LIST_GROUPS_FOR_AUTHID to <dtagent>
	grant execute on function SYSPROC.MON_FORMAT_LOCK_NAME to <dtagent>
	grant execute on function SYSPROC.MON_GET_CONNECTION to <dtagent>
	grant execute on function SYSPROC.MON_GET_CONTAINER to <dtagent>
	grant execute on function SYSPROC.MON_GET_PKG_CACHE_STMT to <dtagent>
	grant execute on function SYSPROC.MON_GET_SERVICE_SUBCLASS to <dtagent>
	grant execute on function SYSPROC.MON_GET_TABLESPACE to <dtagent>
	grant execute on function SYSPROC.MON_GET_WORKLOAD to <dtagent>
	grant execute on function SYSPROC.MON_GET_LOCKS to <dtagent>

	grant select on SYSIBMADM.ENV_INST_INFO to <dtagent>
	grant select on SYSIBMADM.ENV_SYS_INFO to <dtagent>
	grant select on SYSIBMADM.ENV_SYS_RESOURCES to <dtagent>
	grant select on SYSIBMADM.TBSP_UTILIZATION to <dtagent>

	grant all on SYSTOOLS.EXPLAIN_ACTUALS to <dtagent>
	grant all on SYSTOOLS.EXPLAIN_ARGUMENT to <dtagent>
	grant all on SYSTOOLS.EXPLAIN_DIAGNOSTIC to <dtagent>
	grant all on SYSTOOLS.EXPLAIN_DIAGNOSTIC_DATA to <dtagent>
	grant all on SYSTOOLS.EXPLAIN_INSTANCE to <dtagent>
	grant all on SYSTOOLS.EXPLAIN_OBJECT to <dtagent>
	grant all on SYSTOOLS.EXPLAIN_OPERATOR to <dtagent>
	grant all on SYSTOOLS.EXPLAIN_PREDICATE to <dtagent>
	grant all on SYSTOOLS.EXPLAIN_STATEMENT to <dtagent>
	grant all on SYSTOOLS.EXPLAIN_STREAM to <dtagent>

-- execute in addition to the previous for DB2 10.5 and up:

	grant execute on function SYSPROC.MON_GET_INSTANCE to <dtagent>
	grant execute on function SYSPROC.MON_GET_DATABASE to <dtagent>

(System monitor authority (SYSMON) IBM documentation)
(sysmon_group IBM documentation)
(SQLADM IBM documentation)
(DATAACCESS IBM documentation)

The SYSPROC.SYSINTERNALOBJECT invocation creates explain plan tables, which need to exist for the explain plan functionality to work.
This call creates the explain tables under the SYSTOOLS schema, which is the location assumed by Dynatrace AppMon.
(Explain tables IBM documentation)