How can we simulate a deadlock, rowlock, tablelock?
What are the tables it will involve?
How do we debug and take care of the issue??
thanks,
Printable View
How can we simulate a deadlock, rowlock, tablelock?
What are the tables it will involve?
How do we debug and take care of the issue??
thanks,
table lock: lock tableexclusive;
row lock: selectfor update ....;
deadlock : Have to be very bad developer.
Open 2 SQLPLUS sessions.
Table Lock :
Lock one in one session, and try to update the same table in another session.
Dead Lock:
Lock Table_A in one session
Lock Table_B in 2nd session.
Update Table_B in first session
Update Table_A is 2nd session.
Now look into alert.log file for the dead lock deduction.