check db connection.