The agreement with Oracle came about two weeks after I.B.M. ended its talks with Sun. The Sun board balked at that deal after I.B.M. lowered its offer to $9.40 a share from $10. Still, Monday’s deal represented a 42 percent premium over Sun’s closing price of $6.69 on Friday.
Oracle and Sun said in a statement that net of Sun’s cash and debt, the deal was valued at $5.6 billion.
Lawrence J. Ellison, Oracle’s co-founder and chief executive, and Scott G. McNealy, Sun’s co-founder and chairman, have been two of Silicon Valley’s closest allies over the last 20 years. Their companies turned into two of the superstars of the Internet build out, and both executives made ribbing their rival Microsoft a favored pastime.
Historically, most of Oracle’s database sales have occurred in tandem with Sun’s servers. Over the last few years, however, Oracle has moved to make Hewlett-Packard and Dell stronger allies, as Sun’s business has declined.
“This combination is a natural evolution of our relationship and will be an industry-defining event,” Mr. McNealy said.
Sun’s directors have unanimously approved the transaction. It is anticipated to close this summer, subject to Sun stockholder approval, the companies said in a statement.
Oracle said it expected the purchase to add at least 15 cents a share to its adjusted earnings in the first year after the deal closes. The company also estimated that Sun would contribute more than $1.5 billion to Oracle’s adjusted profit in the first year and more than $2 billion in the second year.
Sun shares were up 36 percent, to $9.10, in early trading, while Oracle fell 5.6 percent, to $17.99.
The deal immediately disrupts the traditional relationships formed between some of the technology industry’s largest players and thrusts Oracle into the hardware business.
Oracle, for example, has long-standing partnerships with Sun’s rivals, including Hewlett-Packard and Dell. These sellers of server computers work to fine tune Oracle’s database and business software for their computers.
I.B.M., which competes against Oracle in the software market, also comes under new threats with the deal.
For years, I.B.M. has used its homemade servers as leverage for selling higher-profit database and business software. With Sun, Oracle opens up the same opportunity and gains access to thousands of existing Sun customers.
In addition, Oracle has now obtained the MySQL database, which Sun acquired last year for $1 billion. The open-source software has proved popular with companies looking to expand their Internet operations.
Last year, Oracle began a flirtation with the hardware market. It started reselling a server computer from H.P. that relied on its software for managing and analyzing large volumes of data.