web stats
purge/truncate mirth database - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-11-2006, 07:14 AM
jobsoft jobsoft is offline
Mirth Newb
 
Join Date: Sep 2006
Posts: 12
jobsoft
Default 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
Reply With Quote
  #2  
Old 12-11-2006, 11:33 AM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default 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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mirth 1.5-Could not prune database error nshaik Support 8 06-04-2007 01:28 PM
Drop Mirth message database d.voelkerts Support 3 05-23-2007 04:18 AM
does mirth support inbuilt database? deepaganu Support 5 04-23-2007 09:11 PM
Change the Mirth reference Database asulis Support 4 02-22-2007 06:44 AM
Mirth Database pitchfork Support 2 09-25-2006 10:24 PM


All times are GMT -8. The time now is 12:37 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation