js-database-configuration
The js-database-configuration
command may be used to configure the database used for storing configuration settings in MFT Server.
The database must be created before installing JSCAPE MFT Server.
Usage: js-database-configuration [-file <file>] configuration file
-configure | -test | -init | -update | -clear | -delete | -copy | -schema
Options:
[-url <URL>] database JDBC URL
[-user <username>] database username
[-password <password>] database password
[-pool <size>] connection pool size
[-ttl <seconds>] connection TTL seconds
[-sync-period <seconds>] synchronization period in seconds
[-destination-url <URL>] destination database JDBC URL
[-destination-user <username>] destination database username
[-destination-password <password>] destination database password
[-previous-version <version>] previous data version for updating
-configure
- This option will create a configuration (database) file to store all the MFT Server configuration information.
If you enter this command:
js-database-configuration -configure
, the system will create a configuration file named database.properties in the installation-dir/etc folder using the default embedded H2 database. To change the location of the configuration file, you can use the -file option. For example:js-database-configuration -file /mydir/database.properties -configure
.
Warning: The embedded H2 database that ships with MFT Server is not intended for production environments and is for evaluation purposes only. For a list of supported databases, see System Requirements > Databases.
To configure an external datastore like MySQL, use the -configure option and enter the URL, username, and password as required.
js-database-configuration -configure -url <jdbc-url> -user <username> -password <password>
For example: js-database-configuration -configure -url jdbc:mysql://192.168.100.105/jscapeconfig -user databaseuser1 -password secret
See additional url examples below:
SQL Server: jdbc:sqlserver://jscape-mssqlmigratedfromoregon.czoxhb1cyj8f.us-east-1.rds.amazonaws.com:1433;databaseName=mftDB;trustServerCertificate=true
PostgreSQL: jdbc:postgresql://127.0.0.1:5432/mftDB
ORACLE: jdbc:oracle:thin:@jscapemigratedfromohio.czoxhb1cyj8f.us-east-1.rds.amazonaws.com:1521:ORCL
-test
- This option will test the connection to the database. The command to execute is js-database-configuration -test
-init
- This option will initialize the database with all the required tables created. This option must be run after a new database is configured, no matter what database option is used (i.e. H2 or a supported relational database). The command to execute is js-database-configuration -init
.
-update
- This option updates the tables from the previous version, if there are any changes to the table structure. For example, assume js-database-configuration -update -previous-version 2024.3.1.18
is executed. If there are any schema changes with the updated version, this command facilitates the changes. For this reason, MFT Server includes sql files (for the databases that are supported) in the <install-dir>/etc folder. Continuing with the above example, assume we are upgrading from 2024.3.1.18. to 2025.2.0.534. If the <install-dir>/etc folder contains any versions later than 2024.3.1.18, the appropriate sql files are executed when the command is run.
previous-version
option described above is the current version you are running, prior to implementing the upgrade. If you are unsure what your current version is, you can obtain it through one of the methods listed below:
Using the MFT Server Manager
Click on
Status > Server > Version
Command line
js-database-configuration.exe -test
js-server-configuration.exe -h
Server log file
Navigate to <MFT Server installation directory>\var folder. Open the server log file. The first line includes the MFT Server Application version.
-clear
- This option will purge all records and tables. The command to execute is js-database-configuration -clear
.
-delete
- This option will drop all tables. The command to execute is js-database-configuration -delete
.
-copy
- This option will copy the database configuration from one database to another. The command to execute is: js-database-configuration -copy -destination-url <jdbc-url> -destination-user <username> -destination-password <password>
.
For example, to switch from the H2 database to MySQL, and migrate the existing data, use the command below. Replace the url, user, and password accordingly.
js-database-configuration -copy -destination-url jdbc:mysql://192.168.100.102/jscapeconfig -destination-user databaseuser1 -destination-password secret.
See also: Migrating existing data to a centralized global datastore
-schema
- This option will print the schema for all tables. The command to execute is js-database-configuration -schema
.