New in Oracle 11g: wait added to lock table syntax

0
Share this on .. Tweet about this on Twitter0Share on LinkedIn0Share on Facebook0Share on Google+0Email this to someoneShare on TumblrBuffer this page

In Oracle 11g you can add a wait clause to the lock table command in which you can specify how many seconds you want to wait to get the lock on the table.

SQL> lock table t in exclusive mode wait 10;
lock table t in exclusive mode wait 10
*ERROR at line 1:ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

Elapsed: 00:00:09.95
SQL>
Share this on .. Tweet about this on Twitter0Share on LinkedIn0Share on Facebook0Share on Google+0Email this to someoneShare on TumblrBuffer this page

About Author

Oracle consultant at AMIS

Comments are closed.