The Database Configuration screen enables you to create and configure databases using the embedded HyperSQL server or connect to an external, supported 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. See System Requirements for details about supported database versions and requirements.
Choose Database Configuration from the administration menu (gear icon) to open the Database Configuration screen.
See also Installing and Running CTP.
This process connects the current CTP to an existing CTP database.
Enter the database URL and user credentials.
This process creates a new, empty CTP database. For information about creating a new CTP database from a backup, see Creating a Database from a Backup.
For MySQL databases, the root user must have the GRANT OPTION privilege. |
Enter new user and credentials and click Create Database.
This process creates a CTP schema for an existing database with existing user credentials. For information about creating a CTP schema from a backup, see Creating a Database from a Backup.
To back up your CTP database, click Back Up Database on the Database Configurations page. What happens next depends on your database type:
If the database is HyperSQL, MariaDB, or MySQL, the backup will begin immediately.
If the database is Oracle, a dialog will appear asking for the data tablespace. Enter the name of the tablespace and click Create Backup and the backup will begin.
If the database is PostgreSQL, a dialog will appear for the schema. Enter the name of the schema and click Create Backup and the backup will begin.
Once the backup is complete, you can click Download to download it to your device.
If you are using a MySQL database and the backup fails, try increasing the MySQL size limits as follows:
[mysqld]
[mysql]
[client]
You can create a new database from a backup. This process creates a new database and populates it with data from a backed-up database; do not attempt to use it to overwrite an existing database. Use a database backup from the same version of CTP; you should not attempt to create a new database using a backup from a different version of CTP.
A new database will be created in the specified location then it will be populated with the data saved in the backup file.
You can migrate a database from one type to another (for example, from HyperSQL to PostgreSQL). Doing so is a basic two-step process:
You should only do this within the same version of CTP. Keeping with the HyperSQL-to-PostgreSQL example from before, you want to create the backup of your HyperSQL database in the same version of CTP as your PostgreSQL database. Doing something like backing up your HyperSQL database in a previous version of CTP, then upgrading CTP and trying to create your PostgreSQL database with that backup could create errors.
GRANT CREATE TABLE TO EM;
where EM
is the Oracle database user account that CTP will use when running.