{"id":178,"date":"2024-02-29T10:33:25","date_gmt":"2024-02-29T08:33:25","guid":{"rendered":"http:\/\/130.61.57.200\/?p=178"},"modified":"2024-02-29T10:33:25","modified_gmt":"2024-02-29T08:33:25","slug":"resolve-locking-situation","status":"publish","type":"post","link":"http:\/\/130.61.57.200\/index.php\/2024\/02\/29\/resolve-locking-situation\/","title":{"rendered":"Resolve locking situation"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A blocking lock is when a resource is locked from one session, and another session needs to acquire a new non compatible lock on the same resource. Find the locking resources with the following statement:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>SELECT a.sid||decode(request,0,&#039;(holder)&#039;,&#039;(waiter)&#039;||&#039;:blocked by:&#039;||blocking_session) sess_id ,&lt;br&gt;lmode,&lt;br&gt;request,&lt;br&gt;a.type,&lt;br&gt;c.object_name,&lt;br&gt;decode(row_wait_obj#,-1,&#039;Holder of Lock !!!&#039;,&lt;br&gt;dbms_rowid.rowid_create(1,row_wait_obj#,row_wait_file#,row_wait_block#,row_wait_row#)) row_id,&lt;br&gt;nvl(SQL_FULLTEXT,&#039;Holder of Lock !!!&#039;)&lt;br&gt;FROM V$LOCK A, V$LOCKED_OBJECT B, ALL_OBJECTS C, V$SESSION D, V$SQL E&lt;br&gt;WHERE (id1, id2, a.type) in (select id1, id2, type from v$lock where request&gt;0)&lt;br&gt;AND a.sid = b.session_id&lt;br&gt;AND b.object_id = c.object_id&lt;br&gt;AND d.sid = a.sid&lt;br&gt;AND d.sql_hash_value = e.hash_value(+);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then you can find the row with the following:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>select * from &lt;object name&gt; where rowid = &lt;rowid&gt;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A blocking lock is when a resource is locked from one session, and another session needs to acquire a new non compatible lock on the same resource. Find the locking resources with the following statement: SELECT a.sid||decode(request,0,&#039;(holder)&#039;,&#039;(waiter)&#039;||&#039;:blocked by:&#039;||blocking_session) sess_id ,&lt;br&gt;lmode,&lt;br&gt;request,&lt;br&gt;a.type,&lt;br&gt;c.object_name,&lt;br&gt;decode(row_wait_obj#,-1,&#039;Holder of Lock !!!&#039;,&lt;br&gt;dbms_rowid.rowid_create(1,row_wait_obj#,row_wait_file#,row_wait_block#,row_wait_row#)) row_id,&lt;br&gt;nvl(SQL_FULLTEXT,&#039;Holder of Lock !!!&#039;)&lt;br&gt;FROM V$LOCK A, V$LOCKED_OBJECT B, ALL_OBJECTS C, V$SESSION D, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":106,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[60],"class_list":["post-178","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle","tag-locks"],"blocksy_meta":[],"_links":{"self":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":1,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":179,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/178\/revisions\/179"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/media\/106"}],"wp:attachment":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}