The No. 3 software maker said on Tuesday that it gained share from SAP AG
Morgan Stanley analyst Adam Holt said he believed Oracle is also winning share in its database business, where it competes with International Business Corp
If they are able to gain share through the downturn then they will have stronger customer relationships as the economy improves, Holt said.
Oracle had helped set analysts' forecasts in March, when executives warned that the recession and strong dollar would take a substantial bite out of profits.
Since then, the economy has stabilized and the U.S. currency has weakened, setting Oracle up to beat those conservative estimates.
New software sales, a closely watched revenue measure, fell 13 percent to $2.7 billion in Oracle's fiscal fourth quarter ended May 31. Analysts were expecting them to decline about 18 percent.
Oracle reported profit, excluding items, of 46 cents per share, 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, led by billionaire Larry Ellison, said its adjusted operating margin was 51 percent, up 2.4 percentage points from a year ago.
Its margin rose on an increase in revenue from its highly profitable software maintenance business. Its 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 that net income fell 7 percent to $1.9 billion, or 38 cents a share, from $2.0 billion, or 39 cents, a year earlier.
Shares in the Redwood City, California-based company rose to $20.37 in extended trading. They had fallen 0.5 percent to $19.87 on Nasdaq.
(Reporting by Jim Finkle; Editing by Richard Chang)