Oracle Corp. came close to acquiring Micros Systems Inc., a maker of software for stores and restaurants, six years ago. Micros Chief Executive Officer Tom Giannopoulos flew from Maryland to California to sign a deal, only to have the transaction fall through at the last minute, according to a person with knowledge of the matter.

Now Oracle CEO Larry Ellison is again trying to buy Micros, this time for more than $5 billion, people familiar with the deal said yesterday. This would be his largest acquisition since buying Sun Microsystems Inc. in 2010.

Ten quarters of sluggish growth have turned Oracle from the leader in database software to a laggard in the swiftly growing market for programs delivered over the Internet. Ellison, 69, is rushing to remake the company to catch nimbler rivals that have pioneered new ways to sell software. The deal would give Oracle a bigger beachhead in the hospitality industry and a broader base of customers for the rest of its business programs.

“Oracle was clearly late to the cloud,” said Daniel Ives, an analyst at FBR Capital Markets & Co., who rates Oracle the equivalent of a buy. “They are starting to make changes, but this would be another step in terms of recognizing what they need to do.”

Shares of Columbia, Maryland-based Micros rose 15 percent to $66.33 at yesterday’s close in New York and earlier soared as much as 22 percent, their biggest gain since September 1996. Oracle rose less than 1 percent to $42.32.

Deborah Hellinger, a spokeswoman for Redwood City, California-based Oracle, declined to comment. Peter Rogers, executive vice president of investor relations at Micros, didn’t return calls seeking comment.

Oracle has long been an acquisition machine under Ellison, who is worth $46.6 billion and ranks eighth on the Bloomberg Billionaires Index. He led Oracle Team USA to victory in the America’s Cup last year and agreed in 2012 to buy most of the Hawaiian island of Lanai for an undisclosed sum.

As rivals including Salesforce.com Inc. that specialize in cloud computing have risen to the fore, Oracle has turned to purchasing firms that make software for specific industries, such as retail and hospitality, to diversify its offerings.

Oracle has spent $50 billion to acquire about 100 companies in the past decade. Of those, more than 20 have been geared at specific industries, including the 2010 acquisition of clinical- trial software maker Phase Forward Inc., and purchases of retailer-software makers ProfitLogic Inc. and Retek Inc. in 2005. In December, Oracle agreed to buy marketing-software maker Responsys Inc. for about $1.5 billion to court chief marketing officers.

Micros’s revenue totaled $1.29 billion in its fiscal 2013 and it has been growing in the low double-digit range for the past three years. The company is projected to generate $1.37 billion in fiscal 2014, which ends late this month, according to data compiled by Bloomberg.

Micros, which had more than 6,300 employees as of 2012, said on its website that more than 330,000 of its systems are installed in table and quick service restaurants, motels, hotels, casinos and other locations in more than 180 countries. Peter Altabef, a former Dell Inc. executive, has been CEO of Micros since January 2013 and Giannopoulos is now the chairman.

Other players in the hospitality software market include Epicor Software Corp. and Infor Inc. Infor is run by former Oracle president Charles Phillips.

“This is about survival for Micros,” Jason Richelson, founder of ShopKeep.com Inc., a point-of-sale cloud-computing company that competes with Micros. “The cloud has decimated every software industry. It’s great news potentially for Micros and their shareholders but it’s bad news for small retailers and restaurants. Oracle is known for pushing hard sales tactics and selling software into businesses that don’t need all of that.”

At a $5 billion purchase price, Micros would be valued at 29 times earnings of $168 million, in the year through March. That compares with a median of 31 times earnings paid in 40 takeovers of U.S. software companies in the last five years, data compiled by Bloomberg show. In the four deals for which data is available, Oracle paid a median multiple of 82.5 times earnings, the data show.

Oracle will report its fiscal fourth-quarter earnings on June 19. In the previous quarter, license and loud-subscription revenue fell short of analysts’ estimates. The company is projected to report that profit, excluding some items, rose to 96 cents a share as sales increased 5 percent to $11.48 billion for the quarter ended May 31.