Socks rose on Wednesday after employers added more jobs than expected last month, but shares came off their highs as oil prices surged in a correlation expected to define trading in the near term.

Brent crude oil futures jumped more than $2, pushing above $117 a barrel, after reports of intensified fighting between government supporters and rebels in Libya.

There is an increasingly strong correlation between equities and oil, said John Brady, senior vice president at MF Global in Chicago. Investors fear rising oil prices could derail the economic recovery.

Private sector employers added more jobs than expected last month in a sign of steady improvement in the labor market, ahead of the closely watched U.S. government's monthly jobs report on Friday.

The Dow Jones industrial average <.DJI> gained 18.35 points, or 0.15 percent, to 12,076.37. The Standard & Poor's 500 Index <.SPX> rose 2.73 points, or 0.21 percent, to 1,309.06. The Nasdaq Composite Index <.IXIC> added 13.01 points, or 0.48 percent, to 2,750.42.

A broker upgrade of the semiconductor sector helped the Nasdaq. The Philadelphia semiconductor index <.SOX> rose 1.7 percent.

Texas Instruments Inc gained 3.4 percent to $36.18 after JPMorgan upgraded the semiconductor sector, including Texas Instruments, saying an inventory correction was nearing an end and demand appeared to be improving.

Private employers added 217,000 jobs in February, the ADP Employer Services report showed, above expectations for a rise of 175,000. January's figure was revised higher by 2,000 to 189,000.

Employment agency Monster Worldwide Inc gained 1.1 percent to $17.03. The Dow Jones US business training and employment agencies index <.DJUSBE> rose 1.2 percent.

Shares in Yahoo Inc rose 4 percent to $16.75. The company is in advanced talks to leave its Japanese joint venture and free up as much as $8 billion to compete with Google Inc and Facebook.

Staples Inc fell 0.4 percent to $20.81 after it forecast earnings slightly below expectations.

(Editing by Kenneth Barry).