Alibaba (>> Alibaba Group Holding Ltd) took the spotlight after its initial public offering priced at $68 a share and rose as high as $99.70 before ending the session up 38 percent to $93.89. Shares of Yahoo (>> Yahoo! Inc.), which is selling part of its Alibaba stake but will remain a top shareholder, were volatile in heavy volume and closed down 2.7 percent at $40.93.

"Alibaba was awesome. The Alibaba deal was done correctly, which is, you leave something on the table for investors to enjoy," said Phil Orlando, chief equity market strategist at Federated Investors in New York.

"So the market got to focus on Alibaba, which was a positive."

But technology shares weighed on the S&P 500 with Oracle (>> Oracle Corporation) down after Larry Ellison, co-founder and leader for 37 years, stepped aside as chief executive. He will be replaced by co-CEOs Safra Catz and Mark Hurd, raising questions about a job-sharing arrangement that has had a mixed record elsewhere.

Oracle shares lost 4.2 percent to $39.80 as the biggest drag on the S&P 500 while the S&P technology index <.SPLRCT> was the worst performing of the 10 major S&P sectors.

The Dow Jones industrial average <.DJI> gained 13.75 points, or 0.08 percent, to 17,279.74, the S&P 500 <.SPX> lost 0.96 points, or 0.05 percent, to 2,010.40, and the Nasdaq Composite <.IXIC> dropped 13.64 points, or 0.3 percent, to 4,579.79.

Volume was heavy, with about 8.68 billion shares traded on U.S. exchanges, well above the 5.71 billion average so far this month, according to data from BATS Global Markets. Aside from Alibaba, volume also received a boost from "quadruple witching," the expiration of futures and options for indexes and stocks.

Dresser-Rand (>> Dresser-Rand Group Inc.) jumped 9.4 percent to $79.91 after a report Germany's Siemens (>> Siemens AG) plans to offer more than $6.1 billion, or $80 per share, for the U.S. compressor and turbine maker.

Among the most active stocks on the NYSE were Alibaba, Coca-Cola Co (>> The Coca-Cola Company), up 0.62 percent to $42.05, and Bank Of America (>> Bank of America Corp), down 0.53 percent to $16.95.

On the Nasdaq, Yahoo, Microsoft (>> Microsoft Corporation), up 1.8 percent to $47.52 and Sirius XM (>> Sirius XM Holdings Inc), down 1.8 percent to $3.57 were among the most actively traded.

Declining issues outnumbered advancing ones on the NYSE by 1,824 to 1,180, for a 1.55-to-1 ratio on the downside; on the Nasdaq, 1,796 issues fell and 951 advanced for a 1.89-to-1 ratio favoring decliners.

The benchmark S&P 500 index posted 75 new 52-week highs and 9 new lows; the Nasdaq Composite had 88 new highs and 117 new lows.

(Reporting by Chuck Mikolajczak; Editing by Nick Zieminski)

By Chuck Mikolajczak