The surprise announcement from the two companies comes after deal talks between IBM
Sun shares jumped 37.5 percent to $9.20 in premarket trading, while Oracle shares fell 4.5 percent to $18.34.
The price of $9.50 a share values Sun at about $7.1 billion based on about 745 million shares outstanding, according to Sun's latest regulatory filings.
The companies said in a statement the transaction is valued at about $7.4 billion, or $5.6 billion net of cash and debt.
(Reporting by Tiffany Wu; Editing by Derek Caney)