Both Oracle Corp and Google Inc have taken unreasonable positions on the scale of damages involved in a high stakes patent battle over the Android operating system, a U.S. judge said in court.

You're both asking for the moon and you should be more reasonable, U.S. District Judge William Alsup said in a testy hearing on Thursday.

Oracle sued Google last year, claiming the Web search company's Android mobile operating technology infringes Oracle's Java patents. Oracle bought the Java programing language through its acquisition of Sun Microsystems in 2010.

The case is part of a wider web of litigation among phone makers and software firms over who owns the patents used in smartphones and tablets, as rivals aggressively rush into a market in which Apple jump-started with iPhone and iPad.

In a separate order on Thursday, U.S. Magistrate Judge Donna Ryu granted Oracle's request to question Google Chief Executive Larry Page under oath.

Google casts Oracle's damages calculations as between $1.4 and $6.1 billion and asked Alsup to disallow Oracle's estimates.

At a hearing on Thursday in a San Francisco federal courtroom, Alsup sharply questioned Oracle attorney Steven Holtzman about Oracle's damages estimate, noting the expert who crafted it was paid $700 an hour by Oracle and came up with a figure topping $6 billion.

Google maintains that Oracle deserves no damages.

Zero is ridiculous, said Alsup, who rejected Google's argument that its ad sales should not be included in estimating damages from the Android system.

They're totally wrong on that, Alsup said.

The judge did not rule from the bench on Thursday, but said he would issue an opinion soon.

At one point, Holtzman directed Alsup to an internal email sent to Google Android chief Andy Rubin from a Google engineer.

Under the direction of Google co-founders Page and Sergey Brin, Google engineers explored alternatives to using Java technology, but ultimately concluded they all suck, the email said.

Google should license Java technology, according to the email, which Alsup read aloud in court.

Google attorney Robert Van Nest responded that the email was sent after Oracle had threatened Google with litigation last year -- not when Android was first launched in 2007.

Alsup warned Google it could suffer drastic penalties if Oracle is able to prove Google willfully infringed Oracle's patents.

A Google spokesman declined to comment.

At one point, the judge expressed frustration when Holtzman appeared hesitant to discuss certain details of the case openly in court.

This is public proceeding. You lawyers and companies are not going to handcuff the court, Alsup said, adding: This is not a wholly owned subsidiary of Oracle Corp.

An Oracle spokeswoman declined to comment.

Oracle will be allowed to depose Page for two hours, wrote Ryu, the magistrate. Google is also planning to take Oracle Chief Executive Larry Ellison's deposition.

The case in U.S. District Court, Northern District of California, is Oracle America, Inc v. Google Inc, 10-3561.

(Editing by Andre Grenon)