Software developer Oracle is to buy Sun Microsystems for $7.4bn, including cash and debt. Oracle agreed to pay $9.50 a share for Sun, a 42% above their closing price on Friday. Oracle expects Sun to add $1.5bn to its operating profit. Sun has been struggling, posting a loss in three of its last four quarters and earlier this month acquisition talks with IBM collapsed. The acquisition is a good fit for Oracle. Its Fusion Middleware is based on Java and the Solaris operating system is the main platform for Oracle's database business. The deal is expected to be completed this summer.