Oracle Corp reported quarterly earnings above expectations as the No. 3 software maker's profit margin hit a record thanks to robust growth in its maintenance business, sending shares up 2.7 percent.

The company run by billionaire Larry Ellison also reported a smaller-than-expected drop in new software sales and said it grabbed market share from SAP in certain segments -- signs that Oracle may be weathering the downturn better than rivals.

We've been able to push through the economic situation rather well and I have to tell you that I still see the pipeline growing rather significantly, Oracle President Safra Catz said in a conference call.

Oracle's quarterly results and outlook beat expectations it set in March, when executives warned the recession and strong dollar would take a substantial bite out of profits. Since then, the economy has stabilized and the currency has weakened, setting Oracle up to beat those conservative estimates.

Oracle executives were more optimistic on Tuesday, saying customers are telling the company they need to move forward in implementing new projects to keep their businesses running.

Ellison cited customers as saying they want to spend more in the second half, but he added that remained to be seen.

Morgan Stanley analyst Adam Holt believed Oracle was taking customers away from German rival SAP AG in the market for business management software as well as boosting share in its database business, where it competes with IBM and Microsoft Corp .

If they are able to gain share through the downturn then they will have stronger customer relationships as the economy improves, Holt said.

New software sales, a closely watched revenue measure, fell 13 percent to $2.7 billion. Analysts had been expecting them to slide about 18 percent.

GREAT EXPECTATIONS

Oracle reported profit, excluding items, of 46 cents per share in the fourth quarter, ended May 31, beating analysts' average forecast of 44 cents, according to Reuters Estimates.

It's all about expectations. Everything looks good across the board, said Goldman Sachs analyst Sarah Friar.

Oracle said its adjusted operating margin was 51 percent, up 2.4 percentage points from a year-ago.

Catz said much of the increase was due to growth in revenue from its highly profitable software maintenance business, which rose 8 percent from a year earlier to $3.05 billion.

Customers buy annual maintenance subscriptions that entitle them to upgrades, bug fixes and technical support for about 22 percent of the original software cost.

We are not a cost-cutting story for the margins. We really are a profitability story for having such a large install base of customers, Catz said.

She forecast that new software sales will fall between 4 and 14 percent this quarter, assuming current exchange rates.

Catz also projected the company will post a profit, excluding items, of 29 to 31 cents per share this quarter, assuming current exchange rates, in line with analysts' average forecast of 30 cents.

Analysts said Oracle's costs also benefited from the decline in new software sales because the company paid less in commissions to its sales staff, whose bonus targets were set a year ago when the economy was in better shape.

Oracle reported net income fell 7 percent to $1.9 billion, or 38 cents a share, from $2 billion or 39 cents a year ago.

Ellison said that his development team has completed writing code for the biggest revision of its business management software in the company's 32-year history. The product, dubbed Fusion Apps, will be released next year.

It will be sold as traditional software, but is also designed to allow customers to access a wide range of programs as services over the Internet, hosted at Oracle data centers.

Although Ellison only briefly described the offering in the company's earnings conference call, his comments suggest that Oracle will soon have the widest range of programs delivered over the Web as a service.

The company currently offers a limited selection of software in that area, where it competes primarily with Salesforce.com Inc and Microsoft Corp .

Oracle's shares rose to $20.41 in extended trading. They had fallen 0.5 percent to $19.87 on the Nasdaq.

(Editing by Edwin Chan and Steve Orlofsky)