USER MANUALS


Change Database Settings Script

To change the Data Marketplace’s metadata you can use the change_database_settings script located in the folder <DENODO_HOME>/tools/data-catalog.

Note

To use the change_database_settings script with Vault properties, it is necessary to have the Credentials Vault configured and enabled at the installation level. See Credentials Vault Support in the Denodo Platform for more details.

Usage

change_database_settings [-?] -a <adapter name> -d <driver class name> -uri <connection URI to database>
      [-e <path to drivers files>]
      [-i]
      [-kcred <kerberos credentials cache file>]
      [-krb]
      [-ktab <path to keytab file>]
      [-p <password or kerberos password>]
      [-pi <initial size connections in pool>]
      [-pma <max active connections in pool>]
      [-q <query to check if the connection is alive>]
      [-s <database schema>]
      [-tout <milliseconds to wait for a connection>]
      [-u <username or kerberos username>]
      [-us <secret path for the username>]
      [-ps <secret path for the password>]
      [-ufs <secret field name for the username>]
      [-pfs <secret field name for the password>]
Parameters of the change_database_settings script

Parameter Name

Description

-?

--help

Prints the help

E.g. -?

-a

--adapter <adapter-name>

Adapter used in the database connection. For example (derby, mysql, mysql8, oracle_12c, postgresql, sqlserver, auroramysql, aurorapostgre, azuresqlserver)

Note: Use the oracle_12c value for databases Oracle 12c or higher

E.g. --adapter mysql

-d

--driver <driver-classname>

The name of the Java class of the JDBC driver to be used.

E.g. --driver com.mysql.jdbc.Driver

-e

--external-driver <driver-classpath>

The path to the driver files that will be copied to the folder <DENODO_HOME>/lib/data_catalog_extensions.

This option will delete all the JAR files in the folder <DENODO_HOME>/lib/data_catalog_extensions before copy the JAR files from the source folder.

If the source path is a directory, then all the JAR files inside the folder will be copied.

E.g. -e /path_to_drivers/mysql

-i

--interactive-mode

Interactive mode to avoid storing the password in the bash history

E.g. -i

-kcred

--kerberos-credentials-cache-file

Kerberos with Windows User: Use Single Sign-On (SSO) with Kerberos, doing pass-through with the user that launched the server (no user name nor password required).

E.g. -kcred /path/kerberosCredentials

-krb

--kerberos

Use the parameter to use Kerberos Authentication (default: false)

E.g. --kerberos

-ktab

--keytab

Use Kerberos authentication, with the provided username (in this case, the Service Principal Name - SPN -) and Keytab file (no password needed)

E.g. --keytab /path/keytabfile.keytab

-awsIam

--aws-iam-credentials

Use AWS IAM credentials Authentication

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

-awsInstance

--denodo-aws-instance-credentials

Use Denodo AWS Instance Credentials Authentication (default: false)

E.g. --awsInstance "true"

-ak

--access-key

AWS Access Key (when using AWS IAM credentials)

E.g. --access-key "my-aws-access-key"

-sk

--secret-key

AWS Secret Key (when using AWS IAM credentials)

E.g. --secret-key "my-aws-secret-key" or with an encrypted value --secret-key "encrypted:my-encrypted-aws-secret-key"

-aks

--access-key-secret <secret-path>

Secret path in the vault provider to retrieve the AWS Access Key (when using AWS IAM credentials).

E.g. --access-key-secret secret/data/aws

-sks

--secret-key-secret <secret-path>

Secret path in the vault provider to retrieve the AWS Secret Key (when using AWS IAM credentials).

E.g. --secret-key-secret secret/data/aws

-akfs

--access-key-field-at-secret <field>

Specific field name inside the vault provider secret for the AWS Access Key.

E.g. --access-key-field-at-secret accessKey

-skfs

--secret-key-field-at-secret <field>

Specific field name inside the vault provider secret for the AWS Secret Key.

E.g. --secret-key-field-at-secret secretKey

-r

--aws-region

AWS Region (when using AWS IAM credentials)

E.g. --aws-region "eu-west-3"

-role

--aws-role

AWS Role (when using AWS IAM credentials)

E.g. --aws-role "my-aws-role"

-tlf

--aws-token-lifetime

AWS Maximum lifetime of a connection in the pool (minutes)

E.g. --aws-token-lifetime 10

-p

--password

Database password or Kerberos password (provide with ‘encrypted:’ prefix for encrypted passwords)

E.g. --password encrypted:passwordEncrypted

-pi

--initial-size

The minimum number of idle connections that the Data Marketplace tries to maintain in the pool. (default: 3)

E.g. -pi 4

-pma

--max-active

The maximum number of actual connections to the database, including both idle and in-use connections. (default: 10)

E.g. --max-active 20

-q

--ping-query

The query that will be executed just before using a connection from the pool to validate that it is still alive

E.g. --ping-query "select field from test;"

-s

--schema

Database schema (only for PostgreSQL, SQL Server and their compatible variants)

E.g. --schema public

-tout

--connection-timeout

Maximum number of milliseconds that the Data Marketplace will wait for a connection from the pool

E.g. --connection-timeout 10000

-u

--user

Database username or Kerberos username

E.g. --user denodoUser

-uri

--database-uri

The connection URL to the database.

E.g. --database-uri jdbc:mysql://host:1234/database

-us

--user-secret <secret-path>

Secret path in the vault provider to retrieve the user name.

E.g. --user-secret secret/data/marketplace-user

-ps

--password-secret <secret-path>

Secret path in the vault provider to retrieve the password.

E.g. --password-secret secret/data/marketplace-user

-ufs

--user-field-at-secret <field>

Specific field name inside the vault provider secret for the user name.

E.g. --user-field-at-secret username

-pfs

--password-field-at-secret <field>

Specific field name inside the vault provider secret for the password.

E.g. --password-field-at-secret password

Example:

Configure the external metadata database in a MySQL database.

change_database_settings   -a mysql
                           -d com.mysql.jdbc.Driver
                           -pi 50
                           -pma 100
                           -tout 100000
                           -u denodoUser
                           -uri jdbc:mysql://localhost:1234/database?useUnicode=yes
                           -e /path_to_drivers/mysql
                           -p encrypted:passwordEncrypted

In this example, we use parameter -e indicating an external location to Denodo where the MySQL driver is present. The script will use that location to copy the driver to <DENODO_HOME>/lib/data_catalog_extensions, allowing the server to load the driver when Data Marketplace is started. Note that -e parameter value can be a file or a directory. In this case, all files present at the directory are copied to the destination folder. This option will delete all the JAR files into the folder <DENODO_HOME>/lib/data_catalog_extensions.

Finally, the password (parameter -p) 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 -p is encrypted: followed by the result of this script.

Example:

Configure the external metadata database in a MySQL database with the interactive mode.

change_database_settings   -a mysql
                           -d com.mysql.jdbc.Driver
                           -u denodoUser
                           -uri jdbc:mysql://localhost:1234/database?useUnicode=yes
                           -e /path_to_drivers/mysql
                           -i

In this example, the parameter -i activates the interactive mode that will request the password or Kerberos password to the user.

Add feedback