Reputation: 1895
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?
Upvotes: 3
Views: 8683
Reputation: 21973
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
Upvotes: 6