ORA-24780: cannot recover a transaction while in an existing transaction
Cause: An attempt was made to commit or roll back a transaction while in a different transaction, and the transaction for which the action is requested is in a recovery state (this happens if it is idle too long).
Action: Detach from the current transaction and retry the operation.
ORA-24780错误是由一个应用程序在处于已存在事务中时试图恢复另一事务而导致的。这会导致当前事务失败,因为系统不支持嵌套的事务。
ORA-24780的官方解释是:无法在存在事务中恢复另一个事务。
一个常见的案例是,在当前事务处于活跃状态时,应用程序会尝试恢复另外一个事务,这就引起了ORA-24780错误。
要解决ORA-24780错误,需要先关闭当前事务,然后重新尝试恢复另外一个事务。此外,还应该检查代码,以确定应用程序是如何管理事务的,以避免此类错误的发生。