Fwd: Re: How to find the locking "event"

From: solutions.axone <solutions.axone_at_videotron.ca>
Date: Wed, 24 Oct 2018 06:12:14 -0400
Message-ID: <1f3d5ddae00de81e472c0d04ce4107ed_at_smtp.videotron.ca>


Sent from my Samsung Galaxy smartphone.
-------- Original message --------From: Dominic Brooks <dombrooks_at_hotmail.com> Date: 2018-10-23 2:47 PM (GMT-05:00) To: lyallbarbour_at_sanfranmail.com Cc: oracle-l <oracle-l_at_freelists.org> Subject: Re: How to find the locking "event"

There is no fool proof way unless you happen to have been tracing the session from before it too the lock but you can get lucky. Think this is still an accurate statement.

https://jonathanlewis.wordpress.com/2009/04/19/locking-sql/

Sent from my iPhone

On 23 Oct 2018, at 17:38, Lyall Barbour <lyallbarbour_at_sanfranmail.com> wrote:

Hello,
  Debugging Off-the-shelf applications.  Best part of my job...  
Oracle 12.1.0.2 - Multitenant 
SLES 11 SP4

 
  I have found that an INSERT is having to wait a ton on TX: Row Lock Contention from an intense Document Management application bought, installed and configured about a year and a half ago - Open Text.
  Here's my lock/block query that's been the most useful to this point:
 

SELECT o.object_name, t.start_time, sysdate, s.sid, s.status

   , s.machine, s.sql_id

   , to_char(s.logon_time,'DD/MON/YY HH24:MI:SS') logon_time

FROM v$transaction t, v$session s, v$locked_object l, dba_objects o, dba_blockers b

WHERE s.saddr = t.ses_addr

and s.sid = l.session_id

and l.object_id = o.object_id

and s.sid = b.holding_session

ORDER BY start_time;
 
the results of the query find that one blocking session has an open Transaction for about 15 to 30 seconds, with locks on 15 tables.   Other sessions are waiting to insert into one of those tables and really bogging down the system.  
How do i find the syntax/code that the blocking session ran to lock those 15 objects, in the first place?  
OBJECT_NAME                    START_TIME           SYSDATE                      SID STATUS   MACHINE                                                          SQL_ID        LOGON_TIME                 

  • -------------------- --------------------- ---------- -------- ---------------------------------------------------------------- ------------- ---------------------------

DTREEACL                       10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

DTREECORE                      10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

LLATTRDATA                     10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

LLATTRBLOBDATA                 10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

DTREEMULTILINGUAL              10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

DSUGGESTWORDSPENDING           10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

NOTIFYEVENTS                   10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

WEBNODESMETA_EN_US             10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

DBROWSEANCESTORSCORE           10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

DTREEANCESTORS                 10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

DFACET_OWNER                   10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

DFACET_OBJECTTYPE              10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

DFACET_MODIFYDATE              10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

DFACET_ATTR_2V4D_R             10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25         

DTREENOTIFY                    10/23/18 11:34:56    23-OCT-18 11.35.23 AM        668 INACTIVE NGIC\xxxxxxxxxxx                                                  fppmu8hcw3y1d 18/OCT/18 22:41:25  
TIA
 
Lyall Barbour

--

http://www.freelists.org/webpage/oracle-l Received on Wed Oct 24 2018 - 12:12:14 CEST

Original text of this message