Connecting to the Mirth Connect embedded database - rbeckman-nextgen/test-mc GitHub Wiki
Created by Jacob Brauer, last modified on Apr 19, 2012
By default Mirth comes bundled with
Apache Derby as
its database for storing channel and message data. While this is useful
for getting started quickly and evaluating Mirth, we strongly recommend
switching to PostgreSQL or another external database in a production
setting.
For various reasons, it is sometimes useful to connect to the embedded
database to perform cleanup if the tables are too large or to export
data. Below are instructions for how to connect to Mirth's embedded
Derby database.
Step 1: Download
SQuirreL SQL
and start it up.
Step 2: Under the Drivers panel, edit the "Apache Derby Embedded"
driver and under "Extra Class Path" add derby.jar (located in the
%MIRTH_HOME%/lib/ folder).
Step 3: Under the Aliases panel, create a new alias using the
"Apache Derby Embedded" driver and set the URL to
"jdbc:derby:C:\Program Files\Mirth Connect\mirthdb;create=true"
without the quotes, and replacing that path with the path to your
mirthdb folder. The user name and password are blank.
You should now be able to connect to the database. Make sure that the Mirth server is stopped before trying to access the database.
To clear out all messages in the database and compress the table, run the following commands:
DELETE FROM MESSAGE;
{call SYSCS_UTIL.SYSCS_COMPRESS_TABLE('APP', 'MESSAGE', 0)};
More detail information on working with the SYSTEM tables through SQuirrel SQL can be found here.
Document generated by Confluence on Nov 11, 2019 08:40