on 10-26-2006 8:04 AM
I have one method where I will delete record(s) in number of tables in single connection using a ExecuteBatch method. I will delete all the records table by table where the main table will be the last one in the list (to delete the children first then the parent record).
Sometimes, in production environment where there are huge no. of transactions going on at the same time, I might hit an Oracle Deadlock error when the code reaches the part to delete a record in the main table.
Is there any suggestion on how could I avoid this Oracle Deadlock error?
You can not completely eliminate the possibility of a deadlock. You can however retry the operation when your oracle database rolls back the transaction. Oracle has mechanisms to detect deadlocks, and if detected it rolls back one of the two transactions. If you can catch the rollback you can retry the operation.
regards,
Dion
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.