NetSuite’s chief executive, Zachary Nelson, is a well-regarded leader who also worked at Oracle and is close to Mr. Ellison. NetSuite has held customer events at Mr. Ellison’s Silicon Valley estate. He is likely to occupy a senior role at Oracle.

Mr. Ellison, through personal and family holdings, owns more than 40 percent of NetSuite, which makes the deal to acquire it a phenomenal payday for a man who was already among the world’s richest.

NetSuite has more than 5,000 employees and specializes in accounting and other back-office e-commerce software, particularly for smaller businesses. It has also created online software for manufacturing that is akin to some of Oracle’s software applications. But that online software is created, sold and serviced differently.

Oracle has, for most of the last decade, bought cloud companies and spent big on remaking its engineering and sales staff for the cloud world. That has paid off some: In the last fiscal year, the company had $12.2 billion in core cloud software sales, an increase of 49 percent from fiscal 2014.

That is enough to make Oracle one of the largest cloud companies, but it was still just 8 percent of the company’s revenue. Overall revenue shrank 3 percent last year, as demand for older products fell.

It might have been worse. Giant tech companies like IBM and Hewlett-Packard have endured sharp revenue drops as cloud computing becomes more important, and have struggled to cope in the new environment.

Oracle has fared relatively well, in part because its core product, a powerful database used for financial and managerial work, is at the center of most major companies worldwide. Competitors are trying to sell more modern databases to replace Oracle, with relatively little success so far.