我正在为 PHP 应用程序使用 ADOdb 库。
此应用程序在 Oracle 9g 上运行顺畅,但当我们将其转移到新服务器时,它经常抛出以下错误:
ORA-08177: can't serialize access for this transaction
我使用的 oci_8.dll 可能有问题吗?我应该将其更新为 php_oci8_11g.dll 吗?
最佳答案
如果您的隔离级别设置为 serializable
并且您正在对其他也在执行 DML 的表执行 DML,则会发生此错误。
您是否设置了这样的隔离级别 + 执行 DML,如果是这样,为什么标准 read committed
不适合您?
例如:
有人删除了一行
ANOTHER SESSION YOUR SESSION
SQL> delete from a where id = 1;
1 row deleted.
提交尚未完成..与此同时,您的 SERIALIZED 事务试图删除同一行...
SQL> alter session set isolation_level=serializable;
Session altered.
SQL> delete from a where id = 1;
此时您的 session 将挂起,因为另一个 session 已锁定。 如果另一个 session 现在提交:
SQL> commit;
Commit complete.
您的 session 遇到该错误:
delete from a where id = 1
*
ERROR at line 1:
ORA-08177: can't serialize access for this transaction
关于php - ORA-08177 : can't serialize access for this transaction - Oracle 11g,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14396820/