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>]
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. |
-d --driver <driver-classname> |
The name of the Java class of the JDBC driver to be used. E.g. |
-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. |
-i --interactive-mode |
Interactive mode to avoid storing the password in the bash history E.g. |
-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. |
-krb --kerberos |
Use the parameter to use Kerberos Authentication (default: false) E.g. |
-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. |
-awsIam --aws-iam-credentials |
Use AWS IAM credentials Authentication E.g. |
-awsInstance --denodo-aws-instance-credentials |
Use Denodo AWS Instance Credentials Authentication (default: false) E.g. |
-ak --access-key |
AWS Access Key (when using AWS IAM credentials) E.g. |
-sk --secret-key |
AWS Secret Key (when using AWS IAM credentials) E.g. |
-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. |
-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. |
-akfs --access-key-field-at-secret <field> |
Specific field name inside the vault provider secret for the AWS Access Key. E.g. |
-skfs --secret-key-field-at-secret <field> |
Specific field name inside the vault provider secret for the AWS Secret Key. E.g. |
-r --aws-region |
AWS Region (when using AWS IAM credentials) E.g. |
-role --aws-role |
AWS Role (when using AWS IAM credentials) E.g. |
-tlf --aws-token-lifetime |
AWS Maximum lifetime of a connection in the pool (minutes) E.g. |
-p --password |
Database password or Kerberos password (provide with ‘encrypted:’ prefix for encrypted passwords) E.g. |
-pi --initial-size |
The minimum number of idle connections that the Data Marketplace tries to maintain in the pool. (default: 3) E.g. |
-pma --max-active |
The maximum number of actual connections to the database, including both idle and in-use connections. (default: 10) E.g. |
-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. |
-s --schema |
Database schema (only for PostgreSQL, SQL Server and their compatible variants) E.g. |
-tout --connection-timeout |
Maximum number of milliseconds that the Data Marketplace will wait for a connection from the pool E.g. |
-u --user |
Database username or Kerberos username E.g. |
-uri --database-uri |
The connection URL to the database. E.g. |
-us --user-secret <secret-path> |
Secret path in the vault provider to retrieve the user name. E.g. |
-ps --password-secret <secret-path> |
Secret path in the vault provider to retrieve the password. E.g. |
-ufs --user-field-at-secret <field> |
Specific field name inside the vault provider secret for the user name. E.g. |
-pfs --password-field-at-secret <field> |
Specific field name inside the vault provider secret for the password. E.g. |
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.