Using an external database as the datastore for MFT Server configuration settings
Posted by John Villanueva, Last modified by John Villanueva on 13 December 2016 09:12 PM
By default, all JSCAPE MFT Server configuration settings are stored in an H2 database. This H2 database comes with the installation. In case you want to use an external ANSI-compliant relational database (e.g. MySQL, MS SQL Server, Oracle, etc.) instead of the built-in H2 database, this is how you set things up during installation.
1. Create a database in the external relational database that will hold the global datastore and create a user account that has the correct permissions for the said database
2. Install JSCAPE MFT Server as you normally would.
3. Stop the JSCAPE MFT Server service.
4. Launch a command line/terminal and navigate into the JSCAPE MFT Server installation directory. Copy the existing H2 global datastore database to your external relational database by entering the following command. In the example shown below, we're copying to a MySQL database (hence the MySQL jdbc url). Please replace the parameters below accordingly.
5. Configure JSCAPE MFT Server to use your external database. Again, in the example shown below, we're configuring a MySQL database (hence the MySQL jdbc url). Please replace the parameters below accordingly.
6. Start JSCAPE MFT Server.
When you go to Server > Settings > Datastore > JDBC URL, you'll notice that it's already using the jdbc URL of whatever external database you've configured it for instead of the h2 database.
Another way to do it
Note: This method does not migrate records from the H2 database. It only creates the necessary tables.
Alternatively, you can just let the installation complete and make the necessary changes in the Web-based administrative UI. These are the steps you need to perform:
1. Complete the installation.
2. Login to the Web-based administrative UI.
3. Navigate to Server > Settings > Datastore
4. Enter the JDBC URL of your external relational database. Also enter the username and password of a database user account. Make sure that account has the necessary privileges/access rights.
5. Click the "Create DB" button. This will populate the database with the tables needed for storing the MFT Server configurations. You may also click the Test Parameters button to test whether everything is alright.
6. If everything proceeds smoothly, click on the Apply button. After doing this, you should be ejected from the Web UI and won't be able to login. That's because you need to create a new admin user account.
7. Launch the command line/terminal and navigate into the JSCAPE MFT Server installation directory. Issue the following command (make the necessary changes to the parameters):
js-addadmin -db -username admin -password secret -sa
8. Restart the JSCAPE MFT Server service.