The Database Configuration screen enables you to create and configure databases using the embedded HyperSQL server or connect to an external MySQL or Oracle database. You can also create and restore database backups, as well as port existing backups to a different type of database. For example, you could back up a HyperSQL database, then re-create it as an Oracle or MySQL database. Or, you could capture the current state of a database and use that for a rollback. 

Choose Database Configuration from the administration menu (gear icon) to open the Database Configuration screen.

In this section:

Connecting to an Existing Database

  1. Click Configure Database Settings and select Connect to existing CTP database in the window that appears.
  2. Click Next.

  3. Select a database type: HyperSQL, MariaDB, MySQLOracle, or PostgreSQL.
  4. Enter the database URL and user credentials. See Database Settings below.

  5. Click Test Connection to confirm that it is correct.
  6. Click Save & Connect to connect to the database.

Creating a New Database

  1. Click Configure Database Settings and select Create new CTP database, user, and schema in the window that appears.
  2. Click Next.

  3. Select a database type: MySQLOracle, or PostgreSQL.
  4. Enter the database URL and root credentials. See Database Settings below. Alternatively, you could create a database from a backup file (see to Creating a Database from a Backup).
  5. Click Test Connection to confirm that it is correct.

    For MySQL databases, the root user must have the GRANT OPTION privilege.


  6. Click Next.

  7. Enter new user and credentials and click Create Database.

Creating a CTP Schema for an Existing Database

To create a CTP schema for an existing database with existing user credentials:

  1. Click Configure Database Settings and select Create CTP database schema in the window that appears.
  2. Click Next.

  3. Select a database type: MySQLOracle, or PostgreSQL.
  4. Enter the database URL and user credentials. See Database Settings below.
  5. Click Test Connection to confirm that it is correct.
  6. Click Create Schema.




Creating a Backup

  1. Click Backup Database in the Database Connection Settings section.
  2. Click the file link when prompted to download the backup file.

Backing Up Databases with Large Files (MySQL Only)

If you are using a MySQL database and the backup fails, try increasing the MySQL size limits as follows:

  1. Find the my.cnf/my.ini file for your installation of MySQL. For MySQL 5.7, see http://dev.mysql.com/doc/refman/5.7/en/option-files.html. For other versions, see the appropriate manual at http://dev.mysql.com/doc/index.html.
  2. Edit the file to use the parameter settings outlined below.
  3. Restart the MySQL Service 

[mysqld]

[mysql]

[client]

Creating a Database from a Backup

  1. Click Create Database in the Database Connection Settings section.
  2. Specify information about the new database  
  3. Browse for a backup file In the Create from Backup File section and click Create.

A new database will be created in the specified location then it will be populated with the data saved in the backup file. After a new database is successfully created, CTP will ask you if you want it to delete the previous database (the database whose connection settings are shown in the main page behind the dialog).

Adding Multiple Databases

To add multiple databases of the same type, specify a different location (for example, schema, SID, service name, or path) when creating a new database. This prevents the existing database from being overwritten. 

To port a database to a different database type, select the target database type, then specify the desired location for the new database.

To create a new database account from this interface, enter the desired username and password, enable Create a new user, then confirm the password. For new accounts on Oracle, you can also specify a data tablespace and temp tablespace or you can leave those fields empty to use the defaults (<USER>_DATA> and <USER_TEMP>).

Current Configuration

You can view the current database configuration in this section. 

Database Table Limits

Messages received by CTP's underlying Virtualize server are logged in the database. The event message, payload, hit statistics, and time information are stored. You can limit the number of event messages, entries about each hit to the server, and days of hit summary in this section.

Note that Virtualize hit statistics row is set to 100,000 by default. This affects the number of individual rows of statistics data at the bottom of the Service Virtualization Hit Statistics report. Increasing this limit beyond 1,000,000 is not recommended since performance decreases as the table size increases.

The Virtualize hit summary days limit prevents the database from growing out of control. The number of days of summary data also effects performance, but to a lesser degree than the number of Virtualize hit statistics rows.

Database Settings

See System Requirements for details about supported database versions and requirements.

HyperSQL Settings

CTP ships with an embedded HyperSQL database. To use it, choose File path as the connection mode.

MySQL and MariaDB Settings

Oracle Settings

CTP does not ship with JDBC driver libraries for MySQL or Oracle. Refer to the JDBC Driver Notes in the installation guide for additional information.

If the Oracle database user is created outside of CTP by a Database Administrator (DBA), then it needs permission to create tables so CTP can perform database schema updates when upgrading to new product versions.  The DBA should execute:  GRANT CREATE TABLE TO EM; where EM is the Oracle database user account that CTP will use when running.

Also see Installing and Running CTP.