This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hi ppl. I have a big doubt, can anyone tell me how to find the oracle table is locked or not? and if some client is already locked the table using 'select for update' clause, what could be the solution to release the lock or to avoid lock.
I've moved your question to our Oracle forum, as it is much better suited for it than the general JDBC forum.
There are several performance and administration views that will allow you to find out details of the active locks. They are all documented here. It's a dense read, though. You might want to start with V$LOCK or DBA_LOCK (use index in that document). However, you need powerful privileges to access these views, which you probably won't be granted by a database administrator in production environments.
Also note that SELECT FOR UPDATE lock, or any other DML lock, only block writers, not readers. Consequently readers "avoid" these locks automatically and are never blocked (unlike some other databases where isolation level has to be adjusted to have readers avoid write-locks). There is no way for writers to avoid these locks.
To release the lock the transaction that holds it must be ended; if it is not ended by the process that holds it, the only other possibility I know of is to have a DBA kill the session that holds the lock.