Stocks opened higher on Wednesday after better-than-expected data out of China and Germany and as Greece inched closer to a debt deal, though recent market action suggested gains could be ephemeral.

The Dow Jones industrial average <.DJI> was up 101.79 points, or 0.81 percent, at 12,734.70. The Standard & Poor's 500 Index <.SPX> rose 10.27 points, or 0.78 percent, at 1,322.68. The Nasdaq Composite Index <.IXIC> added 19.35 points, or 0.69 percent, at 2,833.19.

(Reporting By Angela Moon; editing by Jeffrey Benkoe)