Cleaning of messages in error database

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Cleaning of messages in error database

  • Creator
    Topic
  • #52183
    Bashirat Hahn
    Participant

      Hello all,

      I have about 68000 messages in the error database that I need to clean out. Most of it is DFT;P03 messages that started coming from our HIS(which shouldn’t have; our HIS has now been configured not to send out DFT messages). All the messages in the error database are all in state 101(unsupported Trxid). What will be the best way to handle cleaning it up? I was just going to dump all the messages into a file and start a clean error database and kinda monitor what else is failing with unsupported trxid.

      Any thoughts and advice will be greatly appreciated (By the way I am still a newbie to cloverleaf)

      Thanks much!

    Viewing 3 reply threads
    • Author
      Replies
      • #73327
        Greg Eriksen
        Participant

          If you’ve had that many messages pile up in the error db, it sounds like a good idea to reinitialize the database rather than just try to dump/delete the messages out of it, because the latter approach wont give you back any disk space (and I think all those empty slots in the db make it slower to work with).  You will need to end all processes in that site and also stop the site daemons before doing the init command.  Probably in your case:

          hcidbinit -ef

          Or if you are sure there are no messages pending in the recovery db and you want to reset everything:

          hcidbinit -AC

        • #73328
          Bashirat Hahn
          Participant

            Thanks Greg for your answer. One more question if you don’t mind. I want to save the messages in the error database to a file(Just in case). How do I send saved file messages through the engine?

            Thanks again

          • #73329
            Greg Eriksen
            Participant

              I wondered why you mentioned dumping them to a file if they were all from a message type you didn’t need, but if it’s possible there are some errors for other message types (or other threads) mixed in, then saving them to a file would be a reasonable precaution.

              If you wanted to just delete the DFT^P03 messages and leave everything else in the error db, one option would be:

              hcidbdump -e -D -F -f -s 101

              This would delete error messages from that thread only, and which had the specific “101” status.  Then you could see if there were any errors left in the db that you cared about.  I’d still advise reinitializing the error db once you have everything cleared out, for the reasons stated earlier.

              If you’d prefer to save all the error messages to a file:

              hcidbdump -e -b -a

              This will save the messages in a length-encoded format (each message is preceded by a number giving it’s size – where it stops and the next one begins).

              Whichever you choose, I’d recommend doing this from a command line.  I avoid using the Database Administrator gui whenever there are a large number of messages involved, or the individual messages are very large in size.  It seems like the screen can freeze up, leading to database corruption (db Vista errors).  (It’s fine to use the gui screen when you are sure there are only a small number of messages.)  Though you also need to be careful when using the hcidbdump command.  Once you hit enter, you must just leave it alone and allow it to finish executing and return.  You should never get impatient and interupt it by using Cntl-C.  A handy thing about the gui is you can use it to play around with the options, and then hit the “Show Command” button (rather than “Apply”), and then copy/paste to the command line.

              Now, to answer your question about resending the messages from a file.  Since these are messages from the error db, that means they are the incoming message, rather than something that has gone through translation, so they would need to be re-sent to the inbound thread.  Right click on the thread icon in the NetMonitor and chose Control/Full.  In the Controls pop up, choose “resend”.  In the “Direction” section at the top, I think you are going to want to select the radio button for “inbound post-TPS”.  This is because an inbound thread is usually receiving HL7 messages over a tcp/ip connection, and is sending back HL7 Acknowledgment messages.  But you are feeding in messages from a file, so there’s no need for any Acks, and I believe by using the post-TPS stack you skip over that part.  Leave the Msg Type as “Data”.  Use the “List” button to select the path to your file name.  In the “File Format” section at the bottom be sure to change the selection to “Length Encoded”, if that’s how you saved the file.  Hit the OK button, and you should see the thread get bogged down with 68,000 messages!  Unless you set the priority in the resend lower than the default, real-time messages coming into that thread might get delayed until the resend is finished.

              As long as I’ve blathered on this long, I thought I’d mention one other piece of advice (there’s usually several different ways to accomplish things in Cloverleaf, so compare anything I suggest with other postings on this forum).  If there was a considerable gap of time between when you first became aware that you were receiving a new, unexpected message type, and when you finally got your HIS system to stop sending the DFT messages, you might have been able to reduce the impact on the error db by creating a new routing entry for the DFT^P03 messages.  Do it as a raw route, with the destination set right back to the same inbound thread name, but with “hcitpsmsgkill” as the proc in the route details.  That way the engine has somewhere to send the messages, even if they all get a “KILL” disposition along the way, and it doesn’t get flustered and consider them an unsupported transaction type.

              In fact, something we have done a number of times is to set up a “Static” routing like this on inbound threads so that no matter what is received it has somewhere to go (and then gets killed).  After that we create the individual routing entries for the message types/events we actually expect to receive and want to interface.

            • #73330
              Bashirat Hahn
              Participant

                Thank you very much for the detailed explanation. I really do appreciate it.

            Viewing 3 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.