pre db connect