Configure Connections to External Databases

Use the service.xml file to store service definition that store connection properties required for a database connection.

Prerequisites

  • On UNIX systems, SAP recommends upgrading to version 2.3.0 or later of unixODBC. If you are using a version lower than 2.3.0, set a parameter for the driver that instructs the database manager not to synchronize database access. To do this, add a line that says “Threading = 0” for your driver in the odbcinst.ini file.

  • If you are running the SAP HANA Output adapter on a UNIX system, only use unixODBC 2.3.0 or higher.
    • If you are using version 2.3.0, add “Threading=0” in the odbcinst.ini file to ensure optimal adapter performance.
    • If you are using version 2.3.1, create a symbolic link under <2.3.1 installation folder>/lib as follows:
      ln -s libodbc.so.2.0.0 libodbc.so.1

      This link is required because ESP links to libodbc.so.1, which unixODBC 2.3.1 has renamed libodbc.so.2. With the link, ESP will now use libodbc.so.2.

Create a separate service definition for every external database you want the Event Stream Processor Server to connect to. You can use the sample service configuration file in ESP_HOME/bin as a basis to create your custom service.xml file. To use the file in a running project, modify the services-file parameter in the cluster configuration file of the node on which you will run the project. This ensures that the project can find the service.xml file. For example,
<Property name="services-file">${ESP_HOME}/bin/service.xml</Property>

If you make changes to the service.xml file while the ESP Server is running, the Server does not recognize the changes until you restart it. If you are running on the local cluster, which the ESP Studio starts on its own, restart the ESP Studio as well.

Related tasks
Linking to Your ODBC Driver Manager Library