Investors are betting that business software service company will be sold, with Oracle emerging as the early favorite to pull off a deal that could cost about $50 billion.

IBM also is a possible buyer, according to various reports.

Big Blue is shifting its focus to software solutions and services as well as the “cloud.” And Salesforce is a major player in cloud-based services.

Notes Bloomberg news: “ Inc., the software provider that has hired bankers to field takeover offers, would make sense as a partner for a buyer willing to spend a lot to become the leader in cloud computing.”

Salesforce shares surged 12 percent to $74.65 on Wednesday, driving its market value up to some $49 billion.

A Bloomberg report about Oracle, which has a large presence in Morrisville after its acquisition of Tekelec, possibly buying Salesforce triggered the stock buying spree.

If it were to happen, an Oracle acquisition of Salesforce would likely be the most expensive ever for a software maker and reunite two of Silicon Valley’s most colorful characters: Oracle’s Larry Ellison and CEO Marc Benioff.

“Specific to the cloud, the shift is accelerating and it’s happened more quickly than the big guys were hoping,” Steven R. Koenig, an analyst at Wedbush Securities Inc., told Bloomberg. It would give a buyer “a lot of critical mass in the cloud,” Bloomberg added.

Bloomberg cited statistics from research firm Gartner that shows Salesforce had a 16 percent share of the customer-relationship management market in 2013 followed by SAP at 13 percent, Oracle at 10 and Microsoft at 7.

The CRM market has “gone to Salesforce, and no one is going to catch up,” Koenig told Bloomberg.

FBR Capital Markets analyst Daniel Ives said he believes Oracle is the most logical buyer for Salesforce. “Ultimately, we view this more as Oracle trying to make a bold, decisive move to stake its claim in the cloud before it falls even farther behind,” Ives wrote in a Wednesday research note.

Oracle also could afford the steep price it would take to devour Salesforce. Oracle already has nearly $44 billion in cash and could easily borrow whatever else it needed to pay Salesforce’s asking price, which figures to be above its current market value of $47 billion.

Other potential bidders for Salesforce include IBM, Hewlett-Packard Co. and Microsoft Corp., Ives said.

Benioff founded his San Francisco company in 1999 shortly after leaving a post as a top executive at Oracle. There he became so close with Oracle Chairman Larry Ellison that the two used to go on double dates together. The relationship resulted in Ellison putting up $2 million to become one of Salesforce’s initial investors, though he later was ousted from the company’s board when Benioff discovered his former boss had secretly been building a competing product.

Benioff, though, retained the flamboyant Ellison’s flair for showmanship while emerging as an outspoken evangelist for “cloud computing” — the concept of making software applications available on any device with an Internet connection instead of licensing programs to be installed on the disk drives of individual computers.

Ellison originally dismissed cloud computing as a passing fancy, but Oracle is now scrambling to expand in the field as more customers defect to subscription services run by Salesforce and other up-and-coming rivals such as Workday Inc.

Citing unnamed people familiar with the matter, Bloomberg News reported an unnamed company had approached Salesforce about a possible takeover. The inquiry prompted Salesforce to hire advisers to consider other possible offers, according to Bloomberg.

Salesforce declined to comment. Oracle didn’t respond to a request for comment.

Ellison, who stepped down as Oracle’s CEO last year, has engineered dozens of acquisitions during the past decade, including two major deals for companies run by two of his former subordinates. Oracle paid about $11 billion to buy PeopleSoft, whose CEO was former Oracle executive Craig Conway, and about $6 billion for Siebel, whose CEO and founder, Tom Siebel, had also defected from Oracle.