<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Database Deadlock occurred in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500876#M1654008</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I'm using FUNCTION 'IDOC_WRITE_AND_START_INBOUND' in a job (it will update the MDVM), sometimes this job failed with the folowing error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Deadlock occurred&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Database error 60 at UPD access to table MDVM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;gt; ORA-00060: deadlock detected while waiting for resource&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Run-time error "DBIF_RSQL_SQL_ERROR" occurred&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to know that whether it is a Database or ABAP issue? and how to solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some code is as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;...... 
CALL FUNCTION 'IDOC_WRITE_AND_START_INBOUND'
 
      EXPORTING
 
        i_edidc        = lwa_idoc_control
 
        do_commit      = c_x
 
      IMPORTING
 
        docnum         = lwa_idoc_control-docnum
 
      TABLES
 
        i_edidd        = lt_edidd
 
      EXCEPTIONS
 
        idoc_not_saved = 1
 
        OTHERS         = 2.
 
    IF sy-subrc  0.
 
*     record the error
 
*    text-e10 =  Error occurs when calling u201CIDOC_WRITE_AND_START_INBOUND"
 
      &amp;lt;fs_idoc_info&amp;gt;-remark = text-e10.
 
      APPEND &amp;lt;fs_idoc_info&amp;gt; TO gt_idoc_err.
 
      g_error = c_x.
 
    ELSE.
 
      COMMIT WORK AND WAIT.
 
*     IDOC Number
 
      &amp;lt;fs_idoc_info&amp;gt;-idoc_num = lwa_idoc_control-docnum.
 
*     Status.
 
      SELECT SINGLE status FROM edidc INTO &amp;lt;fs_idoc_info&amp;gt;-
 
idoc_status
 
                         WHERE docnum = lwa_idoc_control-
 
docnum.
......&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Feb 2012 05:54:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-14T05:54:48Z</dc:date>
    <item>
      <title>Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500876#M1654008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I'm using FUNCTION 'IDOC_WRITE_AND_START_INBOUND' in a job (it will update the MDVM), sometimes this job failed with the folowing error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Deadlock occurred&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Database error 60 at UPD access to table MDVM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;gt; ORA-00060: deadlock detected while waiting for resource&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Run-time error "DBIF_RSQL_SQL_ERROR" occurred&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to know that whether it is a Database or ABAP issue? and how to solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some code is as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;...... 
CALL FUNCTION 'IDOC_WRITE_AND_START_INBOUND'
 
      EXPORTING
 
        i_edidc        = lwa_idoc_control
 
        do_commit      = c_x
 
      IMPORTING
 
        docnum         = lwa_idoc_control-docnum
 
      TABLES
 
        i_edidd        = lt_edidd
 
      EXCEPTIONS
 
        idoc_not_saved = 1
 
        OTHERS         = 2.
 
    IF sy-subrc  0.
 
*     record the error
 
*    text-e10 =  Error occurs when calling u201CIDOC_WRITE_AND_START_INBOUND"
 
      &amp;lt;fs_idoc_info&amp;gt;-remark = text-e10.
 
      APPEND &amp;lt;fs_idoc_info&amp;gt; TO gt_idoc_err.
 
      g_error = c_x.
 
    ELSE.
 
      COMMIT WORK AND WAIT.
 
*     IDOC Number
 
      &amp;lt;fs_idoc_info&amp;gt;-idoc_num = lwa_idoc_control-docnum.
 
*     Status.
 
      SELECT SINGLE status FROM edidc INTO &amp;lt;fs_idoc_info&amp;gt;-
 
idoc_status
 
                         WHERE docnum = lwa_idoc_control-
 
