It has had all the ingredients of an epic Silicon Valley collision between fierce rivals. Billions of dollars at stake. Powerful, high-profile executives at the epicenter. And accusations of technology theft that strike at the heart of the software industry's culture.

And, no, it is not the patent feud between smartphone competitors Apple and Samsung.

This seven-year legal war involves Oracle and SAP, the world's top two business software titans, which are set to square off again Tuesday in a federal appeals court in a case that riveted the valley when it went to trial in 2010. With $1 billion hanging in the balance, the outcome will decide whether a record judgment in a copyright infringement case holds up.

In arguments before the 9th U.S. Circuit Court of Appeals in San Francisco, Oracle will urge a three-judge panel to restore a $1.3 billion verdict against SAP that is believed to be the largest ever for violating a competitor's copyright protections. A federal judge concluded after trial that the amount was excessive, scrapping the verdict, rejecting Oracle's damages theory and setting the stage for the 9th Circuit's review.

SAP, meanwhile, will argue that the judge was correct, saying the jury relied on "inflammatory" and "prejudicial" evidence to punish the German software power for a now-defunct subsidiary's theft of Oracle business information. For SAP, winning in the 9th Circuit is about damage control, as Oracle and outspoken CEO Larry Ellison have been able to use the case to give their chief competitor a lingering public relations black eye.

Legal experts say the case is unique, so it may not establish much legal precedent in the technology sector, but the size of the stakes nevertheless continue to captivate the valley.

"There's $1 billion at risk in this case, and that's a big enough number to get anyone's attention," said Eric Goldman, a Santa Clara University law professor.

Kathleen Sullivan, the former Stanford University law school dean arguing the case for Oracle, and Gregory Lanier, SAP's lawyer, declined to comment on the case.

The Oracle v. SAP showdown has reached the appeals court in an unusual posture.

After U.S. District Judge Phyllis Hamilton set aside the original verdict, the companies agreed that SAP would pay Oracle $306 million in damages plus $120 million in legal costs to avoid a retrial. As part of the pact, Oracle was permitted to ask the 9th Circuit to restore the $1.3 billion award, or at least to get a new trial based on its theory of damages.

What is not in question is SAP's liability. Before the trial, SAP conceded that workers at its TomorrowNow subsidiary had downloaded thousands of copies of Oracle software and used them for TomorrowNow customers without paying Oracle for a license. Those accusations led SAP to plead guilty to federal criminal copyright infringement charges in 2011.

During the trial, Ellison told the jury he believed the cost of the infringement was as much as $4 billion. SAP CEO Bill McDermott also testified, apologizing for the conduct but insisting that TomorrowNow's actions had not financially harmed Oracle that much. He estimated damages at about $40 million.

At the center of the appeal is Oracle's contention that it was entitled to billions of dollars for what SAP would have paid for licensing the software; much of the $1.3 billion in the jury's verdict was attributable to that licensing calculation.

However, Hamilton concluded that Oracle would never have issued such a license to a direct competitor and stripped the Redwood City tech giant of the ability to recover damages for that licensing. Among other evidence, she cited the testimony of Oracle President Safra Catz, who told jurors it would have been "unprecedented" to license a direct competitor such as SAP.

In court papers, Oracle argues that setting the "hypothetical" worth of a license would allow competitors to escape fully paying for copyright violations. While Oracle does not admit that it would never have licensed SAP for the software, it argues that it is irrelevant, particularly given "the massive scope of SAP's infringement."

"The jury's $1.3 billion award was therefore reasonable," Oracle told the 9th Circuit. "And (Judge Hamilton) should not have substituted (her) view of that evidence for that of the jury."

SAP, meanwhile, argues that the case gives the 9th Circuit an opportunity to rein in excessive damages demands in copyright and patent feuds, as such conflicts have become increasingly common in the tech industry. The company maintains that Oracle should not be entitled to damages for a license it would never have given its "chief competitor SAP."

"There was no licensing opportunity to lose," SAP argued.

Howard Mintz covers legal affairs. Contact him at 408-286-0236 or follow him at Twitter.com/hmintz.