When you install Mirth Connect it will b7 default use Derby as its database. I am not real familar with Derby, and everything else I work with is in SQL Server so I wanted the Mirth database to be on SQL Server also. This is pretty easy to accomplish with Mirth Connect. You just need to create a blank database for Mirth to use along with a SQL login for it to use, and then point Mirth to this database. I will show how to perform these steps.
Create A Blank SQL Server Database
- Open SQL Server Management Studio and connect to the SQL Server that you want to use for the Mirth Connect database.
- In the Object Explorer section, right click on the ‘Databases’ node and select ‘New Database’.

- In the ‘New Database’ window give your database a name and clikc ‘OK’.

Create A SQL Login For Mirth
- In SQL Management Studio, in the Object Explorer section, expand the Security node, and then right click on the Logins node and select ‘New Login…’

- In the new login window, enter a user name, select ‘SQL Server authentication’ and enter a password for the user. Uncheck the checkbox that says ‘User must change password at next login’, and set the default database to the database you just created for Mirth and select OK.

- In the Object Explorer section of Management Studio, expand the Databases node, then expand the node for the database you just created, and then expand the Security node. Right click on the Users node and select ‘New User…’

- In the Database User window, enter in the name of the user you just created in the ‘User name’ and ‘Login name’ fields. Give the user the ‘db_owner’ role, and then click OK.
Connect Mirth To The SQL Server Database
- Log onto the server where Mirth Connect is installed.
- Open Mirth Connect Server Manager, and go to the database tab.
- Change the ‘Type’ dropdown to sqlserver 2005.
- In the URL field, change localhost to the name of your database server, and change mirthdb to the name of the database you created. For example, if you database server is sqlserver01 and the database is MirthDatabase, then the value in the URL field should be jdbc:jtds:sqlserver://sqlserver01:1433/MirthDatabase.
- In the Username field enter the username of the SQL account you created.
- Enter the password for the SQL account in the password field.
- Click the ‘OK’ button.
- Mirth Connect is now using SQL Server as its database.

