Skip to main content

IBM Db2

Pre-requisites

Check the supported versions

DBmarlin supports versions of IBM Db2 from 10.5 and above. Please check the list of supported platforms before continuing and contact us if you are not sure.

Create a monitoring user with the correct permissions

Before adding a target Db2 instance in the UI you should first create a dbmarlin user in the target database instance and granting the following permissions.

grant execute on function SYSPROC.mon_get_connection TO USER dbmarlin;
grant execute on function SYSPROC.mon_get_activity TO USER dbmarlin;
grant execute on function SYSPROC.mon_get_database TO USER dbmarlin;
grant execute on function SYSPROC.mon_get_pkg_cache_stmt TO USER dbmarlin;
grant execute on function SYSPROC.dbm_get_cfg TO USER dbmarlin;
grant execute on function SYSPROC.db_get_cfg TO USER dbmarlin;


grant select on sysibm.sysdummy1 TO USER dbmarlin;
grant select on sysibmadm.dbmcfg TO USER dbmarlin;
grant select on syscat.schemata TO USER dbmarlin;
grant select on syscat.tables TO USER dbmarlin;
grant select on syscat.indexes TO USER dbmarlin;

Adding the Database Target

This is done through the User Interface using the Add Database screen

Executions plans

To generate an execution plan in Db2, the monitoring user must have access to the explain_* tables.

CALL SYSPROC.SYSINSTALLOBJECTS('EXPLAIN', 'C', CAST (NULL AS VARCHAR(128)), CAST (NULL AS VARCHAR(128)))

Db2 in IBM Cloud

We have certified that DBmarlin works with IBM Cloud Db2 which is the cloud hosted DBaaS (database-as-a-service) from IBM. Setting up a sensor is just like any other, except for one SSL parameter :sslConnection=true; which you can add to the Connection string under Advanced mode.