Extracting db connection and config