How to Manually Configure the Metadata Database

The script change_database_settings allows to configure the external metadata database of Scheduler. This script is located in the directory <DENODO_HOME>/tools/scheduler.

Syntax of the “change_database_settings” script (Scheduler)
 change_database_settings [-?] -a <arg> -cp <arg> -d <arg> [-e
        <arg>] [-krb] [-ktab <arg>] [-p <arg>] [-pi <arg>] [-pma <arg>] [-u
        <arg>] -uri <arg> -v <arg>
Parameters of the change_database_settings script

Parameter Name

Description

-?

Prints this help.

-a

--adapter <adapter-name>

Adapter name (one of the supported engines: derby, mysql, oracle, postgresql, sqlserver, azure, aurora mysql or aurora postgresql).

E.g. --adapter oracle

-v

--version <adapter-version>

Adapter version (one of the supported engines).

E.g. --version 19c

-d

--driver <driver-classname>

Driver class name.

E.g. --driver "oracle.jdbc.OracleDriver"

-cp

--classPath <driver-classpath>

Driver class path.

E.g. --classPath "oracle-19c"

-e

--externalDriver <driver-classpath>

Path to a non default location at Denodo where driver file is located. This file will be added to the new catalog. If given path is a directory, then all files inside will be added.

E.g. --externalDriver "/my-drivers/mysql-5"

-uri

--databaseUri <uri>

Database URI.

E.g. --databaseUri "jdbc:oracle:thin:@acme:1521:orcl"

-u

--user <user>

Database user name.

E.g. --user denodo_user

-p

--password <password>

Database user password. The script “encrypt_password” can be used for obtaining an encrypted value.

E.g. --password "my-s3cr3t" or with an encrypted value --password "encrypted:passwordEncrypted"

-krb

--kerberos

Use kerberos authentication.

E.g. --kerberos (disabled by default)

-ktab

--keytab

Path to the keytab file. It does only apply when using kerberos with SPN and keytab.

E.g. --keytab "/my-keytabs/my.keytab"

-pi

--initialSize <pool-initial-size>

Pool initial size.

E.g. --initialSize 4

-pma

--maxActive <pool-max-active>

Pool max active.

E.g. --maxActive 100

Examples

Example 1:

Configure the external metadata database in a PostgreSQL database.

change_database_settings --adapter postgresql
                         --version 12
                         --classPath "postgresql-12"
                         --databaseUri "jdbc:postgresql://psql-db:5432/schedcatalog"
                         --driver "org.postgresql.Driver"
                         --user "denodo_user"
                         --password "encrypted:passwordEncrypted"

In this example, the password (parameter --password) is encrypted. To encrypt this password, execute the script <DENODO_HOME>/bin/encrypt_password and provide the password of this user account in PostgreSQL. The argument for --password is encrypted: followed by the result of this script.

Note that Scheduler will store this password encrypted regardless of if you pass it encrypted to this script or not.

Example 2:

Configure the external metadata database in a MySQL database.

change_database_settings --adapter mysql
                         --version 5
                         --classPath "mysql-5"
                         --externalDriver "/my-drivers/mysql5"
                         --databaseUri "jdbc:mysql://mysql-db:3306/schedcatalog"
                         --driver "com.mysql.jdbc.Driver"
                         --user "denodo_user"
                         --password "encrypted:passwordEncrypted"

In this example, we use parameter --externalDriver indicating an external location to Denodo where the MySQL driver is present. The script will use that location for loading the driver and opening the connection. Also, the driver will be copied to internal Denodo class path location indicated by parameter --classPath, allowing the server to load the driver when Scheduler is started. Note that --externalDriver parameter value can be a file or a directory. In this case, all files present at the directory are used to load the driver.

Finally, the password (parameter --password) is encrypted. To encrypt this password, execute the script <DENODO_HOME>/bin/encrypt_password and provide the password of this user account in MySQL. The argument for --password is encrypted: followed by the result of this script.

Note that Scheduler will store this password encrypted regardless of if you pass it encrypted to this script or not.