[英]ORA-08177: can't serialize access for this transaction - Oracle 11g
I am using ADOdb Library for a PHP application. 我正在将ADOdb库用于PHP应用程序。
This application works smoothly with Oracle 9g, but when we transferred it to a new server it often throws the following error: 该应用程序可与Oracle 9g顺利运行,但是当我们将其转移到新服务器时,它通常会引发以下错误:
ORA-08177: can't serialize access for this transaction
ORA-08177:无法序列化对此事务的访问
Is it maybe a problem with oci_8.dll I am using? 我使用的oci_8.dll可能有问题吗? Should I update it to php_oci8_11g.dll?
我应该将其更新为php_oci8_11g.dll吗?
This error would occur if your isolation level was set to serializable
and you were doing DML on tables that other were also doing DML on. 如果将隔离级别设置为可
serializable
并且您正在对其他表也进行DML的表上执行DML,则会发生此错误。
Are you setting such an isolation level + doing DML, and if so why isn't the standard read committed
ok for you? 您是否设置了这样的隔离级别+执行DML,如果是,为什么标准
read committed
对您来说还行吗?
for example: 例如:
someone removes a row 有人删除一行
ANOTHER SESSION YOUR SESSION
SQL> delete from a where id = 1;
1 row deleted.
commit not done yet..meanwhile, your SERIALIZED transaction tries to remove the same row... 提交尚未完成..同时,您的SERIALIZED事务尝试删除同一行...
SQL> alter session set isolation_level=serializable;
Session altered.
SQL> delete from a where id = 1;
your session will hang at this point as the other session has the lock. 您的会话将在此时挂起,因为另一个会话已锁定。 if that other session now commits:
如果其他会话现在提交:
SQL> commit;
Commit complete.
your session hits that error: 您的会话遇到该错误:
delete from a where id = 1
*
ERROR at line 1:
ORA-08177: can't serialize access for this transaction
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.