Mirth® Connect Webinar Series - Replacing the Database

Mirth Connect Basics Training Program

As part of our Mirth® Connect Basics Training program, we are pleased to offer a free tutorial discussing replacing the internal Mirth Connect database. If you have questions as you view this tutorial, click the on-going support button or schedule a free 15-minute Q&A with a Mirth® Certified Engineer.

Additional Resources

Free 15-Minute Engineering Q&A Session

Learn About Mirth® Connect Database Replacement

This tutorial covers one of the most important things you should do after downloading Mirth® Connect, replace the internal database.

Why Change the Mirth® Connect Database?

Before we get to the how, let’s talk a little about the why. When you first install Mirth® Connect it comes preloaded with a Derby database. Derby comes from the Apache project, the same folks who came up with the Apache Webserver, Tomcat, OpenOffice, Maven, and lots of other great open source tools. The reason for choosing Derby as the default database for Mirth® Connect is simple – it’s incredibly lightweight and is easily embedded in a Java application. Once you download Mirth® Connect, the DB is already setup and ready to go. Fantastic for getting started and testing the product right away. However, Derby is not designed for large scale volume. It will struggle mightily if you try and put it into a production environment. If you are maybe doing a very small project that will have little throughput, you could get away with it, but for most production environments you would want to move on to a more robust database platform. This is also true if you are just testing Mirth® Connect for the first time. If you try and stress test its capabilities while using the integrated Derby database, you will be severely disappointed by the performance.

Which Mirth® Connect Database Should You Use?

Mirth® Connect natively support all the major SQL databases; Oracle, MySQL, SQLServer, etc. It can also support any SQL database you can provide the proper driver for. So, the choice is up to you, what you are familiar with, or what you may already have licensing for. Our personal pick here at Zen is Postgres. It is an enterprise grade database that is completely open source. We have used it in many, very large scale deployments and have never had performance issues.

Demonstrating How to Replace the Mirth® Connect Database.

For the purposes of the tutorial demonstration we will be using Prostgres. However, if you choose any of the other databases available, the steps you see in this video will be largely the same. What Mirth® Connect related tools will we be using?

  • Mirth® Connect (3.4.2)
  • Postgres
  • PGAdmin

We’re going to assume you have already installed Mirth® Connect and Postgres using their default configurations. As you see in the log, we are currently connecting to the Derby database.

Step 1 – Create a new database using Mirth® Connect’s pgadmin

Under servers, select databases. Then go to Object -> Create – > Database Your database name is going to be mirthdb. Use all other default settings. Luckily, Mirth® Connect is going to automatically build up the schema, tables, etc., for us, so this is the last of the database work we will need to do.

Step 2 – Launch the Mirth® Connect Server Manager.

If you are not using Windows, the server manager may not be available depending on what version of Mirth® Connect you are running. If it’s not, you can make the same changes in the mirth.properties file. In the Mirth® Connect Server Manager, click the database tab. Here you will see the default settings for Derby. For type, select the database platform you will be using, in this case, Postgres. You will notice that it autopopulates the URL string for you. IF you changed anything from the default settings when creating the database, you would make those changes here, for instance if it is not a local database, drop in the appropriate IP/port info. Then we simply enter the username and password for our database user. Note – this is your database credentials, not your Mirth® user credentials.

Step 3 – Restart the Mirth® Connect Service

Once you have completed step 2, head over to the Service tab and click restart. Once the Mirth® Connect service has restarted, we can go ahead and launch the administrator again. Now if you take a look at the log you will see we are now connected to our Postgres database. And we are done. You are now ready to start testing Mirth® Connect with an enterprise level database. I hope you found this tutorial helpful. You’ll find some helpful links down in the description if you need some more information.

Helpful Mirth® Connect Links and Resources:

Zen Healthcare IT Case Study

 

Download Full Case Study PDF

 

Enter your name and email to instantly access the case study.