Several fixes for tools
Merge pull request #4511 from ggovi/new-conddb-tools-fix2

Several fixes for DB tools