Global technology giant IBM is in talks to buy Sun Microsystems in a deal that would expand its server market share, the Wall Street Journal reported Wednesday.