JDAPI Error: ORA-04020: deadlock detected while trying to lock object

I have written a JDAPI program to perform read-only impact analysis and report any problems.
The following error is occurring:
"A deadlock among DDL and parse locks is detected.
This deadlock is usually due to user errors in the design of an application or from issuing a set of concurrent statements which can cause a deadlock.
ORA-04020: deadlock detected while trying to lock object /NSPC6/CHECK_FOR_FORM_CHANGE"
The error refers to a procedure in a PL/SQL library.
In one case the error occurred after my final "end of processing" message, which is followed only by a call to "Jdapi.shutdown()".
Any ideas?
Thanks,
Neville Sweet.

I have written a JDAPI program to perform read-only impact analysis and report any problems.
The following error is occurring:
"A deadlock among DDL and parse locks is detected.
This deadlock is usually due to user errors in the design of an application or from issuing a set of concurrent statements which can cause a deadlock.
ORA-04020: deadlock detected while trying to lock object /NSPC6/CHECK_FOR_FORM_CHANGE"
The error refers to a procedure in a PL/SQL library.
In one case the error occurred after my final "end of processing" message, which is followed only by a call to "Jdapi.shutdown()".
Any ideas?
Thanks,
Neville Sweet.

Similar Messages

  • ORA-04020: deadlock detected while trying to lock object SYS

    Upgrading database from 7.3.3 to 7.3.4. Running CAT7304.sql,
    Catalog.sql, and Catproc.sql. In the log file created there are
    mulptiple occurrences of;
    ORA-04045: errors during recompilation/revalidation of
    SYS.DBMS_SYS_SQL
    ORA-04045: errors during recompilation/revalidation of
    SYS.DBMS_SQL
    ORA-04020: deadlock detected while trying to lock object
    SYS.DBMS_SYS_SQL
    This only occurs on a Netware server, it works fine on NT.
    null

    Hi Steve,
    I recommend that you contact Oracle RDBMS support directly.Our
    main area of expertise is migrations from non-oracle
    environments.
    Regards
    John
    Steve Schindler (guest) wrote:
    : Upgrading database from 7.3.3 to 7.3.4. Running CAT7304.sql,
    : Catalog.sql, and Catproc.sql. In the log file created there are
    : mulptiple occurrences of;
    : ORA-04045: errors during recompilation/revalidation of
    : SYS.DBMS_SYS_SQL
    : ORA-04045: errors during recompilation/revalidation of
    : SYS.DBMS_SQL
    : ORA-04020: deadlock detected while trying to lock object
    : SYS.DBMS_SYS_SQL
    : This only occurs on a Netware server, it works fine on NT.
    Oracle Technology Network
    http://technet.oracle.com
    null

  • ORA-04020: deadlock detected while trying to lock object

    I was wondering if somebody could give me some advise on how to fix this problem.
    I have a table that I use for my full text search functionality in my web app.
    In this table I have an id and 1 clob column indexed using the intermedia.
    I have a stored procedure that does the populating and reindexing of this table and this should be run under dbms_jobs.
    What this procedure basically does is it concatenates the values of different textual columns in my schema and I stick it in in this clob column using the dbms_lob.writeappend, I have a loop that does this, and at the very end of the stored procedure I call a reindex of this clob column. This error occurs when it hits this reindex line. If I run the reindex outside of the stored procedure then it works fine. I need to put this functionality in 1 stored procedure so I could easily run it periodically using the dbms_jobs.
    This is the skeleton of my stored procedure: (Oracle version is 8.1.7.0.0.)
    procedure rebuild_my_intermedia_column is
    --cursor declaration here
    cursor outercursorvar is select ...
    cursor innercursorvar is select ...
    --variable declaration here
    vstr varchar2(32727);
    vclob clob;
    vlen1 binary_integer;
    vlen2 binary_integer;
    begin
    for v1 in outercursorvar loop
    vstr := ' ';
    vlen1 := 1;
    select intermedia_column into vclob from intermedia_table where pkid = v1.id FOR UPDATE;
    for v2 in innercursorvar loop
    if v2.textualcolumn is not null then
    vlen2 := length(v2.textualcolumn);
    if vlen1 + vlen2 > 32727 then
    dbms_lob.writeappend(vclob, vlen1, vstr);
    vstr := ' ';
    vlen1 := 1;
    end if;
    vstr := vstr | | v2.textualcolumn;
    vlen1 := vlen1 + vlen2;
    end if;
    ...more columns here
    end loop;
    if vlen1 > 1 then
    dbms_lob.writeappend(vclob, vlen1, vstr);
    end if;
    commit;
    end loop;
    --This is where the dealock error comes!.
    execute immediate 'alter index clobcolindexname rebuild parameters(''SYNC'')';
    end;
    I would appreciate your help on this.

    FYI. The alter index interface for SYNC and OPTIMIZE is no longer supported in 9i. We have discouraged the use of alter index for SYNC and OPTIMIZE since the PL/SQL
    interface for these was added in 8.1.6. Failures during sync or optimize can invalidate the index when using the alter index interface, forcing a complete index
    rebuild. The PL/SQL API does not carry this risk.
    For re-indexing we are recommending to use CTX_DDL.SYNC_INDEX called from a DBMS_JOB. Please take a look at the ctx_schedule utility at: http://technet.oracle.com/sample_code/products/text/content.htm

  • Database error"ORA-00060: deadlock detected while waiting for resource"

    Hi All,
    I got dump as
    Database error text........: "ORA-00060: deadlock detected while waiting for
      resource"
    Internal call code.........: "[RSQL/RDUP/NRIV ]"
    Please check the entries in the system log (Transaction SM21).
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
    in
    procedure "READ_NRIV" "(FORM)", nor was it propagated by a RAISING clause.
    Can u ppl tell me how to get correct this?
    Edited by: Bala Chandar on Jul 20, 2009 11:01 AM

    Hi Bala,
    Same type of dump we got when we trigger the DTP which in process chain to load data from DSO to Info cube. And the load had processed with 225 data package and at 164th data package we got this error and except 164th data package all data package processed successfully
    And the request was red. So we had done processed manually by clicking the icon. So all its been green and successfully loaded.
    So when you do process manual the particular data package which got failed will be process successfully  

  • Sqlldr- ORA-00060: deadlock detected while waiting for resource

    Hi Team,
    My database version is 11.1.0.7.0. I am loading the data using sqlldr. I am getting the error ORA-00060: deadlock detected while waiting for resource. once dead lock detected ,whether data will be rejected after commit point reached(Rows=100000). FYI information only sqllder is running on the database,it is getting completed withing 5-10min. please help me whether any other lock happening on this due to sqllder.
    sqlldr userid=orcl/orcle control=".$controlfile." log=".$logfile.".log data=".$datafile." bad=".$badfile." discard=".$discardfile." Bindsize=19000000 Rows=100000 Readsize=20000000 Errors=1000000";
    Thanks in advance

    user9256814 wrote:
    Hi Team,
    My database version is 11.1.0.7.0. I am loading the data using sqlldr. I am getting the error ORA-00060: deadlock detected while waiting for resource. once dead lock detected ,whether data will be rejected after commit point reached(Rows=100000). FYI information only sqllder is running on the database,it is getting completed withing 5-10min. please help me whether any other lock happening on this due to sqllder.
    sqlldr userid=orcl/orcle control=".$controlfile." log=".$logfile.".log data=".$datafile." bad=".$badfile." discard=".$discardfile." Bindsize=19000000 Rows=100000 Readsize=20000000 Errors=1000000";
    Thanks in advanceadditional clues will exist within alert_SID.ora file & subsequent trace file.

  • ORA-00060: deadlock detected while waiting for resource with Tbs Read-only

    Hi all,
    We're using Oracle 10.2.0.1 and 9.2.0.4.
    I'm testing the performing of a procedure that inserts, like this:
    CREATE OR REPLACE PROCEDURE P$TAD_TEST
    IS
    TYPE T_T1_C1          IS TABLE OF T1.C1%TYPE INDEX BY PLS_INTEGER;
    TYPE T_T1_DT           IS TABLE OF T1.DT%TYPE INDEX BY PLS_INTEGER;
    P_C1 T_T1_C1;
    P_DT T_T1_DT;
    P_RESULT NUMBER;
    BEGIN
    FOR j IN 1..4032 LOOP
    P_C1(j) := j;
    P_DT(j) := SYSDATE + (j/24/60);
    END LOOP;
    FORALL i IN P_C1.FIRST..P_C1.LAST SAVE EXCEPTIONS
    INSERT INTO T1 VALUES (P_C1(i), P_DT(i));
    EXCEPTION
    WHEN OTHERS THEN
    P_RESULT := SQLCODE;
    END;
    The table T1 is partitioned across 10 tablespaces. The test consist to take
    these tablespace read-only and perform the procedure, and analyze the results,
    like erros.
    but when I perform the procedure, The alert.log indicates the error
    ORA-00060: deadlock detected while waiting for resource.
    Why this occurs only the tablespaces are read-only?
    thank you!!!!

    Hi,
    yesterday we got this error again(in fact twice) and we were able to get the trace file. It says this is NOT oracle error. i was wrong in suspecting Oracle. This is the trace file details. i dont know how to debug this. Any help appreciated.
    *** 2010-06-15 16:24:29.243
    *** ACTION NAME:() 2010-06-15 16:24:29.231
    *** MODULE NAME:(JDBC Thin Client) 2010-06-15 16:24:29.231
    *** SERVICE NAME: 2010-06-15 16:24:29.231
    *** SESSION ID:(482.4266) 2010-06-15 16:24:29.231
    DEADLOCK DETECTED ( ORA-00060 )
    [Transaction Deadlock]
    The following deadlock is not an ORACLE error. It is a
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-00300021-0000b52d 209 482 X 247 474 S
    TX-002a0009-00011b24 247 474 X 209 482 S
    session 482: DID 0001-00D1-0000000A session 474: DID 0001-00F7-00000008
    session 474: DID 0001-00F7-00000008 session 482: DID 0001-00D1-0000000A
    Rows waited on:
    Session 474: obj - rowid = 0000CED4 - AAAM7UAAxAAAVgSAAA
    (dictionary objn - 52948, file - 49, block - 88082, slot - 0)
    Session 482: obj - rowid = 0000D8BF - AAANi/AAuAAB+z/AAA
    (dictionary objn - 55487, file - 46, block - 519423, slot - 0)
    Information on the OTHER waiting sessions:
    Session 474:
    pid=247 serial=31796 audsid=25502259 user: 62/USER
    O/S info: ....
    program: JDBC Thin Client
    application name: JDBC Thin Client, hash value=2546894660
    Current SQL Statement:
    INSERT QUERY1
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    INSERT QUERY2
    Thanks,
    AK

  • Patch 9239090 - ORA-04021: timeout occurred while waiting to lock object

    Hello Guys,
    I need help urgently to comlete an upgrade of ebs 12.1.1 to 12.1.3.
    We are upgrading ebs 11i to 12i going live this weekend. We have encountered "ORA-04021: timeout occurred while waiting to lock object" on patch 9239090 with two Workers:
    In adctrl:
    1 Run AutoPatch R120 AFUTLGRS.pls FAILED
    2 Run AutoPatch R120 AFUTLOGS.pls FAILED
    sqlplus -s APPS/***** @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
    Connected.
    create or replace package wf_bes_cleanup AUTHID CURRENT_USER as
    ERROR at line 1:
    ORA-04021: timeout occurred while waiting to lock object
    I have done everything everything imaginable but cannot get pass these 2 failed workers.
    1) I have checked are there are no locks blocking on any objects:
    select s1.username || '@' || s1.machine
    || ' ( SID=' || s1.sid || ' ) is blocking '
    || s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status
    from v$lock l1, v$session s1, v$lock l2, v$session s2
    where s1.sid=l1.sid and s2.sid=l2.sid
    and l1.BLOCK=1 and l2.request > 0
    and l1.id1 = l2.id1
    and l2.id2 = l2.id2 ;
    2) I also checked and there is space in the database.
    3) From adctrl, I have tried restarting the jobs one by one but the worker 1 hangs at and eventually fails on several (12) attempts.
    4) The solution on Doc ID 1291064.1 is not the problem:
    SQL> select SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI, FORCE_LOGGING
    from v$database;
    SUPPLEME SUP SUP FOR
    NO NO NO NO
    5) Manual execution still gave ORA-04021:
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p002invok.sql
    6) The alert log has no related errors
    7) I Finally, after over 6 hours of waiting, I could only get the patch to continue after by using adctrl option 8 to skip these two workers.
    After proceeding, I have yet hit two more errors and now stuck:
    I have hit another error with the same patch:
    create or replace package body FND_LOG as
    /* $Header: AFUTLOGB.pls 120 ...
    AD Worker error:
    ORA-04021: timeout occurred while waiting to lock object
    Unable to process file in PACKAGE mode.
    Not converting file for Invoker's Rights because it appears to be a package body creation script (based on the filename).
    File is: /u02/applfinp/apps/apps_st/appl/fnd/12.0.0/patch/115/sql/AFUTLOGB.pls
    AD Worker warning:
    Product Data File
       /u02/applfinp/apps/apps_st/appl/admin/xniprod.txt
       does not exist for product "xni".
      This product is registered in the database but the above file does not exist in APPL_TOP.  The product will be ignored without error
    AD Worker error:
    The following ORACLE error:
    ORA-04063: package body "APPS.FND_LOG" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "APPS.FND_LOG"
    ORA-06512: at "APPS.FND_FUNCTION", line 834
    ORA-06512: at "APPS.FND_MENU_ENTRIES_C_DELTRG", line 4
    ORA-04088: error during execution of trigger 'APPS.FND_MENU_ENTRIES_C_DELTRG'
    Can I stop and restart this patch 9239090?

    Hello,
    I later executed the failed jobs or scripts manually (successfully) for the patch to continue
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p002invok.sql
    The patch ended with the following :
    The following Oracle Reports objects did not generate successfully:
    ap reports/US APXARATE.rdf
    ar reports/US ARXCTA.rdf
    fa reports/US FASRSVED.rdf
    ont reports/US OEXOEORD.rdf
    pa reports/US PAXACMPT.rdf
    pa reports/US PAXALRUN.rdf
    pa reports/US PAXACRPT.rdf
    pa reports/US PAXCPGAL.rdf
    pa reports/US PAXPCRFD.rdf
    The patch execution ended but the patch number is not record in apps.ad_bugs table:
    select TO_CHAR(CREATION_DATE,'dd-Mon-yyyy, hh24:mm:ss'), BUG_NUMBER from apps.ad_bugs where bug_number in ('9239090');
    no rows selected
    JFI
    Patches located in ad_applied_patches to which there is no a corresponding record in ad_bugs:
    SQL> SELECT a.patch_name, TO_CHAR(max(a.last_update_date),'dd-Mon-yyyy, hh24:mm:ss')
    2 FROM applsys.ad_applied_patches a
    3 WHERE NOT EXISTS (SELECT '1'
    4 FROM ad_bugs b
    5 WHERE b.bug_number = a.patch_name)
    6 group by a.patch_name;
    PATCH_NAME TO_CHAR(MAX(A.LAST_UP
    9239090 26-Oct-2013, 00:10:27
    AutoConfig 25-Oct-2013, 17:10:51
    merger9179588 25-Oct-2013, 11:10:30
    merger_post_5903765 27-Apr-2013, 23:04:45
    mergeu6678700 25-Oct-2013, 16:10:09
    What could have happened that this was not recorded in ad_bugs?
    How to I get this recorded in the ad_bugs table?
    Thanks
    Mathias

  • Ora-04021: timeout occured while waiting to lock object.

    I have upgraded the DB From 8.1.5 to 8.1.7 then 9.0.2
    but while converting to 9i it gave a warning that
    "some uncompiled objects were found".
    now the DB works fine with every DDL and DML operation but when I edit any precedure or function it hangs for 4 to 5 mins and then show the following error
    ora-04021: timeout occured while waiting to lock object.
    when I shutdown the DB and restarts it then it allowes me to edit any founction or procedure or package only for one time,then again shows the error when I try to edit second time.
    what my be the reason , can any body help me pl.
    thankx in advance.

    If you have oracle metalink support, then, read Note:169139.1. If not, give me your email id, i will send you the note.
    SJH

  • ORA-00060: deadlock detected while adding a datafile

    Hello all,
    I found a strange error today.
    We were trying add datafile to our existing tablespace as usually but suddenly caught in a problem.
    SQL> alter tablespace erp_dat2 add datafile '/hotdata2/irsdata/erp_dat2irs_145.dbf' size 2000M;
    alter tablespace erp_dat2 add datafile '/hotdata2/irsdata/erp_dat2irs_145.dbf' size 2000M
    ERROR at line 1:
    ORA-00060: deadlock detected while waiting for resourcelooks very strange.Searched on google but not found something useful.Still searching.No trace file is generated as such.
    Any ideas will be appreciated. Is it related to any batch job running?
    OS : SunOS 5.10 Generic_142900-13 sun4u sparc SUNW,Sun-Fire (64-bit)
    RDBMS : 11.1.0.7
    Regards!
    Edited by: Nitin Joshi on Sep 30, 2010 3:41 PM
    Changed subject line

    seems like you're hitting a bug in 11.1.0.7
    Bug 8332021 - Cannot add a datafiles when sessions reporting ORA-1653 [ID 8332021.8]
    ORA-60 can occur during datafile addition when concurrent sessions
    are reporting ORA-1653 .>>Workaround:
    >> Stop the sessions getting the errors then add the datafile.

  • ORA-00060: deadlock detected while waiting for resource CLOSE cursor

    Hi,
    I am a new member of this forum. I am working with a problem we got a few weeks ago. It is from a Pro C batch executable running on 10 threads dealing with >800 data accessed from multiple tables. The error as reported came from a package.function call.
    This is the error I encountered:
    process_item~G****, D***~-60~ORA-00060: deadlock detected while waiting for resource~PACKAGE ERROR = CLOSE cursor C_***** in package R***.I*** 7641
    The cursor is a simple SELECT cursor without Table or Record locking.
    My questions are:
    *Upon the occurrence of this error, is the execution already at the CLOSE cursor line or did the error occurred between the OPEN cursor and the CLOSE cursor? There are several lines of code in between OPEN and CLOSE:
    - one that calls for a package.function that simply stores parameter values to a variable
    - another one which fetches the cursor. The group that holds the cursor values is only used by a single function in the package
    *Is it possible for this CLOSE cursor to cause a deadlock? What could have caused this?
    *From what I know, Oracle deals with deadlocks by aborting the deadlocking process while others continue, but this deadlock caused our program to hang. How is this possible? Could the root cause of the deadlock be from our threading program? This is a rare occurrence and happened only twice this year.
    Thanks,
    Raf

    Raf Serrano wrote:
    Hi,
    I am a new member of this forum. I am working with a problem we got a few weeks ago. It is from a Pro C batch executable running on 10 threads dealing with >800 data accessed from multiple tables. The error as reported came from a package.function call.
    This is the error I encountered:
    process_item~G****, D***~-60~ORA-00060: deadlock detected while waiting for resource~PACKAGE ERROR = CLOSE cursor C_***** in package R***.I*** 7641
    The cursor is a simple SELECT cursor without Table or Record locking.
    My questions are:
    *Upon the occurrence of this error, is the execution already at the CLOSE cursor line or did the error occurred between the OPEN cursor and the CLOSE cursor? There are several lines of code in between OPEN and CLOSE:
    - one that calls for a package.function that simply stores parameter values to a variable
    - another one which fetches the cursor. The group that holds the cursor values is only used by a single function in the package
    *Is it possible for this CLOSE cursor to cause a deadlock? What could have caused this?
    *From what I know, Oracle deals with deadlocks by aborting the deadlocking process while others continue, but this deadlock caused our program to hang. How is this possible? Could the root cause of the deadlock be from our threading program? This is a rare occurrence and happened only twice this year.
    Thanks,
    RafSELECT (without FOR UPDATE) statements are never involved in ORA-00060.
    only DML statements throw ORA-00060 error

  • Caused by: java.sql.SQLException: ORA-00060: deadlock detected while waitin

    Hi,
    I'm getting following exception:
    Caused by: net.sf.hibernate.exception.GenericJDBCException: could not update: [com.sample.database.hibernate.mappings.reference.impl.TaskImpl#156979998]
         at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90)
         at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:79)
         at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:30)
         at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1332)
         at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:683)
         at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:623)
         at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52)
         at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2438)
         at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
         at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2260)
         at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
         at com.sample.database.hibernate.util.HibernateUtil.doSessionWork(HibernateUtil.java:83)
         ... 8 more
    Caused by: java.sql.SQLException: ORA-00060: deadlock detected while waiting for resource
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:158)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:685)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1138)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3018)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3090)
         at com.mchange.v2.sql.filter.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:71)
         at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:666)
         ... 15 more
    what could be the reason??
    thanks.

    The error is coming from an application. Please check the alert log file of the database and further there will be a trace file mentioned in the alert log file in which you will have information of the object which is causing deadlock.
    Regards

  • Ora-04021 timeout occurred while waiting to lock object

    Hai All
    When adding a column into a table then an error comes error
    Error Message:
    ORA-04021: timeout occurred while waiting to lock object .....
    How it happens ...what is the solution....please help
    Shiju..

    Hi
    Identify the session that is using this object, kill it and then perform the ALTER table... or wait until the session that is accessing this table release it.
    Rgds
    Adnan

  • ORA-00060 "deadlock detected while waiting for resource"

    Hello.
    I am having an oracle deadlock when calling a stored procedure (wich updates several records in several tables) from several threads: ORA-00060 error. The error does not happen very often but from time to time, normally the calls to this proceudre end ok.
    Each call starts and ends a transaction. (When the oracle error raises the transaction where it raises is rolled back) and the other transactions can go on.
    I don't how to avoid it. Should it be solved at the stored procedure level or could it be solved at java level by doing the call to the stored procedure to be synchronized?
    Thanks in advance.

    Fernando_Sanchez wrote:
    Hello.
    I am having an oracle deadlock when calling a stored procedure (wich updates several records in several tables) from several threads: ORA-00060 error. The error does not happen very often but from time to time, normally the calls to this proceudre end ok.Which doesn't really sound good.
    If you have a java thread then to do JDBC, regardless of what type, you get a new connection and new statements in each one.
    If you are not doing that then that is a problem.
    If you are doing that then the thread information is irrelevant at the java level.
    You can of course do all sorts of interesting things with locks and transactions in Oracle and via stored procs but other ways as well. And if you are not careful it will cause problems.

  • Getting ORA-00060: deadlock detected while waiting for resource

    We have an Informatica Mapping, SIL_Ordertiem_Fac that has 7 targets tables, 2 of which are Oracle partitioned tables. It also has 30 targets,one which is the OrderItem Staging table is an Oracle partitioned table. The Workflow that calls this has 8 sessions tasks , one for each of the partitioned staging table. We are encountering this error of deadlocks. We have enabled in each session the following "Session retry on deadlock" and we have also set the informatica integration service - NumOfDeadlockRetries:100000 and DeadlockSleep:1. Is there any other parameters that we need to set. How can we see how many deadlocks are happening in this workllow.
    Thanks,
    Gary

    Are you running FULL or INCREMENTAL for this task? If you are running full, try to change the target property to Normal instead of bulk. This may help in certain cases. Otherwise, can you consider making the Sessions or tasks sequential so that they do not execute in parallel? Simplest case, have to tried to kill all sessions and rerun the ETL? Also, depending on the DB version there are DB level parameters such as DML_LOCKS etc. Check with your DBA and ensure that there is no DB side setting you can edit.
    If helpful, please mark as correct or helpful.

  • ORA-00060: deadlock detected while waiting for resource ON INSERT

    I am running into a deadlock while INSERTING records into a table. This seems strange to me. I've tracked it down to the following, and it feels like an Oracle bug to me, so I wanted to get another opinion:
    I have a procedure that inserts records into a table.
    That table has a Before INSERT OR UPDATE OR DELETE FOR EACH ROW trigger on it.
    The trigger has an IF UPDATING section in it; this section updates records in other tables related to this table.
    I have confirmed that the IF UPDATING section is not firing (which makes sense because I am inserting, but since I was getting a deadlock, it seemed to make sense that somehow the updating section was firing).
    Here's the part that makes this feel buggy:
    I have been able to reproduce the deadlock pretty much on command.
    I commented out the IF UPDATING section of the trigger, compiled the trigger, and then put the IF UPDATING section of the trigger back in, and compiled it. Note there was no net code change.
    I ran my procedure that inserts records and experienced NO DEADLOCK.
    However, if I compile the original version of the trigger (before I commented code out and put it back in), the deadlock reappears. To make the deadlock go away, I have to re-comment out the code, compile, put the code back, and compile again.
    I know this sounds crazy. I'm running Oracle Database 11g Release 11.2.0.2.0.
    Has anyone ever seen something like this before?

    MPL wrote:
    Thanks - there are no autonomous transactions being run. Here's the deadlock graph:
    ---------Blocker(s)--------  ---------Waiter(s)---------
    Resource Name          process session holds waits  process session holds waits
    TX-00220006-0000a762        71     207     X             70      46           S
    TX-00200020-000072ee        70      46     X             71     207           S
    session 207: DID 0001-0047-00000016     session 46: DID 0001-0046-00000021
    session 46: DID 0001-0046-00000021      session 207: DID 0001-0047-00000016
    Rows waited on:
    Session 207: obj - rowid = 00000000 - D/////AACAAAMS9AAA
    (dictionary objn - 0, file - 2, block - 50365, slot - 0)
    Session 46: obj - rowid = 0000ADF7 - AAAsJmAASAAAXYGAAA
    (dictionary objn - 44535, file - 18, block - 95750, slot - 0)
    There are various anomalies that can cause the TX locks waiting in S mode - many of them to do with indexes or unique constraints. Your rowid information may be misleading - but it's worth checking which object has object_id 44535. (I'm always inclined to assume that any reference to slot 0 is suspect, and objn 0 is clearly not a real object.)
    The trace file should be reporting the SQL that the two sessions are waiting on - does that give you any clues.
    Regards
    Jonathan Lewis

Maybe you are looking for