Moving DB connection inside the thread.