Agent DB cleanup

Change-Id: I199cdd84aeca166c4a1ab51da39c2c73698e5339
Merge "Agent DB cleanup"