How get outside deadlock

Hi all,
i have these problem i get one "cool" app on my table which has these feature. Have deadlock problem ;). There occur situation when one sesion is select for update row with id = 10 second session take for update 20 first want take 20 then ;) and second 10 :0 and deadlock is born.
oracle find deadlock and one select is raising exception e.g.
S2 take 20
S1 take 10
S1 try take 20 and waitin
S2 try take 10 = deadlock
oracle throw error in S1
and my goal is catch this exception and try do same work in S1 again i try something like this (pseudocode)
while deadlock = true loop
deadlock := false;
savepoint s1
begin
select for update where id = 10;
select for update where id = 20;
exception
when others then
if errorcode = - 60 then deadlock :- true rollback to s1;
end;
end loop
but rollback to savepoint dont unlock my rows. can u give me advice how make this on oracle? I want loop in which i can free all my locks.
Thanks a lot martin.

Is there a reason that you can't simply avoid the deadlock by requiring that sessions lock rows in a particular order (i.e. always lock row 10 before trying to lock row 20)? Or that you can't specify NOWAIT when you try to lock the row and handle the ORA-00054 error if the row is already locked? Normally, the solution to deadlock problems is not to allow them to occur, not to try to handle them when they occur.
Justin

Similar Messages

  • How far outside the "38 cities" will 4G reach?

    I'm primarily asking about West Lafayette.  I live about 3-4 miles outside of West Lafayette in the city of Lafayette.  Does anyone know how far outside the "city limits" the 4G access will reach?  If I am able to get 4G speeds, I'll hold off on upgrading until the 4G phones come out.  If not, I'll be upgrading at the end of the month.  Looking at Sprints 4G coverage maps, the service seems to reach pretty far outside the city limits.  I know it is different technology and different companies, but I was just curious how this would progress. 
    Thanks

    BurtonSnol3orde wrote:
    I'm primarily asking about West Lafayette.  I live about 3-4 miles outside of West Lafayette in the city of Lafayette.  Does anyone know how far outside the "city limits" the 4G access will reach?  If I am able to get 4G speeds, I'll hold off on upgrading until the 4G phones come out.  If not, I'll be upgrading at the end of the month.  Looking at Sprints 4G coverage maps, the service seems to reach pretty far outside the city limits.  I know it is different technology and different companies, but I was just curious how this would progress. 
    Thanks
    Follow this link;  http://phones.verizonwireless.com/4g/
    go to the map feature, and their is a zip code lookup available.  I live outside of Pittsburgh proper by about 25 miles, but my zip is included in the 4G coverage area.  Now I just need the phones to show up!!

  • HOw to avoid DeadLocks when you schedule a Sql Server Agent Job and calling SSIS packages

    Hi All,
    I have scheduled 2 packages in in Sql Server Agent jobs .
    First job which is having Package 1 executing at 11 AM and where I am inserting the data in the table.
    Second job which is having Package 2 executing at 12 AM and where I am updating the data in the table based on the first job inserted records.
    When I am executing my first job it taking more time and executing till 12 AM and from 12 AM my job 2 also starting ,so getting deadlocks conflicts because inserting happening from job1 and updating happening from Job 2.
    How to avoid deadlocks and fix the issue.
    Please Suggest .
    Thanks & Regards,
    Anand

    Hi Anand,
    Here is another solution, you can set the Job 2 not to run based on a schedule, and create another SQL Server Agent Job which starts at 12 AM and run with a specified time interval to execute a SQL statement in which you do the following steps:
    1. Get the status information of Job 1 using the statement:
    DECLARE @i int;
    EXEC @i = msdb.dbo.sp_help_job @job_name = ‘Job Name'
    2. If the value of @i is 1 which means the status of job 1 is success and current time is, then start the job 2. So, the statement is as follows:
    IF @I = 1
    EXEC msdb.dbo.sp_start_job @job_name= ‘Job Name’
    Regards,
    Mike Yin
    TechNet Community Support

  • Lost serie# on purchased lightroom. How get it back?

    Almost impossible to get in contact with Adobee about this. DO I HAVE TO BUY LIGHTROOM AGAIN ?????

    I can not find any file with that name. I have ver 5 and i also looked for simular files with adapted names to ver 5.
    I have spent 2 days now trying to find the serial for my purchased lightroom.
    I have:
    - Tryed to use the register function in the program that showes its approved serial with asterisks, but nothing came up in Adobes "my pages”
    I have done this several times.
    - Try to get in contact with adobes so call customer service in england (or where it is). I listend to music for 1 hour with no contact. I wasent even informed about anything. No que number, no estimated time, nothing !
    - I have tryed to join several forum without being able to solve the problem
    - I looked up Adobes phone number here in sweden, a company with several employees. They have an answering service that block customers like me to speek with a person. The only thing they can do is to direct to the english ”non service” where you have to wait for hours without getting any information at all.
    - and more
    What am i supposed to do to move my lightroom into a new more modern Mac computer than my old mac air ??
    Buy a second lightroom ?
    Write a letter and go to a postoffice?
    Take a sleeping bag and park outside the Adobe office till someone there at least notice i need help?
    Call the police or the consumer rights representative?
    Its very easy to test, purchase and pay direct to Adobe, but after that there it no interest from them …..
    I have to learn this lesson now and give up this, I will try to spread out my experiences to other, so much i can, because i think this is a very greedy and unfair customer policy ! 
    Hälsningar/Regards
    Lars Jerström
    +46708 112441t
    15 feb 2015 kl. 18:38 skrev Keith_Reeder <[email protected]>:
    Lost serie# on purchased lightroom. How get it back?
    created by Keith_Reeder <https://forums.adobe.com/people/Keith_Reeder> in Photoshop Lightroom - View the full discussion <https://forums.adobe.com/message/7196541#7196541>
    Preference and other file locations | Lightroom 4 <https://helpx.adobe.com/lightroom/kb/preference-file-locations-lightroom-4.html>
    Look to the bottom of the page.
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7196541#7196541 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7196541#7196541
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Photoshop Lightroom by email <mailto:[email protected]> or at Adobe Community <https://forums.adobe.com/choose-container.jspa?contentType=1&containerType=14&container=33 16>
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624 <https://forums.adobe.com/thread/1516624>.

  • How get all table name from database

    hi master
    sir
    how get all table name from database

    The big question is 'why'.
    Selecting from view 'dba_tables' will indeed give the list of all tables in the database, but that includes the dictionary tables and the internal tables, and many others that are probably not of interet to a person who needs to ask this question. Besides, the dba_tables view requires access to a DBA account.
    There are several other views: "user_tables" will list all the tables in this user's schema; and "all_tables" will list all the tables this user can access in some way.
    The above do not, of course, include any information about synonyms, sequences, views, indexes and so on.
    The correct answer and the meaningful answer may be two different things.

  • How GET Output to Excel with Oracle9i Report using OC4J

    how GET Output to Excel with Oracle9i Report using OC4J.
    I FINISHED THE SETPS CONCIDERING THE JSP CODE NEEDED TO GET THE EXCEL OUTPUT ON LOCAL MACHINE.
    I NEED TO PUBLISH THIS REPORT THROUGH APPLICATION SERVER.
    THE QUESTION IS:
    1- HOW TO START AN OC4J INSTANCE FROM ORACLE 9I DS FOR THIS REPORT?
    2- WHERE (PATH) TO PUBLISH THE REPORT ON THE APPLICATION SERVER?
    3- WHAT IS THE DEFAULT URL TO RUN THIS REPORT AND WHERE TO PUT IT?
    4- HOW TO MAKE MAPPING FOR DIRECOTRY PATH TO TRANSLATED AS URL FOR THIS REPORT?
    5- IF ANY ONE CAN GIVE ME THE FULL CODE TO RUN AND CALL SIMPLE JSP REPORT TO BE VIED IN INTERNET EXPLORER.
    THANK YOU

    Hi,
    I can't answer to all your questions, however I can tell you that:
    2) The directory where to put the report file is specifiend in a file named
    <serverName>.conf
    in the sourceDire property
    <property name="sourceDir" value="/directory/dove/mettere/i/report"/>
    that you can find under ORACLE_HOME/reports/conf
    3) The URL is
    http://<server IAS address>:<port number>/<jsp file path>/<repName>.jsp?server=<report server name>&userid=<user>/<pwd>@<DB conn string>[&<param>=<valore>[&...]]
    5) In IE you have only to set the previous URL in the address bar.
    Hope this helps you
    Bye
    Raffy

  • I still use CS3, yes it's true.  Can I some how get a serial number for CS2?b

    I still use CS3, yes it's true.  However, I have my upgrade copy only, not my CS2, and I just purchased a new iMac Mini.  Therefore, I do not have my SN for CS2.  Can I some how get a serial number for CS2?  I found a link with SN's but none worked.  I wo

    There is a SPECIAL serial number for CS2 that will probably not work for a CS3 upgrade http://helpx.adobe.com/x-productkb/policy-pricing/creative-suite-2-activation-end-life.htm l
    You may still buy CS6 which has a perpetual license... Premiere Pro to get the bundled Encore Creative Suite 6

  • How does DIADEM import TDMS files? How gets every channel his number and groupindex? How can I determine which channel has which groupindex and number?

    I store different channels in a TDMS file.
    I like to have a time channel at the first position with group index 1 and number 1.
    When I read the TDMS file with DIADEM the time channel (Float64) is on a differernt position, and the channels are not sorted alphabetically.
    Here are my questions:
    How does DIADEM import TDMS files?
    How gets every channel his number and groupindex?
    How can I determine which channel has which groupindex and number?
    Best regards
    Joerg

    Hi Jörg,
    i suppose that you´re programme whose create the *.tdms file is writing on false position. Try to create datas with timechannel on first indes in diadem, then save it and then open it again. you see that all is correct. So please tell me what programm in what version do you use and please attache it here.
    Did you use the library for creating *.tdms files like in the link ?
    http://zone.ni.com/devzone/cda/tut/p/id/6471
    Here you find the gtdms_8.x.zip - when you extract it and opened the *.llb you find vi´s for all functions e.g. writing 2d array of strings to *.tdms file
    when you open the subvi´s then you see how created and writing datas/structure to *.tdms files. Because *.tdms is binary you can´t see structure with open it in editor.
    When you don´t have Labview you can use the 30 days test of current version 8.5 under following link
    german version download link
    https://lumen.ni.com/nicif/d/lveval/content.xhtml
    english version download link
    https://lumen.ni.com/nicif/us/lveval/content.xhtml
    Hope it helps
    Best Regards

  • Not working wifi & Bluetooth.I phone by UAE iam now in India how get warranty

    Not working wifi &amp; Bluetooth.I phone by UAE iam now in India how get warranty

    Either take the iPhone to UAE yourself or send to friend/relative
    there to take in for service. Be advised that many iPhones sold
    in UAE are gray market - originally sold elsewhere. iPhone warranty
    is valid only in country of original purchase and that may be somewhere
    other than UAE.

  • File dialog box: how get full path and filename (firefox 3.0 problem)

    Hi,
    I have a smilar problem then discussed in this thread: file dialog box: how get  full path and filename
    Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
    I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
    Although when i tested it local it does work.
    Any idees how to solve this?
    Best Regards
    Stijn

    Actually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to creat deadlock for the purchase order in SAP Workflow

    How to creat deadlock for the purchase order in SAP Workflow

    Hi Ben,
    Are you using FM "CONVERT_DATE_TO_EXTERNAL" before passing delivery date?  If not, use FM like this, before passing the date to BAPI_PO_CREATE1 and it might work
      DATA: vf_doc_date(10),
                 internal_date TYPE d.
         vf_doc_date = sy-datum.              "Document date.
         internal_date = vf_doc_date.
      CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
        EXPORTING
          date_internal            = internal_date
        IMPORTING
          date_external            = vf_doc_date
        EXCEPTIONS
          date_internal_is_invalid = 1
          OTHERS                   = 2.
    Regards,
    Vivek

  • I just but a app not working how get money back

    i just but a app not working how get money back

    You've tried deleting and redownloading the app via the Purchased tab in the App Store app on your device, and tried contacting the developer ? If you have and the developer can't/won't help then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • How create new database and table in java db and how get java db backup

    hi master
    sir i use stuido creator
    sir please give me idea how i create new database
    and how create new table and view in this new database
    and how get this database backup
    how i give this databae backup to isp for deployment
    please give me idea with step
    thank
    aamir

    Create your own Value Object (Data Transfer Object) in Java with a structure similar to this and map the fields returned from the database to the fields of that object (preferably using SEtT methods).
    Hope this helps.

  • I have a new mac and want my old photoshop on it , how get i the old serial key for the new ?

    I have a new mac and want my old photoshop on it , how get i the old serial key for the new ? My old mac is deleted ...

    We would need to know the version of Mac OS you are running and the version of Photoshop you want to install.
    The serial number is the tricky part. If you have no idea where you placed it and did not register your product with Adobe, your chances are very low of retrieving it.

  • How get current time zone offset ?

    Hi,
    I am facing to a problem related getting time zone offset.
    Below code is used for my application :
    NSDate* sourceDate = [NSDate date];
    NSTimeZone* destinationTimeZone = [NSTimeZone systemTimeZone];
    timeZoneOffset = [destinationTimeZone secondsFromGMTForDate:sourceDate] / 3600;
    But sometimes seems that above code is getting work wrong. For example :
    Knoxville, TN : time zone offset should be -5. But my code resulted it as -4.
    http://www.timeanddate.com/worldclock/city.html?n=843
    This web is related my issue. Here is :
    Standard time zone: UTC/GMT -5 hours
    Daylight saving time: +1 hour
    Current time zone offset: UTC/GMT -4 hours
    Actually I don't know how get to "Daylight saving time:".
    Can you correct this issue for me ?
    Please advice.
    Thanks.

    Hi Raiden -
    RaidenMAC wrote:
    Knoxville, TN : time zone offset should be -5. But my code resulted it as -4.
    I think your code is giving you the correct offset for Knoxville on today's date. The offset for Eastern Standard Time (EST) is -5, but Knoxville is currently on Eastern Daylight Time (EDT), which is one hour later than EST. (-5) + 1 => (-4), which is what your code computed.
    Note that [secondsFromGMTForDate:|http://developer.apple.com/library/ios/documentation/Co coa/Reference/Foundation/Classes/NSTimeZoneClass/Reference/Reference.html#//appleref/doc/uid/20000190-CACDIAIC] is correcting for daylight savings time. That's why you need to pass the date to that method. If you pass a "summer" date, the return offset will be one hour more than it will be for a "winter" date (usually early November to mid March). For example, try moving the date forward 60 days like this:
    NSDate *sourceDate = [NSDate dateWithTimeIntervalSinceNow:3600 * 24 * 60];
    NSTimeZone* destinationTimeZone = [NSTimeZone systemTimeZone];
    int timeZoneOffset = [destinationTimeZone secondsFromGMTForDate:sourceDate] / 3600;
    NSLog(@"sourceDate=%@ timeZoneOffset=%d", sourceDate, timeZoneOffset);
    The above should give you the offset for Knoxville on Dec. 7, 2010, which is a winter date.
    Actually I don't know how get to "Daylight saving time:".
    You can test a NSTimeZone object with [isDaylightSavingTimeForDate:|http://developer.apple.com/library/ios/documentat ion/Cocoa/Reference/Foundation/Classes/NSTimeZoneClass/Reference/Reference.html#//appleref/doc/uid/20000190-CHDCJGHE], but you don't need that information when you obtain the offset with secondsFromGMTForDate:.
    - Ray

Maybe you are looking for

  • Portege R830 - Can't turn off touchpad

    Hi, strange issue. But cant turn off the touchpad on a Portege R830 (Windows 7 32bit). I have seen this problem on both of the machines I have. This has never been an issue for the Tecra models I've had, M5, M9, M10, M11, R840 etc. I have the latest

  • Problems displaying foreign text

    Hi, I have a swing application implementing a virtual keyboard with foreign text. However, when i try to display the foreign text(with keyboard clicks)onto a JTextArea, there are only ??? printing instead. I don't have an input method yet. Is having

  • An extra charge for changing the number of rings before voicemail picks up??

    After trying all the tips I could find about changing the number of rings it takes before the voice mail picks up (the 58#, trying access setup on the vm, changing it online, etc-), I finally called the customer support line.  I was put on hold for a

  • Unsupported PDE in Print Dialogue box 10.8.5

    Am receiving an error message 'Unsupported PDE' in print dialogue box (full message "The bundle "EF283976 (FF)" couldn't be loaded because it is damaged or missing necessary resources). This is for print driver Canon iR-ADV C7000s-A1 PS V1.0 Have rei

  • Creating info record

    Hi all. I'm trying to create an info record to a material without any suceess.. The FM is ME_MAINTAIN_INFORECORD. When I activate it I get a message: "External procurement not defined for material ________ in plant ___ " but I don't see this field ma