As you have observered, the database will never shrink unless initialized.
So if an interface is down for a while and backs up over 100,000 messages, your database could become larger than you want once the messages have all cleared out.
Over the years you will see many tips and tricks about hung databases and initialization.
What I did since my memory is not good is to identify those items that might tend to be worth doing during database initialization and put them in a script
When I do get ready to initialize a database I run my home grown script which others might find useful as well.
clear_db.ksh
#!/usr/bin/ksh
# here are some other usefull database commands
#———————————————-
#
# lmclear -u TEST -mp (if the user locks the database by doing ctrl-c during a hcidbdump -r
#
# lmclear -s -mp (that gives you a list of active database users)
#
# hcilmclear -p ris (if the ris process hangs the database)
#
if [[ -d $HCISITEDIR/exec/databases ]]; then
cd $HCISITEDIR/exec/databases
hcisitectl -k l
rm -f *.log
rm -f lm_*
rm -f vista.taf
rm -f mid.ctr
hcidbinit -ACi
keybuild rlog; dchain rlog
keybuild elog; dchain elog
fi
Russ Ross
RussRoss318@gmail.com