You can delete a single message from the recovery (or error) databases using the MID (message ID):
hcidbdump -r -m xxxxxxxx -D
where xxxxxxxx is the message ID (the number you see after the 0.0. in the hcidbdump -r display).
You’ll need to determine which message though by doing an UltraLong display to look at the contents of the messages. Once you’ve identified which message, then you can use the above command to delete it by the MID. You’ll also need to stop the associated thread to clear the message, as the engine may have a copy of the message in memory.
I am wondering if I can perform search functions in the backend using hcidbdump -r -L. Is there is a way to grab the file as display by command hcidbdump -r -L and putting the output in a file to do a search?
Then you can use your favorite viewer to look and search for entries in that file. Things that come to mind are: vi, cat, pg, more. You can FTP the file to another server and use notepad, wordpad, textpad, ipad…
I also like to include the -d and add the destination or possible -f and add the source to keep the file very specific to what I’m looking for.
You can get real crazy and write a tcl proc or some sort of script over the file and completely automate it if you have the skillset to do that.
I would add something to this. What Michael says is accurate but if you want to avoid locking the recovery database while this command runs (which will cause messages to be unable to be delivered) then you will want to add the -U switch to the command:
hcidbdump -r -U someuser -L > recoverydb.txt
The username that you use is not terribly important but what this does is keeps it from using the default username that the engine uses.