Oracle Corp posted a 35 percent rise in quarterly profit on strong new software sales, beating expectations at a time when investors are wary that growth in technology spending may be slowing.

Shares of Oracle rose 5.8 percent after the results on Wednesday and some analysts said the world's No. 2 software maker had a strong portfolio of products that would help shield it from a slowdown in the U.S. economy.

Oracle said net income for its fiscal second-quarter ended November 30 rose 35 percent to $1.3 billion, or 25 cents per share, from $967 million, or 18 cents a share, a year earlier.

Profit excluding items was 31 cents per share, beating the average analyst forecast for 27 cents, according to Reuters Estimates. Revenue climbed 28 percent to $5.3 billion, above the average forecast of $5.04 billion.

We were thinking a penny or two beat would be a good quarter. This was a great quarter, said Goldman Sachs analyst Sarah Friar. They are taking share away from the small guys. They are doing a great job of cross-selling from their install base.

Oracle said new software sales rose 38 percent to $1.7 billion, led by a 63 percent increase in business management applications. Database and middleware sales rose 28 percent.

Chief Financial Officer Safra Catz said on a conference call that Oracle expected new-software license revenue to rise 15 percent to 25 percent in the fiscal third quarter, and saw non-GAAP earnings per share at 29 cents or 30 cents.

That would meet or beat by a penny the average analyst forecast for earnings per share excluding items of 29 cents in the current quarter, according to Reuters Estimates.

We are seeing more deals and each deal is a little bigger than in the past, said Catz, adding that Oracle had posted its fastest software sales growth in more than a decade.

Oracle's growth has accelerated over the past few years as it built on an acquisition binge, snapping up smaller software makers. In addition to acquiring new customers and boosting revenue, Chief Executive Larry Ellison has said the deals have helped boost sales of existing products.

The plan seems to be working, said WR Hambrecht analyst Robert Stimson, adding, They beat me on every matrix, so they are to be credited.

Their technology is so important so they are a little shielded from some (economic) issues, because you have to have technology to move forward. You need to have technology to cut out some of the people costs, Stimson said.

Oracle shares rose to $21.96 in after-hours trade, from their Nasdaq close of $20.76.