Oracle is losing favor among technology buyers to leading cloud computing vendors, according to J.P. Morgan.

The firm lowered its rating to neutral from overweight for Oracle shares, citing negative results in a spending survey of chief information officers.

Oracle's "specific metrics in our large-scale CIO survey have arced over into negative territory, which makes us uncomfortable because the results of our CIO surveys over the years have been highly predictive," analyst Mark Murphy said in a note to clients Thursday. "Oracle spending intentions have only looked lukewarm in our CIO survey work in the recent past, but the data takes a dive in the current survey. … In our discussions, CIOs have clarified that they are migrating Oracle databases to Microsoft SQL Server, Amazon databases and PostgreSQL."

Oracle shares fell 4.9 percent Thursday.

Murphy lowered his price target to $53 from $55 for Oracle shares, representing 10 percent upside from Wednesday's close.

The analyst's survey of 154 chief information officers revealed Oracle received the most indications for "spending contraction" this year. He also noted the company was mentioned by just 2 percent of the executives as their "most integral" vendor for cloud computing versus 27 percent for Microsoft and 12 percent for Amazon.

"Oracle's strength in database and middleware is countered by long-term uncertainty in applications and hardware as IT consumption preference shifts from traditional, on-premise solutions to public cloud models," he said.

The software company's shares are up 2 percent year to date through Wednesday compared with the S&P 500's 4 percent return.

Oracle did not immediately respond to a request for comment.

— CNBC's Michael Bloom contributed to this story.