Link to home
Start Free TrialLog in
Avatar of Rao_S
Rao_S

asked on

How to solve problem with ora-00060 on select for update? is there a default wait time?

thread 1 is a normal updat but we dont want to commit,
thread 2 ia select for update.. which fails..
thread 3 is a normal update which we commit
should we say select for update wait? what is the default time?
thread1 executes at 14:38.. thread 2 fails at 14:39...
within java ...
SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rao_S
Rao_S

ASKER

thanks!
the NOWAIT worked correctly and were able to find the issue. the thread 2 was locking a whole set of rows, so changed the code -  select ...for update to select only one row by sequence number..
glad we could help,

as stated,  deadlock fix is always a code change

whether by nowait to simply eliminate one of the waits, or by reducing number of locks held or, as in your case both.