Selecting a record for update that is already locked causes the current session to hang indefinitely until the lock is released. If this situation is unacceptable the NOWAIT keyword can be used to instantly return an error if the record is locked. Oracle 9i, feature allows us to specify maximum time before it shoots error message. This also reduces the change of indefinite locking.
Example:
Select * from emp where eno=1235 for update wait 15;
Wednesday, July 18, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment