Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Mirth Internal DB

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mirth Internal DB

    Hey,
    This could be a very basic question --pardon me if the way I think is wrong. I use Mirth with Database as MySQL. I really don't see any need for the Mirth DB (Derby - I suppose) which works internal. Now the "mirthdb" has 13.6 GB of data. Is there a way to wipe out the complete Derby DB so that I can free some space. I use Mirth to collect incoming HL7 thourgh LLP, Post it to DB, Create HL7 and send it through LLP. Do suggest some tips. Thanks in advance.

    Regards,
    Kurian.

    Post edited by: kmthayil, at: 02/14/2008 05:59

  • #2
    Re:Mirth Internal DB

    I would wait for a second opinion (or make a backup first) but you should be able to simply delete the mirthdb directory.

    Derby isn't really an "internal" database, it is the default database. You can have Mirth store its own information in MySQL (or postgres or SQL server or ...) by changing the conf/mirth-properties file to use mysql and add your username and password to the matching mysql-SqlMapConfig.properties file then run the SQL scripts to build that database.

    Also, THIRTEEN POINT SIX GIGABYTES IN A FLAT FILE DB!!!!! I find that very surprising. For one that is a LOT of data. I've also always assumed that file based databases like Derby and SQLite started to really slow down once the datanase got to a certain size, usually a few hundred megabytes.
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment


    • #3
      Re:Mirth Internal DB

      Hey Jon,
      Even I was wondering how "mirthdb" could become so bulky like this. I found that D:[BackSlash]Mirth[BackSlash]mirthdb[BackSlash]seg0 has the maximum size (13.6GBytes). In this folder (all are .dat files) the file, c430.dat has 12.9 GB. I don't have any idea what exactly it contains. Is it ok if I remove these files in the folder? Wat exactly are the contents of these files. Do they have each channel configuration and settings? Will the deletion of these files disturbs my current setup. I store the incoming message in MySQL DB.

      Regards,
      Kurian.

      Post edited by: kmthayil, at: 02/15/2008 23:12

      Comment


      • #4
        Re:Mirth Internal DB

        Hey Jon,
        I tried moving the file, c430.dat to a different location after stopping the Mirth service. Then I started service, but I was not able to login with the username and password. So I think the files in seg0 is mandatory and need to do something else to solve the situation. Do suggest some tips.

        Regards,
        Kurian.

        Post edited by: kmthayil, at: 02/15/2008 23:27

        Comment


        • #5
          Re:Mirth Internal DB

          If you configure mirth to use another db, then the mirthdb folder is no longer needed.

          Please, in your conf/mirth.properties What is the line starting by "database" ?

          Comment


          • #6
            Re:Mirth Internal DB

            Hey,
            In the conf/mirth.properties file, I have mentioned database=mysql. I have attached the file conf/mirth.properties and conf/mysql-SqlMapConfig.properties. Please go through. I created a database `mrithdb`, with username `admin` and password `admin`.

            Regards,
            Kurian.

            Comment


            • #7
              Re:Mirth Internal DB

              Hey,
              I have mentioned the database name as mysql (database=mysql). I am attaching the conf/mirth.properties and conf/mysql-SqlMapConfig.properties file with this post. I have changed the format to .txt since the forums doesn't allow files with .properties. I have created a database `mirthdb` with username and password as `admin`. Kindly go through. Thanks.

              Regards,
              Kurian. mirth_properties.txt (384 bytes)

              Post edited by: kmthayil, at: 02/16/2008 04:29

              Comment


              • #8
                Re:Mirth Internal DB

                Hey,
                conf/mysql-SqlMapConfig.properties file is attached with this post. I have changed the extension to .txt since forum doesn't allow files with .properties.

                Regards,
                Kurian. mysql_SqlMapConfig_properties.txt (117 bytes)

                Comment


                • #9
                  Re:Mirth Internal DB

                  kmthayil wrote:
                  Hey Jon,
                  I tried moving the file, c430.dat to a different location after stopping the Mirth service. Then I started service, but I was not able to login with the username and password. So I think the files in seg0 is mandatory and need to do something else to solve the situation. Do suggest some tips.

                  Regards,
                  Kurian.<br><br>Post edited by: kmthayil, at: 02/15/2008 23:27
                  Yea you want to be sure to back up ALL of your channels and your server settings. Right now all of those settings are stored in the derby database (the mirthdb files) and will need to be restored into mysql.

                  Your configs look right, did you run the mysql SQL script to add tables to the new database?

                  Heres what I think you need to do:
                  1. Run the SQL scripts on your mysql DB
                  2. Confirm that you can log in to the mysql DB using the default admin/admin username and password
                  3. Switch back to derby
                  4. Export all of your channels
                  5. Export your server settings
                  6. Switch to mysql
                  7. Import the server settings
                  8. Import the channels
                  9. Confirm that it all works
                  10. Confirm that it all works
                  11. Remove your derby db files

                  Might be a nice feature addition for 1.8 to migrate from Derby to MySQL and Postgres. Start with derby and prove that it works then move to a real database for production.
                  Jon Bartels

                  Zen is hiring!!!!
                  http://consultzen.com/careers/
                  Talented healthcare IT professionals wanted. Engineers to sales to management.
                  Good benefits, great working environment, genuinely interesting work.

                  Comment


                  • #10
                    Re:Mirth Internal DB

                    Hey Jon,
                    Oh... Seems like there are somany steps to be done. How do I export Server Settings and Import Server settings. I may be asking a very simple or a basic question. But do reply. Thanks in advance.

                    Regards,
                    Kurian.

                    Comment


                    • #11
                      Re:Mirth Internal DB

                      kmthayil wrote:
                      Hey Jon,
                      Oh... Seems like there are somany steps to be done. How do I export Server Settings and Import Server settings. I may be asking a very simple or a basic question. But do reply. Thanks in advance.

                      Regards,
                      Kurian.
                      In mirth 1.6.1 you can export server settings by going to Settings and then under 'Server Configuration' hitting Backup to export and Restore to import.
                      Jon Bartels

                      Zen is hiring!!!!
                      http://consultzen.com/careers/
                      Talented healthcare IT professionals wanted. Engineers to sales to management.
                      Good benefits, great working environment, genuinely interesting work.

                      Comment

                      Working...
                      X