bugfix; adopt DB config and access code to tool-labs

Change-Id: Ia18ee4de27c5d844f89e4de4bf20d78214c2001d