Skip to main content

Database installation and initialization

This section describes database initialization.

  1. Make sure your chosen database is installed properly and is accessible.

  2. Log in with a user account with CREATE permissions and run the "init SQL" scripts for the corresponding database (see table below). There are two initial scripts for each database. The script with _ind suffix is used to create indexes in database.

    The script files for the corresponding databases are described in the following table. The SQL scripts can be found in the <TalendRuntimePath>/add-ons/sam/db directory.

    SQL script filename

    Database

    create.sql

    create_ind.sql

    Apache Derby

    create_mysql.sql

    create_mysql_ind.sql

    MySQL

    create_oracle.sql

    create_oracle_ind.sql

    Oracle

    create_sqlserver.sql

    create_sqlserver_ind.sql

    SQL Server

    create_h2.sql

    create_h2_ind.sql

    H2 Database Engine

    create_db2.sql

    create_db2_ind.sql

    IBM DB2

    create_postgres.sql

    create_postgres_ind.sql

    PostgreSQL

Once the scripts executed, the EVENTS and EVENTS_CUSTOMINFO tables are created in your database.

To switch from one database to another, for example, to MySQL 8.x database:
  1. Create MySQL 8.x database using SQL scripts in the <TalendRuntimePath>/add-ons/sam/db directory.
  2. Install the JDBC driver needed by the DataSource and MySQL 8.x DataSource using the following commands:

    bundle:install mvn:mysql/mysql-connector-java/8.0.30
    feature:install tesb-datasource-mysql-8
  3. Adapt the MySQL configuration used by Service Activity Monitoring in the <TalendRuntimePath>/etc/org.talend.esb.datasource.mysql8.cfg file:

    datasource.url=jdbc:mysql://192.168.0.22:3306/sam?useSSL=false
    datasource.username=root
    datasource.password=hello
    datasource.pool.maxActive=30
    datasource.pool.maxIdle=5
    datasource.pool.maxWait=30000
    datasource.jndi=ds-mysql8 
  4. Switch Service Activity Monitoring to the MySQL DataSource in the <TalendRuntimePath>/etc/org.talend.esb.sam.server.cfg file.

    db.datasource=ds-mysql8
    db.dialect=mysqlDialect 

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!