Fixed db support for command line environment