====== 7. MaxDB Connector ====== ===== Purpose ===== * Use this connector to connect directly to a MAXDB Database. * It will give access to all components that can be monitored through Redpeaks MAXDB monitors * To create a MAXDB connector, there are two steps: * Create a user profile in the database and register it in Redpeaks (Redpeaks SAP User) * Create and set connector parameters * Redpeaks MAXDB connector uses JDBC to connect to the Database and SQL queries to inquire the database ===== Creating a SAP user profile ===== * SAP user profiles can be reached via Systems->SAP users * Create a new profile using the “Add” button * Once created, the user profile can be selected in the connector form * Note: A SAP User is by default associated with only one Group (Company). You can explicitly set a SAP User to be cross companies. The effect is that it will be selectable from connectors of any company. * The corresponding user must be created in SAP along with the appropriate authorizations. ===== Installing driver ===== * You must install MaxDB JDBC driver to connect to a MaxDB database * Driver can be downloaded from [[https://mvnrepository.com/artifact/com.sap/sapdbc|maven repository]] * Navigate to ''Setting->Updload/Download'', and select ''upload other driver'' {{:products:promonitor:6.8:userguide:configuration:systemsconnectors:pasted:20240215-160519.png}} ===== Creating the connector ===== * Select the system in the Systems tree and select “Add connector” in its contextual menu, then select "MAXDB" type. * MAXDB connector input form will allow you configure it (see image below) * **Title** : This label will help you to identify the connector * **Database host**: the hostname or IP address of the System Database server * **Database Port**: the database port (Default 7200) * **Database Name**: Database to connect to * **User**: the SAP user profile to use for the connection * **For specific settings "Use SSH tunnel" and "Custom timeout"** see below section "Setting specific configuration" * Press Save & Test to save the profile and check the connection is working {{:products:promonitor:6.8:userguide:configuration:systemsconnectors:pasted:20211028-151732.png}} ===== SSH ===== * In case you must connect to a database through an SSH tunnel, you can enable the SSH option and fill the parameters: * **Host:** The host where the entrance of the tunnel is created. * **Port:** The local port of the SSH tunnel * **User:** The user to authenticate on the SSH end point. ===== Custom timeout ===== * See [[.:common|Custom timeouts]] {{:products:promonitor:6.7:userguide:configuration:systemsconnectors:pasted:20190304-173746.png}} ===== Monitoring user for MaxDB ===== * The connector requires a database **SQLCLI user** and a database operator **DBMCLI user**. * Both users need to have the **same username and password** * Please Note the password requirements for these users: * It must be in all CAPS. * It must be 8 characters or less. * **Warning:** Some symbols may cause problems when used in passwords, we know “$” works, however, be careful when using other symbols. * In some versions of MAXDB, you will need to use double quotes around and . (Double quotes not needed in the examples below) ==== Create SQLCLI user ==== * Open SAP MaxDB Command Prompt as Administrator * Execute the following commands: sqlcli -u SUPERDBA, -d create user password grant select on superdba.monitor_lock to grant select on sysinfo.datavolumes to grant select on sysinfo.datastatistics to grant select on sysinfo.logstatistics to grant select on sysinfo.cachestatistics to grant select on sysinfo.instance to ==== Create DBMCLI user ==== * Open SAP MaxDB Command Prompt as Administrator * Execute the following commands: dbmcli -u SUPERDBA, -d user_getall user_create , user_put SERVERRIGHTS=+DBInfoRead user_get ===== Driver properties ===== * See [[https://maxdb.sap.com/doc/7_7/46/7bc37de97150d1e10000000a155369/content.htm|MaxDb driver properties]]