Thursday, May 26, 2011

How do you whether table is locked or not?

Just run the following query on the table.

Lock Table DBNAME.TABLENAME write nowait
Select * from DBNAME.TABLENAME;


If this table is locked currently then , then the above statement would fail as Nowait will not wait for locks to be released on that  table .


1 comment:

  1. should be exclusive nowait....write lock will be granted though there is access lock on a object.

    ReplyDelete