Oracle shares rose more than 8% and closed at a record Thursday after the software maker reported better-than-expected earnings.

The stock had its best day in almost exactly two years, closing at $56.99 and helping lift the S&P 500 to an all-time high. Adobe, Microsoft and PayPal also reached records.

Oracle reported revenue growth of 1% to $11.14 billion, topping the $10.93 billion average analyst estimate, according to Refinitiv. Earnings of $1.16 a share, excluding some items, were up from 95 cents per share a year earlier and topped the $1.07 average estimate.

Brent Bracelin of KeyBanc Capital Markets wrote in a note that quarterly revenue "was better than feared given broader weakness across the infrastructure sector." Bracelin has the equivalent of a hold rating on the stock.

Several analysts raised their price targets after the report. Dimitri Kallianiotis of Atlantic Equities now expects the stock to reach $49, up from $46, though that price is still below where it's currently trading. Kallianiotis said sales growth from cloud and on-premise licenses was "reassuring considering disappointing results reported by other infrastructure vendors."

Nomura Instinet's Christopher Eberle, who has a reduce rating on Oracle, wrote that the company's guidance for capital expenditures for the 2020 fiscal year was $2.2 billion, higher than $1.7 billion in the two prior fiscal years. Increased capital costs can imply greater spending on data center infrastructure for cloud services.

Evercore ISI analysts led by Kirk Materne described the quarterly report in their Thursday note as a "solid quarter vs. a low bar." They raised their price target by $2 to $55.

WATCH: Oracle beats on top and bottom lines