Oracle Corp. has agreed to acquire medical-records systems provider Cerner Corp. for about $28.3 billion, a deal that would add a broad customer base in the healthcare industry to bolster the software maker’s cloud-computing and database businesses.

The all-cash transaction, Oracle’s biggest-ever deal, will see Oracle pay $95 a share, the companies announced in a statement. The price represents a 20% premium over Cerner’s market value last Thursday, when the deal talks first became public.

Oracle Chief Executive Officer Safra Catz said the acquisition should be “immediately accretive to Oracle’s earnings” on an adjusted basis in the first full fiscal year after closing and contribute “substantially more to earnings in the second fiscal year and thereafter.” The transaction is expected to close next year, the companies said.

Oracle, the second-biggest software maker by revenue, is best known for legacy database products and in recent years has struggled to gain ground in cloud computing, trailing far behind market leaders such as Inc. and Microsoft Corp. The deal for Cerner gives Oracle a huge foothold in technology for the healthcare industry — the sector is expected to spend $15.8 billion on cloud infrastructure and software by 2023, according to market researcher IDC.

David Feinberg, formerly vice president of Google Health, took over as Cerner’s chief executive officer on Oct. 1, saying a major goal would be to use data as a diagnostic tool to help doctors and nurses improve patient care. Two years ago, Cerner announced a deal with Amazon’s cloud division to develop programs trying to predict medical diagnoses or recommend courses of treatment for patients.

Cerner’s choice of Feinberg as CEO highlighted the company’s move toward “a strategy based on big data, population health management and consumerism — and away from the legacy health records business,” Donald Hooker, an analyst at KeyBanc Capital Markets, said when Feinberg was named to the post in August.

Cerner, which competes with Epic Systems Corp. and Allscripts Healthcare Solutions, among others, generated $5.51 billion in revenue during 2020, and sales are projected to rise by 5% to $5.8 billion this year. The company is based in North Kansas City, Missouri, has about 23,000 employees.

The acquisition is Oracle’s biggest since its 2016 purchase of NetSuite Inc., a deal valued at $8.7 billion. That purchase has provided Oracle with a financial software targeted to small and mid-sized businesses, which has become among Oracle’s fastest growing products.

Oracle said it doesn’t expect the Cerner acquisition to impact the company’s investment grade credit rating.