docnum.
......&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 05:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500876#M1654008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T05:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500877#M1654009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It may be the connection problem.your coding id right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik.R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 05:59:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500877#M1654009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T05:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500878#M1654010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Debug  your code and check at what line of code the error is comming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Goutam Kolluru.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 06:11:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500878#M1654010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T06:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500879#M1654011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you checked any of the program is using MDVM table other than yours&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 06:14:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500879#M1654011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T06:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500880#M1654012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have debugged the codes, in CALL FUNCTION 'IDOC_WRITE_AND_START_INBOUND', it will update MDVM table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Acctully, have test in online mode, it will run successfully; but sometimes it will fail when being run as a job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the job failed, In sm21, I got the fowlling infomation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deadlock occurred&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Database error 60 at UPD access to table MDVM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; ORA-00060: deadlock detected while waiting for resource&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run-time error "DBIF_RSQL_SQL_ERROR" occurred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 06:37:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500880#M1654012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T06:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500881#M1654013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Is your error in the select query of the table &lt;STRONG&gt;TRFCQOUT&lt;/STRONG&gt;, check this in the source code extract of the dump analysis in &lt;STRONG&gt;st22&lt;/STRONG&gt; transaction. If that is the cause for the error then implement the note &lt;STRONG&gt;1606565&lt;/STRONG&gt; this will solve this issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sort of termination is not very common. This issue is a BASIS related issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the SAP not specified above. you will get more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know for further details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;begging removed by moderator&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Praveenkumar T.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Feb 14, 2012&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 07:08:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500881#M1654013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T07:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500882#M1654014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the error code is related to Oracle database&lt;/P&gt;&lt;P&gt;ORA-00060: deadlock detected while waiting for resource&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a database specific error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit Mittal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 07:12:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500882#M1654014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T07:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500883#M1654015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This defnitely seems to be a database error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tell your basis consultant to check the Oracle trace file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/8d/2d5fac955fbb43871e348257f6c49d/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/8d/2d5fac955fbb43871e348257f6c49d/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 07:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500883#M1654015</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2012-02-14T07:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500884#M1654016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have got the Oracle trace file as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;more /oracle/PRC/saptrace/usertrace/prc_ora_1323174.trc&lt;/P&gt;&lt;P&gt;Dump file /oracle/PRC/saptrace/usertrace/prc_ora_1323174.trc&lt;/P&gt;&lt;P&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production&lt;/P&gt;&lt;P&gt;With the Partitioning and Data Mining options&lt;/P&gt;&lt;P&gt;ORACLE_HOME = /oracle/PRC/102_64&lt;/P&gt;&lt;P&gt;System name:    AIX&lt;/P&gt;&lt;P&gt;Node name:      sfhprd01&lt;/P&gt;&lt;P&gt;Release:        3&lt;/P&gt;&lt;P&gt;Version:        5&lt;/P&gt;&lt;P&gt;Machine:        000B69E6D700&lt;/P&gt;&lt;P&gt;Instance name: PRC&lt;/P&gt;&lt;P&gt;Redo thread mounted by this instance: 1&lt;/P&gt;&lt;P&gt;Oracle process number: 48&lt;/P&gt;&lt;P&gt;Unix process pid: 1323174, image: oraclePRC@sfhprd01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;2012-02-12 05:01:15.479&lt;/P&gt;&lt;/LI&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;ACTION NAME:(5987) 2012-02-12 05:01:15.469&lt;/P&gt;&lt;/LI&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;MODULE NAME:(SAPLDISP                                ) 2012-02-12 05:01:15.469&lt;/P&gt;&lt;/LI&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;SERVICE NAME:(SYS$USERS) 2012-02-12 05:01:15.469&lt;/P&gt;&lt;/LI&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;SESSION ID:(1050.34) 2012-02-12 05:01:15.469&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;DEADLOCK DETECTED&lt;/P&gt;&lt;P&gt;[Transaction Deadlock]&lt;/P&gt;&lt;P&gt;Current SQL statement for this session:&lt;/P&gt;&lt;P&gt;UPDATE "MDVM" SET "GSAEN" = :A0 , "AKKEN" = :A1 , "MPSKZ" = :A2 , "ERDAT" = :A3 , "USTMP" = :A4 WHERE "MANDT" = :A5 AND "MAFID" = :A6 AND "MDKEY" = :A7 AND ( "GSAEN" &amp;lt;&amp;gt; :A8 OR "AKK&lt;/P&gt;&lt;P&gt;EN" &amp;lt;&amp;gt; :A9 OR "MPSKZ" &amp;lt;&amp;gt; :A10 )&lt;/P&gt;&lt;P&gt;The following deadlock is not an ORACLE error&lt;STRONG&gt;. It is a&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;deadlock due to user error in the design of an application&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or from issuing incorrect ad-hoc SQL.&lt;/STRONG&gt; The following&lt;/P&gt;&lt;P&gt;information may aid in determining the deadlock:&lt;/P&gt;&lt;P&gt;Deadlock graph:&lt;/P&gt;&lt;P&gt;                       -&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;Blocker(s)--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="---" /&gt;  -&lt;HR originaltext="--------" /&gt;Waiter(s)--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;Resource Name          process session holds waits  process session holds waits&lt;/P&gt;&lt;P&gt;TX-0009000e-0001afeb        48    1050     X             54    1043           X&lt;/P&gt;&lt;P&gt;TX-00050001-0001a6ba        54    1043     X             48    1050           X&lt;/P&gt;&lt;P&gt;session 1050: DID 0001-0030-00000004    session 1043: DID 0001-0036-00000004&lt;/P&gt;&lt;P&gt;session 1043: DID 0001-0036-00000004    session 1050: DID 0001-0030-00000004&lt;/P&gt;&lt;P&gt;Rows waited on:&lt;/P&gt;&lt;P&gt;Session 1043: obj - rowid = 0001D747 - AAAddHAAWAABZW5ABV&lt;/P&gt;&lt;P&gt;  (dictionary objn - 120647, file - 22, block - 366009, slot - 85)&lt;/P&gt;&lt;P&gt;Session 1050: obj - rowid = 0001D747 - AAAddHAAWAABZW9AA7&lt;/P&gt;&lt;P&gt;  (dictionary objn - 120647, file - 22, block - 366013, slot - 59)&lt;/P&gt;&lt;P&gt;Information on the OTHER waiting sessions:&lt;/P&gt;&lt;P&gt;Session 1043:&lt;/P&gt;&lt;P&gt;  pid=54 serial=17 audsid=604347 user: 27/SAPSR3&lt;/P&gt;&lt;P&gt;  O/S info: user: prcadm, term: , ospid: 1122488, machine: sfhprd01&lt;/P&gt;&lt;P&gt;            program: dw.sapPRC_DVEBMGS00@sfhprd01 (TNS V1-V3)&lt;/P&gt;&lt;P&gt;  client info: 0&lt;/P&gt;&lt;P&gt;  application name: SAPLDISP                                , hash value=2512065060&lt;/P&gt;&lt;P&gt;  action name: 5987, hash value=493565349&lt;/P&gt;&lt;P&gt;  Current SQL Statement:&lt;/P&gt;&lt;P&gt;  UPDATE "MDVM" SET "GSAEN" = :A0 , "AKKEN" = :A1 , "MPSKZ" = :A2 , "ERDAT" = :A3 , "USTMP" = :A4 WHERE "MANDT" = :A5 AND "MAFID" = :A6 AND "MDKEY" = :A7 AND ( "GSAEN" &amp;lt;&amp;gt; :A8 OR "A&lt;/P&gt;&lt;P&gt;KKEN" &amp;lt;&amp;gt; :A9 OR "MPSKZ" &amp;lt;&amp;gt; :A10 )&lt;/P&gt;&lt;P&gt;End of information on OTHER waiting sessions.&lt;/P&gt;&lt;P&gt;sfhprd01:oraprc 23&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, it is  "a deadlock due to user error in the design of an application or from issuing incorrect ad-hoc SQL. "&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 07:34:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500884#M1654016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T07:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500885#M1654017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a common error in Oracle, first read [Note 84348 - Oracle deadlocks, ORA-00060|https://service.sap.com/sap/support/notes/84348], due to some inherent problem of shared lock during insert in Oracle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you read [Note 1023278 - Deadlocks during transfer from SCM to ERP|https://service.sap.com/sap/support/notes/1023278] which solved a similar problem grouping data by material number, so preventing two treatments/luw to wait for each over.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 12:53:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500885#M1654017</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-02-14T12:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Database Deadlock occurred</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500886#M1654018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Helle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I already checked in the ST22 dump file , There is no related table TRFCQOUT information as attachment. &lt;/P&gt;&lt;P&gt;So may be the note#1606565 is not fit  for this issue I think. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is the part of the Dump file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime Errors         DBIF_RSQL_SQL_ERROR&lt;/P&gt;&lt;P&gt;Exception              CX_SY_OPEN_SQL_DB&lt;/P&gt;&lt;P&gt;Date and Time          2012.02.12 05:01:17&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;	Short text&lt;/P&gt;&lt;P&gt;		SQL error in the database when accessing a table.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;	What happened?&lt;/P&gt;&lt;P&gt;		The database system detected a deadlock and avoided it by rolling back&lt;/P&gt;&lt;P&gt;		your transaction.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;	What can you do?&lt;/P&gt;&lt;P&gt;		If possible (and necessary), repeat the last database transaction in the&lt;/P&gt;&lt;P&gt;		 hope that locking the object will not result in another deadlock.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		Note which actions and input led to the error.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		For further help in handling the problem, contact your SAP administrator&lt;/P&gt;&lt;P&gt;		.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		You can use the ABAP dump analysis transaction ST22 to view and manage&lt;/P&gt;&lt;P&gt;		termination messages, in particular for long term reference.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		Note which actions and input led to the error.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		For further help in handling the problem, contact your SAP administrator&lt;/P&gt;&lt;P&gt;		.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		You can use the ABAP dump analysis transaction ST22 to view and manage&lt;/P&gt;&lt;P&gt;		termination messages, in particular for long term reference.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;	Error analysis&lt;/P&gt;&lt;P&gt;		An exception occurred that is explained in detail below.&lt;/P&gt;&lt;P&gt;		The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught&lt;/P&gt;&lt;P&gt;		 in&lt;/P&gt;&lt;P&gt;		procedure "UPDATE_MDVM" "(FORM)", nor was it propagated by a RAISING clause.&lt;/P&gt;&lt;P&gt;		Since the caller of the procedure could not have anticipated that the&lt;/P&gt;&lt;P&gt;		exception would occur, the current program is terminated.&lt;/P&gt;&lt;P&gt;		The reason for the exception is:&lt;/P&gt;&lt;P&gt;		The database system recognized that your last operation on the database&lt;/P&gt;&lt;P&gt;		would have led to a deadlock.&lt;/P&gt;&lt;P&gt;		Therefore, your transaction was rolled back&lt;/P&gt;&lt;P&gt;		to avoid this.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		ORACLE always terminates any transaction that would result in deadlock.&lt;/P&gt;&lt;P&gt;		The other transactions involved in this potential deadlock&lt;/P&gt;&lt;P&gt;		are not affected by the termination.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;	How to correct the error&lt;/P&gt;&lt;P&gt;		Database error text........: "ORA-00060: deadlock detected while waiting for&lt;/P&gt;&lt;P&gt;		 resource"&lt;/P&gt;&lt;P&gt;		Internal call code.........: "[RSQL/UPDT/MDVM ]"&lt;/P&gt;&lt;P&gt;		Please check the entries in the system log (Transaction SM21).&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		If the error occures in a non-modified SAP program, you may be able to&lt;/P&gt;&lt;P&gt;		find an interim solution in an SAP Note.&lt;/P&gt;&lt;P&gt;		If you have access to SAP Notes, carry out a search with the following&lt;/P&gt;&lt;P&gt;		keywords:&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		"DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"&lt;/P&gt;&lt;P&gt;		"SAPLDISP" or "LDISPF29"&lt;/P&gt;&lt;P&gt;		"UPDATE_MDVM"&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		If you cannot solve the problem yourself and want to send an error&lt;/P&gt;&lt;P&gt;		notification to SAP, include the following information:&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		1. The description of the current problem (short dump)&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		   To save the description, choose "System-&amp;gt;List-&amp;gt;Save-&amp;gt;Local File&lt;/P&gt;&lt;P&gt;		(Unconverted)".&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		2. Corresponding system log&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		   Display the system log by calling transaction SM21.&lt;/P&gt;&lt;P&gt;		   Restrict the time interval to 10 minutes before and five minutes&lt;/P&gt;&lt;P&gt;		after the short dump. Then choose "System-&amp;gt;List-&amp;gt;Save-&amp;gt;Local File&lt;/P&gt;&lt;P&gt;		(Unconverted)".&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		3. If the problem occurs in a problem of your own or a modified SAP&lt;/P&gt;&lt;P&gt;		program: The source code of the program&lt;/P&gt;&lt;P&gt;		   In the editor, choose "Utilities-&amp;gt;More&lt;/P&gt;&lt;P&gt;		Utilities-&amp;gt;Upload/Download-&amp;gt;Download".&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		4. Details about the conditions under which the error occurred or which&lt;/P&gt;&lt;P&gt;		actions and input led to the error.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		The exception must either be prevented, caught within proedure&lt;/P&gt;&lt;P&gt;		"UPDATE_MDVM" "(FORM)", or its possible occurrence must be declared in the&lt;/P&gt;&lt;P&gt;		RAISING clause of the procedure.&lt;/P&gt;&lt;P&gt;		To prevent the exception, note the following:&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;	System environment&lt;/P&gt;&lt;P&gt;		SAP-Release 700&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		Application server... "sfhprd01"&lt;/P&gt;&lt;P&gt;		Network address...... "10.27.35.102"&lt;/P&gt;&lt;P&gt;		Operating system..... "AIX"&lt;/P&gt;&lt;P&gt;		Release.............. "5.3"&lt;/P&gt;&lt;P&gt;		Hardware type........ "000B69E6D700"&lt;/P&gt;&lt;P&gt;		Character length.... 16 Bits&lt;/P&gt;&lt;P&gt;		Pointer length....... 64 Bits&lt;/P&gt;&lt;P&gt;		Work process number.. 25&lt;/P&gt;&lt;P&gt;		Shortdump setting.... "full"&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		Database server... "sfhprd01"&lt;/P&gt;&lt;P&gt;		Database type..... "ORACLE"&lt;/P&gt;&lt;P&gt;		Database name..... "PRC"&lt;/P&gt;&lt;P&gt;		Database user ID.. "SAPSR3"&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		Char.set.... "C"&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		SAP kernel....... 700&lt;/P&gt;&lt;P&gt;		created (date)... "Nov 18 2008 21:27:59"&lt;/P&gt;&lt;P&gt;		create on........ "AIX 2 5 005DD9CD4C00"&lt;/P&gt;&lt;P&gt;		Database version. "OCI_102 (10.2.0.2.0) "&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		Patch level. 185&lt;/P&gt;&lt;P&gt;		Patch text.. " "&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		Database............. "ORACLE 9.2.0.&lt;STRONG&gt;.&lt;/STRONG&gt;, ORACLE 10.1.0.&lt;STRONG&gt;.&lt;/STRONG&gt;, ORACLE 10.2.0.&lt;STRONG&gt;.&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;		SAP database version. 700&lt;/P&gt;&lt;P&gt;		Operating system..... "AIX 1 5, AIX 2 5, AIX 3 5, AIX 1 6"&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		Memory consumption&lt;/P&gt;&lt;P&gt;		Roll.... 16192&lt;/P&gt;&lt;P&gt;		EM...... 37708632&lt;/P&gt;&lt;P&gt;		Heap.... 0&lt;/P&gt;&lt;P&gt;		Page.... 2072576&lt;/P&gt;&lt;P&gt;		MM Used. 5284104&lt;/P&gt;&lt;P&gt;		MM Free. 3092792&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;	User and Transaction&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		Client.............. 300&lt;/P&gt;&lt;P&gt;		User................ "SFHBGJOB"&lt;/P&gt;&lt;P&gt;		Language key........ 1&lt;/P&gt;&lt;P&gt;		Transaction......... " "&lt;/P&gt;&lt;P&gt;		Transactions ID..... "4F36DE6EBCC40051E10080000A1B2366"&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		Program............. "SAPLDISP"&lt;/P&gt;&lt;P&gt;		Screen.............. "SAPMSSY0 1000"&lt;/P&gt;&lt;P&gt;		Screen line......... 6&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;	Information on where terminated&lt;/P&gt;&lt;P&gt;		Termination occurred in the ABAP program "SAPLDISP" - in "UPDATE_MDVM".&lt;/P&gt;&lt;P&gt;		The main program was "SAPMSSY4 ".&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		In the source code you have the termination point in line 101&lt;/P&gt;&lt;P&gt;		of the (Include) program "LDISPF29".&lt;/P&gt;&lt;P&gt;		The program "SAPLDISP" was started as a background job.&lt;/P&gt;&lt;P&gt;		Job Name....... "SFH_D_PP02_PROD. PLANNING_0330"&lt;/P&gt;&lt;P&gt;		Job Initiator.. "SFHBGJOB"&lt;/P&gt;&lt;P&gt;		Job Number..... 05005200&lt;/P&gt;&lt;P&gt;		The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in&lt;/P&gt;&lt;P&gt;		procedure "UPDATE_MDVM" "(FORM)", but it was neither handled locally nor&lt;/P&gt;&lt;P&gt;		 declared&lt;/P&gt;&lt;P&gt;		in the RAISING clause of its signature.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		The procedure is in program "SAPLDISP "; its source code begins in line&lt;/P&gt;&lt;P&gt;		4 of the (Include program "LDISPF29 ".&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;	Source Code Extract&lt;/P&gt;&lt;P&gt;	Line	SourceCde&lt;/P&gt;&lt;P&gt;	   71	          WHERE mafid = am61d-mafid&lt;/P&gt;&lt;P&gt;	   72	          AND   mdkey = am61d-mdkey&lt;/P&gt;&lt;P&gt;	   73	          AND (   gsaen &amp;lt;&amp;gt; xflag                            "TF091095&lt;/P&gt;&lt;P&gt;	   74	               OR akken &amp;lt;&amp;gt; am61d-akken&lt;/P&gt;&lt;P&gt;	   75	               OR resdt &amp;lt;&amp;gt; am61d-resdt&lt;/P&gt;&lt;P&gt;	   76	               OR mpskz &amp;lt;&amp;gt; am61d-mpskz ).&lt;/P&gt;&lt;P&gt;	   77	    ENDIF.&lt;/P&gt;&lt;P&gt;	   78	&lt;/P&gt;&lt;P&gt;	   79	    IF  am61d-akken NE space&lt;/P&gt;&lt;P&gt;	   80	    AND am61d-resdt EQ space&lt;/P&gt;&lt;P&gt;	   81	    AND am61d-resal NE space.&lt;/P&gt;&lt;P&gt;	   82	      UPDATE mdvm&lt;/P&gt;&lt;P&gt;	   83	      SET gsaen = xflag&lt;/P&gt;&lt;P&gt;	   84	          akken = am61d-akken&lt;/P&gt;&lt;P&gt;	   85	          resal = am61d-resal&lt;/P&gt;&lt;P&gt;	   86	          mpskz = am61d-mpskz&lt;/P&gt;&lt;P&gt;	   87	          erdat = sy-datlo&lt;/P&gt;&lt;P&gt;	   88	          ustmp = l_ustmp&lt;/P&gt;&lt;P&gt;	   89	          WHERE mafid = am61d-mafid&lt;/P&gt;&lt;P&gt;	   90	          AND   mdkey = am61d-mdkey&lt;/P&gt;&lt;P&gt;	   91	          AND (   gsaen &amp;lt;&amp;gt; xflag                            "TF091095&lt;/P&gt;&lt;P&gt;	   92	               OR akken &amp;lt;&amp;gt; am61d-akken&lt;/P&gt;&lt;P&gt;	   93	*(del)     OR RESAL &amp;lt;&amp;gt; AM61D-RESDT         "Tippfehler     "TF 3.0F&lt;/P&gt;&lt;P&gt;	   94	               OR resal &amp;lt;&amp;gt; am61d-resal "TF 3.0F&lt;/P&gt;&lt;P&gt;	   95	               OR mpskz &amp;lt;&amp;gt; am61d-mpskz ).&lt;/P&gt;&lt;P&gt;	   96	    ENDIF.&lt;/P&gt;&lt;P&gt;	   97	&lt;/P&gt;&lt;P&gt;	   98	    IF  am61d-akken NE space&lt;/P&gt;&lt;P&gt;	   99	    AND am61d-resdt EQ space&lt;/P&gt;&lt;P&gt;	  100	    AND am61d-resal EQ space.&lt;/P&gt;&lt;P&gt;	&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;	      UPDATE mdvm&lt;/P&gt;&lt;P&gt;	  102	      SET gsaen = xflag&lt;/P&gt;&lt;P&gt;	  103	          akken = am61d-akken&lt;/P&gt;&lt;P&gt;	  104	          mpskz = am61d-mpskz&lt;/P&gt;&lt;P&gt;	  105	          erdat = sy-datlo&lt;/P&gt;&lt;P&gt;	  106	          ustmp = l_ustmp&lt;/P&gt;&lt;P&gt;	  107	          WHERE mafid = am61d-mafid&lt;/P&gt;&lt;P&gt;	  108	          AND   mdkey = am61d-mdkey&lt;/P&gt;&lt;P&gt;	  109	          AND (   gsaen &amp;lt;&amp;gt; xflag                            "TF091095&lt;/P&gt;&lt;P&gt;	  110	               OR akken &amp;lt;&amp;gt; am61d-akken&lt;/P&gt;&lt;P&gt;	  111	               OR mpskz &amp;lt;&amp;gt; am61d-mpskz ).&lt;/P&gt;&lt;P&gt;	  112	    ENDIF.&lt;/P&gt;&lt;P&gt;	  113	&lt;/P&gt;&lt;P&gt;	  114	    IF  am61d-akken EQ space&lt;/P&gt;&lt;P&gt;	  115	    AND am61d-resdt NE space&lt;/P&gt;&lt;P&gt;	  116	    AND am61d-resal NE space.&lt;/P&gt;&lt;P&gt;	  117	      UPDATE mdvm&lt;/P&gt;&lt;P&gt;	  118	      SET gsaen = xflag&lt;/P&gt;&lt;P&gt;	  119	          resdt = am61d-resdt&lt;/P&gt;&lt;P&gt;	  120	          resal = am61d-resal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 08:31:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-deadlock-occurred/m-p/8500886#M1654018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-15T08:31:54Z</dc:date>
    </item>
  </channel>
</rss>

