U.S. stocks were little changed on Wednesday as investors paused following a sharp two-day rally and looked ahead to comments from Federal Reserve Chair Janet Yellen.

The S&P 500 was within striking distance of all-time highs, though an Oracle Corp (ORCL.N) selloff weighed on tech shares, and economic bellwether FedEx Corp (FDX.N) sounded a sour note in its outlook. Geopolitical concerns related to Ukraine also remained in view.

Oracle was the S&P's biggest percentage loser, down 2.9 percent to $37.70 a day after it reported revenue below estimates, dashing hopes for a sustained turnaround. FedEx posted results below expectations and gave a weak full-year profit forecast, but the package shipper said it had been significantly hurt by winter storms, and the stock rose 0.7 percent to $139.64.

"Investors have to ask, with the market at record highs, are they willing to shake off subpar earnings in the face of potential geopolitical events unfolding? So far they're unfazed and relatively calm going into the Fed, but it won't take much to create some concern," said Michael O'Rourke, chief market strategist at JonesTrading in Greenwich, Connecticut.

The Fed is not expected to deviate from its path when it announces its policy decision in a statement at 2:00 p.m. (1800 GMT), but market participants will be attuned the subsequent news conference from Janet Yellen, her first as chair, for any clue on the speed of future stimulus cuts, as well as how soon interest rates might be raised.

The Dow Jones industrial average .DJI was up 16.82 points, or 0.10 percent, at 16,353.01. The Standard & Poor's 500 Index .SPX was up 0.68 points, or 0.04 percent, at 1,872.93. The Nasdaq Composite Index .IXIC was down 7.43 points, or 0.17 percent, at 4,325.88.

Equities have rallied this week, boosted by easing geopolitical concerns, though trading volumes have been light. The S&P 500 .SPX has risen 1.7 percent over the past two days, the best back-to-back performance for the benchmark index since early February, putting it just 0.3 percent away from a record closing high reached earlier this month.

Ukraine's acting defense minister said the country's forces would not withdraw from Crimea after the region voted to join Russia in a disputed referendum. Russian President Vladimir Putin has signed a treaty to make it part of Russia, and while no violence was reported as pro-Russian forces took control of part of a Ukraine naval base, investors are concerned that tensions in the region could escalate.

In earnings news, KB Home (KBH.N) rose 8.9 percent to $19.25 after swinging to a first-quarter profit, helped by higher prices, while Adobe Systems (ADBE.O) late Tuesday gave a second-quarter revenue outlook that was ahead of forecasts, but the stock fell 1.5 percent to $67.53.

JPMorgan Chase & Co (JPM.N) said it would sell its physical commodities business to Swiss trade house Mercuria for $3.5 billion. Shares were unchanged on the day.