Announcement

Collapse
No announcement yet.

Mirth Derby switch to PostgreSQL

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

  • Mirth Derby switch to PostgreSQL

    Mirth 3.2.0.7628

    I have Mirth Connect in production already.
    I had thought PostgreSQL was used in production but when I checked
    the Mirth Connect Server Manager on the Database tab, it shows derby.

    Can I just change the DB from Derby to PostgreSQL?
    If so, what is the best way to do this?

    My logs are increasing daily and I need to setup Data Pruning to keep
    the disk space in check.

    Thanks in advance

  • #2
    Backup your server config, then switch the database using the Server Manager or by editing mirth.properties. After installing it into the new database, restore your server config. Note that messages will not be carried over.
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      Hello... is there a way to carry over the message from Derby to Postgres?
      Like you said making a backup export all config and channels but none of the messages.

      Thanks you
      Best Regards,
      Alex Neiva

      Comment


      • #4
        You should be able to export database table rows from derby database and import them into postgres tables.

        Since you are importing the config the database model and any metadata should be "mirrored" on postgres.

        The tables that have message content that you should export/import are:
        d_mXXX - message header
        d_maXXX - message attachments
        d_mcXXX - message content
        d_mcmXXX - message content metadata
        d_mmXXX - message statuses
        d_msXXX - message statistics
        d_msqXXX - I dont know

        XXX is an internal channel id that you can find on table "d_channels"
        I have never done this before but it should be fine....

        Comment


        • #5
          Yes, i understand that... but i was thinking that on Mirth Interface there was possible to do that... something...!

          But thanks anyway
          Best Regards,
          Alex Neiva

          Comment


          • #6
            You can export messages in XML format for each individual channel. Go into the message browser, and there is an Export Results option. Make sure that Content is set to "XML serialized message". Check "Include Attachments" if you want, and export to a folder specific to that channel. After you set up your new database and restore your server config, you can go into each channel and import those messages.
            Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

            Nicholas Rupley
            Work: 949-237-6069
            Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


            - How do I foo?
            - You just bar.

            Comment


            • #7
              Originally posted by narupley View Post
              Backup your server config, then switch the database using the Server Manager or by editing mirth.properties. After installing it into the new database, restore your server config. Note that messages will not be carried over.
              Thanks narupley! Just a followup, then.
              So do I need to stop the Mirth Connect services when I do that in order
              for the change to the new postgreSQL DB?

              Thanks

              Comment


              • #8
                Originally posted by fchang888 View Post
                Thanks narupley! Just a followup, then.
                So do I need to stop the Mirth Connect services when I do that in order
                for the change to the new postgreSQL DB?

                Thanks
                Yep. After you change the DB connection settings, you'll need to restart the service.
                Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

                Nicholas Rupley
                Work: 949-237-6069
                Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


                - How do I foo?
                - You just bar.

                Comment

                Working...
                X