By Benjamin Pimentel

The tech sector eked a small gain Tuesday aided by SanDisk Corp. shares of which rose nearly 4% to help keep the Nasdaq Composite Index in the green.

SanDisk (SNDK) added 3.97% to close at $17.80, helping boost the Nasdaq (RIXF) by a fraction to 2,024.

Meanwhile, the Morgan Stanley High Tech 35 Index (MSH) fell 0.1%, but the Philadelphia Semiconductor Index (SOX) was up 0.5%.

Other gainers included Intel Corp. (INTC), eBay Inc. and Apple Inc. (AAPL).

Google Inc. (GOOG) rose 0.6% after being upgraded by ThinkEquity to buy.

But the sector was weighed down by other major tech players, including Dell Inc. (DELL), Juniper Networks (JNPR) and Palm Inc. (PALM).

The Dow Jones Industrial Average (DJI) gained 30 points as Wall Street reacted to Ben Bernanke's reappointment as chairman of the Federal Reserve and to better-than-anticipated home-price data.