DEADLOCK DETECTED - DELETE statement - how/why he expects in SHARING mode?

Hello

I wonder if anyone can advise here. The environment is:

Microsoft Windows 2003 Server
Standard Oracle 10.2.0.4 Edition

We had a deadlock detected in our application on a customer site - I enclose the corresponding part of the trace file below. While we think we have found the reason for the deadlock (looks like it is due to a foreign key in cascade), I'm confused as the lock mode that is requested.

Here is the track information:
Deadlock graph:
                       ---------Blocker(s)--------  ---------Waiter(s)---------
Resource Name          process session holds waits  process session holds waits
TX-00120012-00003b59        28     475     X             29     481           S
TX-000a0029-0003508b        29     481     X             28     475           X
session 475: DID 0001-001C-000F96B0     session 481: DID 0001-001D-00000079
session 481: DID 0001-001D-00000079     session 475: DID 0001-001C-000F96B0
Rows waited on:
Session 481: no row
Session 475: obj - rowid = 00014625 - AAAUYlAAIAAAAawAAo
  (dictionary objn - 83493, file - 8, block - 1712, slot - 40)
Information on the OTHER waiting sessions:
Session 481:
  pid=29 serial=18261 audsid=202192707 user: 51/info
  O/S info: user: SYSTEM, term: our_term, ospid: 5244:940, machine: our_machine
            program: our_exe.exe
  client info: GUI
  application name: app, hash value=3864155245
  action name: our_action, hash value=3631189430
  Current SQL Statement:
  DELETE FROM TABLE_1 T WHERE T.T_ID = :B1
End of information on OTHER waiting sessions.
Current SQL statement for this session:
UPDATE TABLE_1 T SET T.STATUS_ID = :B2 WHERE T.T_ID = :B1 
It seems to me like session * 481 * trying to do a deletion when the block is raised:
 DELETE FROM TABLE_1 T WHERE T.T_ID = :B1
and ask which mode (dynamique31) S .
                                   ---------Blocker(s)--------  ---------Waiter(s)---------
