Shares of Oracle (ORCL 0.38%) recently dipped after the tech giant reported its second-quarter earnings. The company beat top and bottom line expectations, but its guidance for the current quarter came up short.

Nonetheless, Oracle's stock remains up nearly 25% for the year, beating the S&P 500's 20% gain. Should investors buy the stock after its latest drop, or should they wait for lower prices? Let's weigh the pros and cons to find out.

An Oracle-branded plane.

Image source: Oracle.

First, the good news...

Oracle's second-quarter revenue rose 6% annually to $9.63 billion, beating expectations by $60 million. Its total cloud revenues grew 44% to $1.5 billion, exceeding its own guidance for 39% to 43% growth.

Within that total, Oracle's cloud SaaS (software as a service) revenue rose 55% to $1.1 billion, fueled by the growth of its Fusion Cloud enterprise services. The SaaS business had a gross margin of 66% for the quarter, up from 59% a year earlier and placing it on track to hit the company's target of 80% by fiscal 2018.

A smartphone, laptop, and tablet surrounding a cloud icon.

Image source: Getty Images.

Oracle's cloud PaaS (platform as a service) plus IaaS (infrastructure as a service) revenues rose 21% to $396 million. However, part of its PaaS/IaaS business comes from its legacy hosting business, which lacks the same high-growth characteristics as its newer PaaS and next-gen IaaS services, which target rivals like Amazon's (AMZN -0.34%) AWS (Amazon Web Services).

Revenues from Oracle's higher growth PaaS/IaaS businesses rose 49% annually, but the legacy hosting services posted a decline of nearly 10%.

AWS, which is much larger than Oracle's PaaS/IaaS unit, generated $3.2 billion in revenues last quarter and remains a tough competitor. Oracle claims that its new AI-driven database services and lower prices will widen its moat against AWS, but it still faces a tough uphill battle. It's also trying to convert more users with BYOL (bring your own license) offers, which enable long-term legacy customers to apply their licenses to Oracle's newer cloud infrastructure services.

Oracle's non-GAAP operating margin rose two percentage points annually to 44%. Its non-GAAP earnings grew 14% to $0.70 per share, beating expectations by two cents.

Deferred revenue, an indicator of future demand, also rose 9% to $8.1 billion. Oracle's operating cash flow over the past 12 months rose 2% to $14.6 billion, and the board boosted its authorization of buybacks by $12 billion.

Now the bad news...

Oracle is relying on the growth of its cloud businesses to offset weaker growth in its older software license and hardware revenues.

Unfortunately, those legacy businesses remain weak. Its software licensing revenue stayed flat annually, software license updates and product support revenues rose 4%, on-premise software revenues grew 3%, hardware revenues fell 7%, and service revenues inched up 1%.

Oracle's guidance for the third quarter was also soft. It expects 21%-25% annual growth in cloud revenues, which would lift its total revenues 2% to 4% ($9.5 billion to $9.6 billion) -- but that misses the consensus estimate of $9.68 billion. It also expects its earnings to stay nearly flat at $0.68 to $0.70 per share, which falls short of the analyst estimate of $0.72.

Another issue for Oracle is the US dollar. On a constant currency basis, Oracle's total revenue growth comes in a single percentage point lower at 5% -- indicating that a weaker US dollar amplifies its overseas sales.

Looking ahead, Oracle believes currency tailwinds could lift its third-quarter revenue by 5% to 7%, but that estimate comes in slightly lower than its previous guidance.

So is it the right time to buy Oracle?

Analysts expect Oracle's revenue and earnings to respectively rise 5% and 7% this year, and the stock trades at a reasonable 15 times forward earnings. It also pays a forward dividend yield of 1.6%.

After Oracle's last post-earnings dip in September, I told investors that it would be a "great time" to start a new position in this tech giant. The stock has dipped about 1% since then, but I still think its growing cloud business and expanding margins make it a great long-term investment.