===== 6. Sybase Connector ===== ==== Purpose ==== * With a Sybase connector, you can directly connect to a Sybase Database.\\ * It will give access to all components that can be monitored trough Pro.Monitor Sybase monitors\\ * To create a Sybase connector, there are two steps: * Create a user profile in SAP and register it in Pro.Monitor (Pro.Monitor SAP User) * Create and set connector parameters * Pro.Monitor Sybase connector uses JDBC to connect to the Database and SQL queries to inquire the database ==== Creating a SAP user profile ==== * At first step, create a SAP user is the SAP system * **Find an step-by-step example** creating a SAP user with Read access on a table in Sybase under SAPSR3DB schema at the bottom of this page * 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. ==== Creating the connector ==== * Select the system in the Systems tree and select “Add connector” in its contextual menu, then select "Sybase" type. * Sybase 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 port to access the Database * **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.7:userguide:configuration:systemsconnectors:pasted:20190304-173048.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}} ==== Authorizations ==== Pro.Monitor will gather information with the following means: **Stored procedures:** * sp_dump_history * With granular permissions **enabled**, you must be a user with **manage dump configuration** privilege * With granular permissions **disabled**, you must be a user with **sa_role** or **oper_role** * sp_spaceusage * Any user can execute sp_spaceusage to view space usage. However, you may not be able to view certain information about tables that you do not have permissions to view. * sp_helpdb * Any user can execute sp_helpdb **Tables:** * master..sysusages * master.dbo.monThread * master.dbo.monDeadLock * master.dbo.monErrorLog * master..sysdatabases * master..monDeviceSpaceUsage **Example of role creation**: If you want to create a SAP user with **Read** access on a table (t1 in this example) of **SAPSR3DB schema**, you will have to follow the following: * Create a new role "test_role" as below USER MASTER GO CREATE ROLE test_role GO * Create a new login user "testuser" to access **by example** your database SAPSR3DB sp_addlogin testuser, testuser, SAPSR3DB GO USE SAPSR3DB GO sp_adduser testuser , testuser GO * Grant READ (SELECT) permission to the new role GRANT SELECT on t1 TO test_role GO * Grant the role to the required login user USE MASTER GO GRANT ROLE test_role TO testuser GO sp_modifylogin testuser, "add default role", test_role GO * Grant EXECUTE permission to the new role GRANT EXECUTE ON my_procedure TO role