dongniaoli1822 2013-01-18 10:23
浏览 423

ORA-08177:无法序列化此事务的访问权限 - Oracle 11g

I am using ADOdb Library for a PHP application.

This application works smoothly with Oracle 9g, but when we transferred it to a new server it often throws the following error:

ORA-08177: can't serialize access for this transaction

Is it maybe a problem with oci_8.dll I am using? Should I update it to php_oci8_11g.dll?

  • 写回答

1条回答 默认 最新

  • douwen0647 2013-01-18 10:43
    关注

    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.

    Are you setting such an isolation level + doing DML, and if so why isn't the standard read committed ok for you?

    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...

    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
    
    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大