Added database connectivity and db_owner role check.