Oracle posted earnings that topped Wall Street estimates and lifted its outlook, as strong AI demand drove its sales and backlog to record highs.