Oracle (Nasdaq: ORCL) is casting aside longstanding rivalries with Microsoft (Nasdaq: MSFT) and Inc., with partnerships to bolster its cloud-computing services aimed at businesses moving their software online.

In one alliance, Microsoft’s Windows Azure cloud-computing service will run Oracle’s database software, Java programming tools and application-connecting middleware, Microsoft Chief Executive Officer Steve Ballmer and Oracle co-President Mark Hurd said. Under a separate nine-year pact, Salesforce is buying Oracle hardware and software to power its applications.

“When customers choose cloud applications they expect rapid low-cost implementations,” Ellison said in a statement today announcing the Salesforce partnership. “They also expect application integrations to work right out of the box — even when the applications are from different vendors.”

Oracle is mending fences with former foes as it shifts focus to subscription-based online software rather than programs installed on customers’ own machines, a transition forced in part by nimbler cloud-computing rivals including Salesforce. Microsoft is competing with Google Inc. and Inc. as it seeks new sources of revenue from online services, as demand for personal computers slumps.

“It’s about time, and we’re really glad to have the chance to work in this much newer and more constructive way with Oracle,” Ballmer said. “The partnership has an immediate benefit to customers of every size and shape.”

Compatible Software

Microsoft and Oracle’s collaboration would lure customers seeking more technical compatibility between products. Oracle plans to support versions of its database and Java software that customers run through the online Azure service, and when using Microsoft’s Hyper-V virtualization software, which lets servers run more efficiently, Hurd said. Oracle also will let customers use their current software licenses on Azure, he said.

Oracle’s database, which will be upgraded later this year as a new version called 12c, competes with Microsoft’s own SQL Server. Companies using Microsoft’s Azure cloud service, which lets companies build and run programs online, will be able to put information into Oracle’s database.

The alliance with Microsoft lets Oracle offer its customers the option of sticking with its database and middleware at a time when businesses are moving more of their software to cloud- computing services. Oracle reported on June 20 that fiscal fourth-quarter software license and subscription sales grew just 1 percent, less than analysts had projected.

Database Market

Oracle controlled 45 percent of the $28.2 billion worldwide database market in 2012, compared with 20 percent for Microsoft and 18 percent for International Business Machines Corp., according to IDC.

Azure’s main competitor is Amazon Web Services, in a growing area called infrastructure as a service, which lets companies rent computing power, storage and database software via the Internet. That’s the fastest-growing part of the cloud market, according to Gartner Inc., which estimates sales in the market segment to surge by an average of 38 percent annually to $30.6 billion by 2017, from $6.17 billion last year.

Microsoft, which said in April that revenue from Azure and related software sales topped $1 billion annually, has pledged to match Amazon Web Services’ prices.

‘Platform Wars’

“This deal gives Microsoft clear competitive advantages against two of its top rivals,” James Staten, an analyst at Forrester Research, said in a blog post. It bolsters Microsoft’s efforts to compete with VMware Inc., the market leader in virtualization software, and “gives Windows Azure near-equal position against Amazon Web Services in the cloud platform wars,” he said.

Oracle also will make its version of the open-source Linux operating system available through Azure.

“The cloud is the tipping point that made this happen,” Hurd said. “This made a lot of sense for both of us.”

The two companies have a long history of competition stretching back to the dawn of personal computers in the 1970s. Oracle CEO Larry Ellison, who first publicized the alliance on his company’s earnings conference call last week, used to deride Redmond, Washington-based Microsoft as a “convicted monopolist” after it was found guilty in federal court of illegally defending its Windows monopoly to squelch competition.

Trash Inspection

In 2000, Redwood City, California-based Oracle said it hired detectives to comb the trash of two organizations supporting Microsoft in its antitrust trial. Ellison added that he’d be happy to ship his garbage to Redmond for inspection.

Still, Microsoft and Oracle have cooperated before. Oracle’s database also runs on Windows, and developers using Microsoft’s Web services software can build applications using Oracle’s software tools.

Ballmer said that the companies would continue to compete, and that much of their cooperation so far had been done out of public view. The very nature of cloud computing, in which software applications span multiple companies’ infrastructure software and Web sites, meant that approach was no longer sufficient, he said.

“That behind-the-scenes collaboration is not enough. People wanted more from us,” Ballmer said. “In the world of cloud, you’ve got to do that kind of partnership actively, not passively.”

Past Detente

The announcement was reminiscent of a 2004 detente between Ballmer and former Sun Microsystems CEO Scott McNealy, who appeared onstage together at a San Francisco hotel to swap hockey jerseys, demonstrate interoperability between their products and announce a settlement to legal disputes between the longtime rivals.

The deal with Salesforce comes after CEO Marc Benioff was scratched from a speaking spot at Oracle’s OpenWorld conference in 2011, leading Benioff to stage a mock protest before speaking at a nearby hotel. Benioff, who used to work for Ellison as an Oracle salesman, has been winning business from Oracle with online tools for customer management, marketing and human resources.

Salesforce, which already uses Oracle’s database software to run its cloud service, committed to continued use of that product, Oracle’s Java middleware, and its Exadata server computers. Salesforce will use Oracle’s financial management and HR software internally, and the two companies’ applications will share some data.

“Larry and I both agree that and Oracle need to integrate our clouds,” Benioff said.

Ellison also said last week that he planned an alliance with NetSuite Inc. — of which he’s a partial owner — to use the upcoming 12c database. NetSuite and Salesforce already run Oracle’s database to power its applications.

Oracle declined less than 1 percent to $29.96 at the close in New York, while Microsoft dropped 0.1 percent to $33.67. Shares of Salesforce rose 1.3 percent to $37.44.