Announcement

Collapse
No announcement yet.

purge/truncate mirth database

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

  • purge/truncate mirth database

    Hello,

    We have Mirth 1.2.0 running on Redhat Enterprise Linux 3. We had a channel setup to receive ADT from an EMR system. We had not been actively monitoring it since setting it up though it has remained up and active. Initially, we also were not purging records older than 30 days, so, what has happened is that the table(s) in the mirth database grew and hit the 2 gig file size limit on the older linux (RHEL3 still being the 2.4 kernel). now we get a flood of exception about table being too big. we tried disabling it, but, it seems to not be responding to anything. we can, of course, just kill mirth.

    what we would like to do is purge the internal mirth tables and reset everything. we aren't exactly sure how to do this. if we could get it function enough as it is we could export the channel(s) and then just reset, but we can't even get that to work. so, from an "outside" approach, what can we do to truncate the tables while not losing our channel stuff????

    thanks!

    Mark

  • #2
    Re: purge/truncate mirth database

    You can try using an hsqldb client, and then, try to clean the messages table.

    0) Download an hsqldb client.

    1) Stop mirh (kill -9). hsqldb doesn't allow concurrent sessions over the same db

    2) cd to the server dir an run the db client with the url: "jdbc:hsqldb:file:database/mirth"
    $>hsqldb-databasemanagerswing --url jdbc:hsqldb:file:database/mirth
    3) Exect delete from messages where id<1000
    (increment the id until you remove all the messages in the db)

    If all fails, you can try to copy the db dir to another filesystem, and try from

    Comment

    Working...
    X