Create IBM Db2 provider for Azure Monitor for SAP solutions
In this how-to guide, you learn how to create an IBM Db2 provider for Azure Monitor for SAP solutions through the Azure portal.
Prerequisites
- An Azure subscription.
- An existing Azure Monitor for SAP solutions resource. To create an Azure Monitor for SAP solutions resource, see the quickstart for the Azure portal or the quickstart for PowerShell.
Create a user for the Db2 server
First, create a new user for your Db2 server for use by Azure Monitor for SAP solutions. Then run the following script to provide the new Db2 user with appropriate permissions. Make sure to replace <username>
with the Db2 username.
GRANT SECADM ON DATABASE TO USER <username>;
GRANT DATAACCESS ON DATABASE TO USER <username>;
GRANT ROLE SAPAPP TO USER <username>;
Next, if you don't have an SAPAPP role in your Db2 server, use the following query to create the role.
CREATE ROLE SAPMON;
CREATE ROLE SAPAPP;
CREATE ROLE SAPTOOLS;
GRANT ROLE SAPMON TO ROLE SAPAPP;
GRANT ROLE SAPMON TO ROLE SAPTOOLS;
GRANT CONNECT ON DATABASE TO ROLE SAPMON;
GRANT SQLADM ON DATABASE TO ROLE SAPMON;
GRANT EXPLAIN ON DATABASE TO ROLE SAPMON;
GRANT BINDADD ON DATABASE TO ROLE SAPMON;
GRANT CREATETAB ON DATABASE TO ROLE SAPMON;
GRANT IMPLICIT_SCHEMA ON DATABASE TO ROLE SAPMON;
GRANT CREATE_EXTERNAL_ROUTINE ON DATABASE TO ROLE SAPMON;
GRANT LOAD ON DATABASE TO ROLE SAPAPP;
GRANT DBADM ON DATABASE TO ROLE SAPTOOLS;
GRANT WLMADM ON DATABASE TO ROLE SAPTOOLS;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.DB_GET_CFG TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_FORMAT_LOCK_NAME TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_FORMAT_XML_COMPONENT_TIMES_BY_ROW TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_FORMAT_XML_METRICS_BY_ROW TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_FORMAT_XML_TIMES_BY_ROW TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_FORMAT_XML_WAIT_TIMES_BY_ROW TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_ACTIVITY_DETAILS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_APPLICATION_HANDLE TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_APPLICATION_ID TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_APPL_LOCKWAIT TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_BUFFERPOOL TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_CONNECTION TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_CONNECTION_DETAILS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_CONTAINER TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_EXTENT_MOVEMENT_STATUS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_FCM TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_FCM_CONNECTION_LIST TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_INDEX TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_LOCKS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_PKG_CACHE_STMT TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_PKG_CACHE_STMT_DETAILS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_SERVICE_SUBCLASS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_SERVICE_SUBCLASS_DETAILS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_TABLE TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_TABLESPACE TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_UNIT_OF_WORK TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_UNIT_OF_WORK_DETAILS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_WORKLOAD TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.MON_GET_WORKLOAD_DETAILS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_ACTIVITY_DETAILS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_CONN_ENV TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_QUEUE_STATS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_SERVICE_CLASS_AGENTS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_SERVICE_CLASS_AGENTS_V97 TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES_V97 TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_SERVICE_SUBCLASS_STATS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_SERVICE_SUBCLASS_STATS_V97 TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_SERVICE_SUPERCLASS_STATS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_WORKLOAD_OCCURRENCE_ACTIVITIES TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_WORKLOAD_OCCURRENCE_ACTIVITIES_V97 TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_WORKLOAD_STATS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_WORKLOAD_STATS_V97 TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC FUNCTION SYSPROC.WLM_GET_WORK_ACTION_SET_STATS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC PROCEDURE SYSPROC.WLM_CANCEL_ACTIVITY TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC PROCEDURE SYSPROC.WLM_CAPTURE_ACTIVITY_IN_PROGRESS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC PROCEDURE SYSPROC.WLM_COLLECT_STATS TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC PROCEDURE SYSPROC.WLM_COLLECT_STATS_WAIT TO ROLE SAPMON;
GRANT EXECUTE ON SPECIFIC PROCEDURE SYSPROC.WLM_SET_CONN_ENV TO ROLE SAPMON;
Prerequisites to enable secure communication
To enable TLS 1.2 or higher, follow the steps in this document.
Create an IBM Db2 provider
To create the IBM Db2 provider for Azure Monitor for SAP solutions:
- Sign in to the Azure portal.
- Go to the Azure Monitor for SAP solutions service.
- Open the Azure Monitor for SAP solutions resource you want to modify.
- On the resource menu, under Settings, select Providers.
- Select Add to add a new provider.
- For Type, select IBM Db2.
- (Optional) Select Enable secure communication and choose a certificate type from the dropdown list.
- Enter the IP address for the hostname.
- Enter the database name.
- Enter the database port.
- Save your changes.
- Configure more providers for each instance of the database.