Change Database Settings Script¶
To change the Data Catalog’s metadata you can use the change_database_settings
script located
in the folder <DENODO_HOME>/tools/data-catalog
.
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>]
[-tout <milliseconds to wait for a connection>]
[-u <username or kerberos username>]
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, oracle_18c, oracle_19c, postgresql, sqlserver, auroramysql, aurorapostgre, azuresqlserver) 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. |
-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 Catalog 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. |
-tout --connection-timeout |
Maximum number of milliseconds that the Data Catalog 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. |
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 Catalog 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.