Resource Name          process session holds waits  process session holds waits
TX-00120012-00003b59        28     475     X             29     481           S
(also the 'no line' for lines didn't wait)
Session 481: no row
I thought it would be in mode (e) X (clusive) (for the line being deleted). Actually Yes, I set up a test of fast and simple locking and mode (e) X (is) expected the final delete .

So, am I misinterpreted the tracing information, or is the DELETE statement requesting the lock in mode S (Hare)? If this is the case, I'd appreciate a quick explanation of how/why it's...



Kind regards

ADOS

I think we have almost the same reason to wait in S mode as in [single key application | http://books.google.pl/books?id=14OmJzfCfXMC&dq=oracle+wait+interface+practical+guide&q=unique+key+enforcement].
If two sessions want to insert the same key value, the other must wait, because the outcome depends on a commit / rollback of the first session. In the case of validation, session 2 must generate an error in case of cancellation, it must insert his record.

In the test provided by ADOS, at session 1 there is an insert in session 2 - delete. The result of the delete operation depends, once again, commit or rollback in the first session. In the case of validation, it must remove, and cancellations, there is nothing to remove.

If the insert in session 1 has been replaced by the Update, there is no S lock but 'normal' eXclusive

Bartek

Tags: Database

Similar Questions

  • Deadlock detected

    Hello

    all applying patch workers got faile dand I checked the logs and newspaper said dected deadlock.
    So I checked the newspaper alert... and alert a mistake to show who headed one of the trace files...
    and I got the following info from the trace file


    Release 9.2.0.8.0 - Production jserver
    ORACLE_HOME = /bustools/oracle/v01/product/9.2.0.8
    Name of the system: AIX
    Name of the node: AIXAPP01
    Press release: 3
    Version: 5
    Machine: 00SBFC005A01
    Instance name: DPAPPL01
    Redo thread mounted by this instance: 1
    Oracle process number: 44
    The Unix process PID: 1269774, image: oracle@aixapp01 (TNS V1 - V3)

    SESSION ID: (103.4753) 2009-06-27 08:15:37.952
    DEADLOCK DETECTED (ORA-00060)
    The following deadlock is not an ORACLE error. It's a
    deadlock due to the error of the user in the design of an application
    or deliver incorrect SQL ad hoc. What follows
    information can help determine the impasse:
    Deadlock graph event:
    -Blockers - Waiter (s).
    Resource name process session held process session expected holds expected
    TX-00020015-00017e5b 44 50 103 X 42 X
    TX-00060013-000274aa 42 50 X 44 103 X
    session 103: IS 0001-002C-00002EFE session 50: 0001-002 a-00002E67
    session 50: FACT a 0001-002 - 00002E67 session 103: have you 0001-002C-00002EFE
    Expected number of lines:
    Session 50: obj - rowid = 000A2C20 - AACiwgAFbAAAI5zAAZ
    (dictionary objn - 666656, file - 347, block - 36467, sub - 25 machine)
    Session 103: obj - rowid = 000A2C20 - AACiwgAFbAAAI5yACK
    (dictionary objn - 666656, file - 347, block - 36466, machine slot - 138)
    Information about OTHER sessions of waiting:
    Session 50:
    PID = 42 series = 18272 audsid = user 1382965: 69/APPS
    Info of the o/s: user: dpaappl01, term: pts/1, ospid: 1478862, machine: aixapp01
    program:
    Customer Info: 055 AY385 N
    Current SQL statement:


    so now, how to get the SID and SPID and serail #.

    and in the light of the foregoing, I see unix process pid 1269774 and ospid = 1478862...
    I'm not clear on this topic so plese I want what sid pid spid and and ospid...

    Thank you

    Hello

    You can refer to the following ML doc to get a complete idea about the issue.

    [ORA-60 / locks the more frequent Causes | https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=164661.1]

    [What to do with ORA-60 deadlock errors | https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=62365.1]

    Thank you
    Anchorage :)

  • ORA-00060: Deadlock detected while you wait the cursor CLOSE resource

    Hello

    I am a new Member of this forum. I work with a problem that we have obtained a few weeks ago. It runs in the lot C Pro executable on 10 threads dealing with > 800 data accessed from more than one table. The error, such as reported was a package.function call.

    This is the error I encountered:
    process_item ~ G *, D * ~-60 ~ ORA-00060: Deadlock detected while you wait resources ~ PACKAGE ERROR = cursor CLOSE C_ * in the R package *. I * 7641

    The slider is a simple SELECT without Table or record locking.

    My questions are:
    * During the occurrence of this error, execution is already in the line of the CLOSE cursor or did the error has occurred between the OPEN and the CLOSE slider? There are several lines of code between the OPENING and CLOSING:
    -one who calls to a package.function that simply stores the values of parameter to a variable
    -another one that retrieves the cursor. The group that contains the values of the cursor is used only by a single function in the package

    * Is it possible for this CLOSE cursor cause a deadlock? What could have caused this?

    * From what I know, Oracle treats blocks by abandoning the blocking process, while others continue, but this impasse caused our program to hang. How is that possible? The origin of the impasse might be our Threading program? This is a rare event and has past that twice this year.

    Thank you
    RAF

    RAF Serrano wrote:
    I see, so it be that blocking has occurred before the CLOSE cursor or it occurred during CLOSING? The cause could be executable ProC

    first cause is NOT ProC

    or is it really an error in PL/SQL

    first cause is NOT PL/SQL.

    cause of ORA-00060 is DML (INSERT, UPDATE, or DELETE)

  • Need help to set a DELETE statement.

    I have a table that contains the records of files. Files come in a bouquet each week. So, we need to delete records from a table to the corresponding fields and load the table with up-to-date data.

    In doing so, the DELETE statement takes a long time. Need help with this setting.

    Here are the details.

    (1) total number of records in the table: 23 million records.
    (2) approximate records deleted each time: 500 K to 1.5 million.
    (3) table is partitioned on a PERIOD key. That is, each partition will have the data for a given period.
    (4) table is not indexed
    (5) removal occurs on a combination of 2 fields (PERIOD + BATCH).

    Here is the query and the plan:

    ===========================================================

    SQL > EXPLAIN PLAN SET STATEMENT_ID = 'TSH' FOR
    2 REMOVE / * + PARALLEL(DETAIL_UNKNOWN,10) * / u DETAIL_UNKNOWN
    3 WHERE u.FLBATCHID = 'PCAFRINTERMAR1105' AND u.N_PER6 = 201214
    4;

    He explained.

    SQL > SET LINESIZE 130
    SQL > SELECT * FROM TABLE (DBMS_XPLAN. DISPLAY ('PLAN_TABLE', 'TSH', 'ALL'));

    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------------------------
    Hash value of plan: 2400300449

    ----------------------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |
    ----------------------------------------------------------------------------------------------------
    | 0 | DELETE STATEMENT. 596K | 12 M | 838 (9) | 00:00:12 |
    | 1. REMOVE | DETAIL_UNKNOWN |
    | 2. SIMPLE HASH PARTITION | 596K | 12 M | 838 (9) | 00:00:12 | 6. 6.
    |* 3 | TABLE ACCESS FULL | DETAIL_UNKNOWN | 596K | 12 M | 838 (9) | 00:00:12 |
    ----------------------------------------------------------------------------------------------------


    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------------------------
    Name of the query block / Alias object (identified by the operation identity card):
    -------------------------------------------------------------

    1 LED$ 1
    3 LED$ 1 / U@DEL$1

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    3 - filter("U".") FLBATCHID '= 'PCAFRINTERMAR1105' AND 'U'." N_PER6 "= 201214)


    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------------------------
    Projection of the column information (identified by the operation identity card):
    -----------------------------------------------------------

    2 - (cmp = 2, 3) "U". ROWID [ROWID, 10], "U". "N_PER6" [NO.22], 'U' "." " FLBATCHID ' [VARCHAR2, 20].
    3 - « U ». ROWID [ROWID, 10], "U". "N_PER6" [NO.22], 'U' "." " FLBATCHID ' [VARCHAR2, 20].

    27 selected lines.

    ===========================================================

    Need your suggestions on how the query / table can be tuned.

    Hi Anand,

    I wanted to check why your tkprof Watch report two executions of the statement:

    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Execute      2   2315.71    2480.17          0       3351     624489      611765
    

    In fact, it there was only a single execution of the DELETE statement. The trace file begins with a call EXEC of any statement without call analysis

    *** TRACE DUMP CONTINUED FROM FILE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_ora_241708.trc ***
    
    EXEC #1:c=20000,e=13996,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=32472879711702
    =====================
    PARSING IN CURSOR #2 len=68 dep=0 uid=72 oct=42 lid=72 tim=32472883567994 hv=740818757 ad='0'
    ...
    

    TKProf aggregates this EXEC call with call EXEC of the DELETE statement because they have the same location of cursor (#1), he thinks it was the same cursor.

    PARSING IN CURSOR #1 len=93 dep=0 uid=72 oct=7 lid=72 tim=32472889974030 hv=1242910589 ad='e5979d80'
    DELETE from detail_unknown where n_per6 = 201214 and FLBATCHID = 'PCAFRINTERMAR1105'
    END OF STMT
    PARSE #1:c=0,e=11462,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=32472889974024
    ...
    EXEC #1:c=2315710000,e=2480213492,p=0,cr=3691,cu=624489,mis=0,r=611765,dep=0,og=1,tim=32475370187626
    

    So, the question about two executions is closed - there was only a single run.

    The performance - 2315,71 seconds of time processor is absolutely huge for such amount of work. It looks like a bug.

    First, I propose to check the time without compression. If your environment allows this kind of testing try to decompress the partition and re - run on unpacking data DELETION.
    10.2 find the name of the partition

    select partition_name
      from dba_tab_partitions
     where table_name = 'DETAIL_UNKNOWN'
       and partition_position = 6
    

    After that

    alter table DETAIL_UNKNOWN modify partition  nocompress;
    alter table DETAIL_UNKNOWN move partition ;
    

    and run again the button DELETE.

    What is the operating system on the server?

  • ORA-000060: Deadlock detected. More info in file filename.trc

    Friends,

    DB: oracle 9iR2
    *** 2008-11-12 11:22:11.895
    *** SESSION ID:(112.20587) 2008-11-12 11:22:11.884
    DEADLOCK DETECTED
    Current SQL statement for this session:
    UPDATE SCM_MR_ENGR_DTL SET.........................(deleted space consuming)
    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-00080007-000148b4        97     112     X             80     104           X
    TX-0004000a-00014e7f        80     104     X             97     112           X
    session 112: DID 0001-0061-000007BC     session 104: DID 0001-0050-00000733
    session 104: DID 0001-0050-00000733     session 112: DID 0001-0061-000007BC
    Rows waited on:
    Session 104: obj - rowid = 000079E2 - AAAHniAAGAAA7LrAAR
      (dictionary objn - 31202, file - 6, block - 242411, slot - 17)
    Session 112: obj - rowid = 000079E0 - AAAHngAAGAAA0lrABc
      (dictionary objn - 31200, file - 6, block - 215403, slot - 92)
    Information on the OTHER waiting sessions:
    Session 104:
      pid=80 serial=19532 audsid=971660 user: 45/NMS
      O/S info: user: matur, term: ANOP-KMCH-151, ospid: 3668:2272, machine: NMS\ANOP-KMCH-151
                program: 
      Current SQL Statement:
      
    UPDATE SCM_MR_HD SET ................ (deleted space consuming)
    End of information on OTHER waiting sessions.
    is this block will be automatically released?
    It will cause any problem?
    What should I do?

    Hello..

    This lock will be automatically released. If you encounter a lot of blocking issues, you can increase the INITRANS of this parameter. We also had a blocking problem on a production database, we found was due to a trigger. So, you can also check the triggers.

    You can find some good Articles on Metalink:

    1 doc ID: Note: 164661.1

    2 doc ID: Note: 115467.1

    3 doc ID: Note: 62365.1

    HTH
    Anand

  • Error when viewing PDF forms: "Windows received an HTTP error message: 403 (refused) of detected «perass.state.nm.us»»

    Received an error message where it says "Windows received an HTTP error message: 403 (refused) of detected 'perass.state.nm.us'. '.  I get this error message after connecting and trying to open/view the forms in PDF format.  Can anyone help?

    Original title: problem display forms in PDF format after connecting to the site of Governor

    Hey Ern,

    Thanks for posting your query in Microsoft Community.

    I imagine the inconvenience that you are experiencing and will certainly help you in the right direction to solve the problem. However, I would be grateful if you could answer a few questions to refine the question in order to provide you with better assistance.

    1. You made any hardware or software changes the computer recently?
    2. You have a wired or a wireless connection?
    3. You have a router connected to the computer?

    The question could arise if it is missing or damaged Internet Explorer files that the display of the script on the page or if the Hosts file is damaged or contains incorrect information. To resolve this problem, I would suggest trying the following methods and check if the problem persists.

    Method 1:

    Try to start the system in safe mode and check if the number is reproduced. If this isn't the case, then clean the computer starts and check if that helps.

    Step 1:

    Safe mode is a diagnostic mode in which you are connected with only the minimal necessary services and active pilots. Check if the number is reproduced.

    Start your computer in safe mode

    Note: In the advanced startup options, select safe mode with network .

    Step 2:

    Put your system to the clean boot state helps determine if third-party applications or startup items are causing the problem. You must follow the steps in the article mentioned below to perform a clean boot.
    How to perform a clean boot in Windows

    Note: See "how to reset the computer to start normally after a boot minimum troubleshooting" to prepare the computer to start as usual after a repair.

    If the problem persists, try the following method.

    Method 2:

    Read the following article and check if it helps.

    Get help with the Web site (HTTP error) error messages.

    If the problem persists, try the following method.

    Method 3:

    1. Go to Start, click all programs and open the Accessories.
    2. Right-click on command prompt in the list programs, and then select run as administrator. If you are prompted for an administrator password or for confirmation, type your password, click OK, or alternatively click on Yes.
    3. In the command prompt, type the following commands and press ENTER after each command:
      ipconfig/release
      ipconfig/renew ipconfig/flushdns
    4. Close the command prompt and restart the system.

    See if the problem is resolved.

    If it is not resolved, follow these steps if you are connected to a router.

    1. It turn off, unplug, unplug it and wait 5-10 minutes.
    2. Shut down the computer.
    3. Wait 5 - 10 minutes.
    4. Reconnect the router, restart the router and don't plug it in yet.
    5. Start your computer, connect to Windows and connect the router to the computer.
    6. Try to connect to the Internet.

    If the problem persists, try to update the firmware on the router, you can get this update from the manufacturer's Web site.

    Hope this information is useful. Let us know if you need more help, we will be happy to help you.

  • Delete apDivs. Why they remain in the code?

    Recently, I noticed that when I delete an apdiv of a page in design mode the apdiv remains in the code. Why is this? I'm successfully delete?

    Scott2001 wrote:

    I do not understand the chaos that occurs when the removal of the code. I have a few times removed the code for the APDivs that I removed his mode of design and everything seems to work perfectly on all I tested it across browsers. Could you please develop what the problems are that might happen to do this?

    CSS is used to style HTML. We will say that I have created a complex style for a particular div rule, but decided I want to move the div to a different location on the page (I mean not APDivs, but any div). If deleted automatically Dreamweaver CSS attached when I cut an element from the code, it would be a disaster. In addition, most sites that use CSS store style rules in an external file. If the rules associated with an element have been removed while the element, the rules would be more available in the remaining pages.

    Of course, when you draw an APDiv directly in Design view, it adds the CSS in the head of the same page. So it would not create a problem if the rule was deleted in these circumstances. However, Dreamweaver is of opinion that he should not touch the style rules that have already been created. He expects you as the developer to know what you are doing and what the code is for.

    If your sites consist of a large number of elements of a fixed size, you reach not too bad off with absolute positioning. It can work very well with the images, but it is not a tool of good layout for the vast majority of Web sites. The web is a liquid medium. It doesn't have the luxury of fixed page sizes you get in print.

  • detection of State animation


    I'm looking to find out how to detect the State of the animation. Specifically, it has stopped playing or reached the end of the animation. I do that in Actionscript code? or I can detect it with of html or javascript code on the page that incorporates the animation?

    For example. I use JDIC to open a browser window to play the animation. When the animation runs its course I want to window to close. I can detect the end of the animation on the imbedding page?

    Maybe try to create a new shell swf that loads other SWF files when running. You can add your Detection to this file to know when the animation ends and close the window if necessary.

  • Delete statement help

    Hi all

    In the table of audit_organizations_test, I want to delete all records except those returned returned in the following select statement:
    select *
          from audit_organizations_test ao
          where last_updt_date >= '01-jan-2008'
          union
          select *
          from (select *
              from audit_organizations_test ao
              where org_id not in (select aoo.org_id
                                  from audit_organizations_test aoo
                               where aoo.last_updt_date >= '01-jan-2008')
               ) x
          where x.last_updt_date = (select max(ao1.last_updt_date)
                                   from audit_organizations_test ao1
                                 where x.org_id = ao1.org_id
    How can I dial a delete statement to do this?

    Thank you.

    Hello

    delete from audit_organizations_test where rowid not in
    (select rowid from audit_organizations_test ao
          where last_updt_date >= '01-jan-2008'
          union
          select *
          from (select *
              from audit_organizations_test ao
              where org_id not in (select aoo.org_id
                                  from audit_organizations_test aoo
                               where aoo.last_updt_date >= '01-jan-2008')
               ) x
          where x.last_updt_date = (select max(ao1.last_updt_date)
                                   from audit_organizations_test ao1
                                 where x.org_id = ao1.org_id
    )
    

    Concerning
    Anurag

  • I can't delete cookies with this version of foxfire. I see not the button Delete. How to remove cookies?

    I was always able to delete cookies in Firefox. With the latest version, I don't see a delete button or move the slider to display a button Delete. How to delete cookies without a button actually remove visible?

    How do you remove usually cookies? In the Firefox Cookies dialog box, there are two buttons at the bottom: all delete and delete the selection. If you're used to a button Delete, it could be that you used an add-on to delete cookies.

    You can access the dialog box Cookies for the current site using the Page Info dialog box. Either:

    • Right click and select View Page Info > Security > "View Cookies".
    • (menu bar) Tools > Page Info > Security > 'view the Cookies '.
    • Click on the globe or padlock icon in the address bar > additional information > "View Cookies".

    In the dialog that opens, the site current is automatically entered in the top search box, so you can delete cookies from the site individually. If you want to see all THE cookies, you can disable this dialog.

    Does it work?

  • I need to delete Spamfighter-HOW?

    I need to delete Spamfighter-HOW?

    Learn how to use Google:
    http://www.Google.com/search?q=delete+SPAMfighter&ie=UTF-8

  • I ran microsoft security scan, and it says a voris has been partially deleted. How can I remove the rest or what should I do next

    I ran a scan of microsoft security and it indicates that a virus has been partially deleted. How can I remove the rest or what step I need to take the next

    Hi Lucie,.
    Try following the steps in this virus/malware removal guide: http://www.selectrealsecurity.com/malware-removal-guide
    It contains instructions which will remove most malware infections. If you have any questions, just ask me. I hope this helps you.
    Brian
  • I have mozilla firefox, I got it in the programs I accidently deleted it how do I put back in there

    I have mozilla firefox in my programs, I accidentally deleted it how I set in the program?

    Hi RUBYFRUIT,.

    Did you delete Mozilla Firefox in the Menu start "all programs"?

    When a program is installed, the default installation location is "C:\Program Files\ (Program Name)". Where 'C' is the operating system drive. So, you can check the following site for Mozilla Firefox: "C:\Program Files\Mozilla Firefox\". When you find the executable file, you can "PIN to Start Menu". To do this, see the following steps:

    (a) go to "C:\Program Files\Mozilla Firefox\" (where 'C' is the drive of the operating system).

    (b) with the right button on the file used to set Mozilla Firefox and click "display in the Start Menu.

    (c) click the Start button and you will see "Mozilla Firefox" listed.

    Also, see the steps in the section "to pin the icon for a program to the start menu" for more information.

    Hope the helps of information. Let us know if the problem persists, we will be happy to help you.

  • Where is Snipping Tool? If deleted accidentally, how can I get a copy for Windows Vista?

    Where is Snipping Tool? If deleted accidentally, how can I get a copy for Windows Vista?

    Hello Bob w. NY

    Click on the Start button and type capture in the search box menu star. The cutting tool application should appear at the top of the search results.

    As the cutting tool is an integral part of Windows, you might have to reinstall windows to return to the tool. Assuming, of course, you had accidentally deleted.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk | vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

  • my desktop icons have been delete somehow; How to reinstall them.

    original title: my desktop icons have been delete somehow; How to reinstall them.  I tried what Windows vista has suggested.

    My desktop icons have been remove somehow, and I'm having problems trying to locate and place them on my desk.  I tried what windows vista has suggested to do a right click on the view and hit show desktop, but nothing happens. All suggestions will be useful.  Thank you!

    zacheryscott,

    See the following topics

    http://support.Microsoft.com/mats/system_maintenance_for_windows/en-us >

    http://support.Microsoft.com/FixIt/ >

    06/20 / 1109:38: 14 am

Maybe you are looking for