In this section:
Before connecting DTP to the database, you must first prepare the database. This can be done via the command line and/or the DTP UI. Preparing the database involves three steps:
DTP
dtp
Follow the directions below that are appropriate for your database. Once you have prepared your database, see Connect to an Existing DTP Database below for information about connecting DTP to your database.
Run the create.sql script found in the <DTP_INSTALL>/dtp/grs/db/dtp/mysql/
directory as root. This script will:
DTP
dtp
<DTP_INSTALL>/grs/db/dtp/oracle/
directory as an admin. This script will create the database: DTP
.<DTP_INSTALL>/grs/db/dtp/oracle/
directory as an admin. This script will create the user: dtp
.<DTP_INSTALL>/grs/db/dtp/oracle/
directory as the user dtp
created in the previous step (do not run this script as an admin). This script will create the schema in the database.<DTP_INSTALL>/grs/db/dtp/postgresql/
directory as an admin. This script will create the database: DTP
and the user: dtp
.<DTP_INSTALL>/grs/db/dtp/postgresql/
directory as the user dtp
created in the previous step (do not run this script as an admin). This script will create the schema in the database.First, start DTP Server by following the directions in Starting DTP Application. Then open and license DTP by following the directions in Opening and Licensing DTP. Once you have licensed DTP, you will be redirected the database creation page where you can create a new DTP database and schema as well as new user credentials by doing the following:
For MySQL databases, the root user must have the GRANT OPTION privilege. |
Enter new user and credentials and click Create Database.
The processes will fail if the Parasoft default "dtp" user already exists. In this rare scenario, you can manually create the database and users, then go through the Create a DTP schema for an existing database described below. Alternatively, you can drop the "dtp" user before running this process. |
To connect to an existing DTP database using existing user credentials:
Enter the database URL and user credentials, then click Test Connection to confirm that it is correct.
To create a DTP schema for an existing database with existing user credentials:
DTP does not ship with the JAR files necessary to fully integrate with Azure Key Vault. To integrate with Azure Key Vault, contact Parasoft support to obtain the JAR files necessary to enable the integration. Copy the files into the |
DTP Database settings are saved inside the <dtp-db-connection>
element of the PSTRootConfig.xml file located in <DTP_DATA_DIR>/conf/
. If your organization stores the DTP Database password in Azure Key Vault, you can configure DTP to retrieve the password by adding an <azure-key-vault>
element. The example below is for MySQL but will work for all the supported databases.
<dtp-db-connection> <db-type>MySQL</db-type> <user>dtp</user> <url>jdbc:mysql://localhost:3306/DTP</url> <azure-key-vault> <url>https://dtp-dev.vault.azure.net/</url> <secret>default-db-password</secret> </azure-key-vault> </dtp-db-connection> |
The value of the <url>
element is the Azure Key Vault URI. The value of the <secret>
element is the name of the secret in Azure Key Vault. Note that in the example above, there is no need for the <password>
element inside <dtp-db-connection>
element since DTP is configured to retrieve the database password from Azure Key Vault.
This functionality assumes that you have you have configured Access Control and Managed Identity so that DTP deployed in an Azure VM has access to the secret on Azure Key Vault.
A defect in the MySQL 8.x JDBC connector may cause the database creation process may fail
Check the dtpconsole-db.log log for the following error (the log may include additional messages):
The server time zone value 'PDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
The error message will specify your timezone. If you see this error after a database creation script failure, set the serverTimezone
property in MySQL to your timezone and re-run the script.