REMOVE the past two times

We are on DB Oracle 10.1.0.4 and recently did an update of a simple PACKAGE, which uses only one cursor to identify records in a table, and then as it moves through these records, it removes each via a second SQL statement, essentially as
declare
  cursor csr is select * from table where <date criteria are true>;
  row table%ROWTYPE;
begin
  open csr;
  fetch csr into row;
  loop;
    if csr%NOTFOUND then
      exit;

    else

      delete from table 
      where primary_key_field1 = row.primary_key_field1
        and primary_key_field2 = row.primary_key_field2;

    end;
  end loop;
  close csr;
end;
It turns out that each 1 of 10 (we deletions rollback 53K each time, because we are still troubleshooting program) tent the same line is attempted to remove, as if the first deletion "did not". At first I thought that we were not ALL inclusive of the fields participating in the primary key of the DELETE statement. But this isn't the case.

I can literally sitting there with the same block anonymous PL/SQL that runs the PACKAGE and then just run it on & more & more and eventually it breaks when he tries to 'double - delete' the same record. We even checked the deletion repeat by issuing the: old. ROWID BEFORE Trigger LINE of the table. He appeared 2 times in a row, under the error condition.

The other strange thing is that it breaks on different lines. We have added an ORDER BY on the slider, assuming we get to break in the same place every time. It did not help. 1 out of every 10 executions still broken on a different line.

When we change the structure of encoding to use for the UPDATE... and WHERE CURRENT OF csr then everything works fine.

Someone at - he heard of this type of behavior before?
Thank you
-= Chuck

chuckers wrote:
With the help of a debugging utility, we built in the original code, we found that the PACKAGE with the DELETE statement has not received the focus between the subsequent firing of the trigger for the ROWID even (so there is no way to reset this variable).

You can try to develop more on what your real problem is in your application?

According to your description my understanding so far is the following:

1. you perform a delete in a loop - each iteration of the loop trying to delete a single row with a primary key (composite)

2. you have defined business rules in the triggers - however in this specific case that you want to use the "short-cut" of triggers mode which is activated by setting a package variable in your session

3. after the assessment of the package variable trigger resets this package to NULL variable. Why you set the null of the trigger package variable? Why not run the loop with the 'shortcut' active permanently and turn off when the loop is complete?

4 given to (in your case doubtful) restarting the DML, the same line-level trigger is returned several times to the same line. Because the package variable is set to null in the first execution of the trigger, it will now be NULL in subsequent runs for the same line

So, what happen exactly to your application trigger logic in case the package variable is NULL?

Or is there another problem with your application? Perform any non-transactional operation which then gets pulled several times (as shown / explained by Tom Kyte)? Note that any transactional operation in the trigger is supposed to get restored and restarted so all business logic you have made in the triggers in the same transaction should get restored and re-applied with the reboot. This should have no problem in terms of replay.

As I've mentioned before, your approach is wrong in general since Oracle can raise row-level triggers several times to the same line, reset the package in the trigger variable is a no-go if it breaks your logic in the following possible executions of the trigger for the same line. You can't avoid this and you don't have control over that - quite simply, it can happen (I still wonder why it seems to be happening in your particular case, has shown with single user einreihig deletions).

Kind regards
Randolf

Oracle related blog stuff:
http://Oracle-Randolf.blogspot.com/

Co-author of the book "OakTable Expert Oracle practices":
http://www.Apress.com/Book/view/1430226684
http://www.Amazon.com/Expert-Oracle-practices-database-administration/DP/1430226684

Tags: Database

Similar Questions

  • button refresh Foxfire did not work when clicked on for the past two weeks

    button refresh Foxfire did not work when clicked on for the past two weeks

    Hi, see controls customize Firefox, buttons and toolbarsand click on restore default settings.

    If this does not help, Try Firefox Safe Mode to see if the problem goes away. Firefox Safe mode is a troubleshooting mode that temporarily disables hardware acceleration, restores some settings and disables add-ons (extensions and themes).

    If Firefox is open, you can restart Firefox Safe mode in the Help menu:

    • Click the menu button

      click Help

      then select restart with disabled modules.

    If Firefox does not work, you can start Firefox in Mode safe as follows:

    • On Windows: Hold down the SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • On Mac: Hold the option key during the startup of Firefox.
    • On Linux: Exit Firefox, go to your Terminal and run firefox-safe-mode
      (you may need to specify the installation path of Firefox for example/usr/lib/firefox)

    When the Firefox Safe Mode window appears, select "start mode safe."

    If the problem is not present in Firefox Safe Mode, your problem is probably caused by an extension, theme or hardware acceleration. Please follow the steps described in the section Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems to find the cause.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.

    When find you what is causing your problems, please let us know. This might help others with the same problem.

  • How remove the date and time in image logging vision express

    I use express vision to capture a set number of images with the inline processing. I am opting to save images to a specified folder. However, the file names of the images have the date and time added by default. Is there a way to remove the date and time in the image file name? Help, please.

    Thank you very much. This has been useful. However I found another book about - I renamed it (using the movement vi) slam post files. Still, I would be interested if anyone has a better way to do it.

  • My htomail account has been blocked twice in the past two weeks

    Original title: Please help

    My htomail account has been blocked twice in the past two weeks and nobody is Hotmail. I used my account for a day before he was blocked again. I can't get the email addresses of contact, and I find it very difficult to work around having no email. Why is the Help Center if not useful? Why are there no 'real' people to do something to help their customers? How can I get my account back now?

    Hello

    Answers has no real contact with Hotmail.

    HotMail has its own Forums, so you can ask your questions there.

    Windows Live Solution Center - HotMail - HotMail Forums Solutions
    http://windowslivehelp.com/

    Hotmail - Forums
    http://windowslivehelp.com/forums.aspx?ProductID=1

    Hotmail - Solutions
    http://windowslivehelp.com/solutions.aspx?ProductID=1

    How to contact Windows Live Hotmail Support
    http://email.about.com/od/hotmailtips/Qt/et_hotmail_supp.htm

    Windows Live Hotmail Top issues and Support information
    http://support.Microsoft.com/kb/316659/en-us

    Compromised account - access unauthorized account - how to recover your account
    http://windowslivehelp.com/solution.aspx?SolutionID=6ea0c7b3-1473-4176-b03f-145b951dcb41

    Hotmail hacked? Take these steps
    http://blogs.msdn.com/b/securitytipstalk/archive/2010/07/07/Hotmail-hacked-take-these-steps.aspx

    I hope this helps.

  • I have just re installed Windows XP. Windows installed after three attempts. When I turn on the computer there are three choices of Windows XP. Only the first works how to remove the other two?

    I have just re installed Windows XP. Windows installed after three attempts. When I turn on the computer there are three choices of Windows XP. Only the first works how to remove the other two?

    I have a hard drive. At least two partitions. C: 74.7 GB with 63.3 freespace
    D: 74.2 GB with 70.6 freespace
    These are my original specifications of the hard drive: 160 GB (7200 RPM) SERIAL ATA HARD DRIVE WI
    So I suspect there are at least one or more partitions hidden leaving 11.1 GB for hidden partitions!
    Windows is present on both drives C: & D:. In the directory windows on C:, the oldest entry is 19.12.12, 21.43 last 21.12.12, 22.50
    The first entry in the directory windows on D: is 19.12.12, 18.42 the last 21.12.12, 22.40
    I hope that makes sense to someone, any help gratefully received!

    As long as you have verified you dΘmarrez done on the c: / partition, Yes, you can reformat the drive D: / partition using Windows 'disk management '.

    J W Stuart: http://www.pagestart.com

  • Error "no message from the past two weeks and all old messages over two weeks are lost" trying to open hotmail in the Mail application.

    Title: hotmail is only two weeks

    I just windows 8. Hotmail works very well in desktop mode, but when I use the mail in the application on my hotmail gives me a message "no messages of the past two weeks" and all the messages two weeks are lost.

    I don't see 'Accounts' when I go to the Windows key + C... I went to the settings-> change PC settings and then I have users... but I see no option for Live account or to download the emails?

  • I bought the Adobe Creative Suite master collection over the past two years with my old mac. I bought a new mac, can I continue to use the old serial number? If not, where can I get the serial number?

    I bought the Adobe Creative Suite master collection over the past two years with my old mac. I bought a new mac, can I continue to use the old serial number? If not, where can I get the serial number? Where I am, I guess that contact to?

    Yes, your license allows you to have two facilities activated simultaneously, so if you want to you can have both machines busy and active so that there is a backup should it come in handy.  You can also contact Adobe via chat and ask them to reset your activations so that you have one (or two) released for a new installation.

  • Hi hope someone can help? I have acrobat pro, 6 have worked well for the past two years but then just stopped working. Have reinstalled but still won't open, ronning windows 7. Help please!

    Hi hope someone can help? I have acrobat pro, 6 have worked well for the past two years but then just stopped working. Have reinstalled but still won't open, ronning windows 7. Help please!  Janice

    Hey janicem42177174,

    Adobe does most support the installation and use of Acrobat 6 because it is a very old version that is not compatible with Windows 7.

    I suggest you to please use the latest version of Acrobat 11.0.10 is perfectly compatible with your operating system with its functions and improved functions.

    You can download a free trial version of 30 days of Acrobat from here:

    Download Adobe Acrobat free trial | Acrobat Professional XI

    Let me know how it goes

    Kind regards

    Ana Maria

  • I have an iMac 3.06 GHz with only 4 GB of memory.  During last two weeks, whDurin the past two weeks, when I click on 'Edit', it does not hold the menu drop down.    Need my Mac 'cleansing' and how do I get rid of unnecessary files?

    I have an iMac 3.06 GHz with only 4 GB of memory.  During the last two weeks, when working with documents, buttons on the desktop did not have in the drop down menus.    How can I get rid of unnecessary files and wipe the hard drive?

    Drop down menus stay open at other times? Have you tried another mouse? More information please write an effective communities of Apple support question

  • SOUL renders the video two times

    Hello everyone, I just registered this question which I have not found an answer to yet.

    When I export first pro media and use Adobe Media Encoder, it makes it quite fine, although it takes double the amount of time to do it because it makes twice.

    The progress bar will be at halfway and preview said this is the end of the video, but then the bar continues and the preview shows that it is rendered from the beginning again.

    This started happening a few months ago but I have not got around him so far.

    I've been putting upward with it for now, but if I wanted to export a longer video, I have to wait for it to export twice...

    I hope someone has a solution to this,

    Thank you!

    Two under its weight passes to analyze movement etc. before encoding... so its not really repeat itself.

  • Remove the length of time of the table of contents

    Hello

    I am using Captivate 4.

    We add TOC in our movies and want to remove the length of the table of contents, as shown below:

    time.gif

    I tried to uncheck the checkbox 'Show time' located in the 'skin TOC settings' dialogue, but it did not work.

    Can anyone help?

    Thank you

    Merav.

    Hello

    Do not insert it as a widget, but as an Animation (which is not very clear on the site of Michael). You can simply ignore the warning of _root. It works very well. Sorry I forgot to explain. You need to verify that your PC is AS2, however, it does not work in AS3.

    Lilybiri

  • How can I download apps using iOS iPhone 5 s 10 and a waterproof case (without removing the case each time!)

    I have an iPhone 5 s protected by a waterproof case, secure screw using Allen.

    This command removes the possibility of using the ID of the contact.

    Contact ID is required by the App Store!

    I found a way around locking the screen, but not found how to circumvent App Store

    Have you disabled the following: settings > Touch ID & password > iTunes and App Store?

  • the apps are in the review of the past two weeks

    HII I want to tell you that my more than 50 apps are in the review of the last two... .i did not get any email from the company regarding the approval... .so please help me how long it will take to approve or publish.

    Anurag

    It took them 4-5 weeks to see my apps.

    I had 6 apps, first they arppove 2 and then a few weeks later, they approved a little more.

    Patience.

  • required indicator of password: the password to work, but my password at work changed about 20 times or more during the past two years.

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Hi Pmenard,

    A. your computer is on a domain?

    Have b. you provided no indication of your password?

    If you have forgotten your Windows password and you are on a domain, you must contact your system administrator to reset your password. If you are not on a domain, you can reset your password by using a reset disk of password or by using an administrator account.

    If you forget the administrator password, and you do not have a password reset disk or another administrator account, you will not be able to reset the password. If there is no other user account on the computer, you will not be able to connect to Windows and you will need to re - install Windows.

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-to-do-if-you-forget-your-Windows-password

    Kind regards
    Bindu S - Microsoft Support
    Visit our Microsoft answers feedback Forum and let us know what you think

  • My laptop VAIO from Sony has been constantly crashing for the past two weeks.

    This is the report I received.
    Signature of the problem:
    Problem event name: BlueScreen
    The system version: 6.0.6002.2.2.0.768.3
    Locale ID: 1033
    More information about the problem:
    BCCode: 7A
    BCP1: C0403F50
    BCP2: C0000185
    BCP3: 3807 860
    BCP4: 807EAA9A
    OS version: 6_0_6002
    Service Pack: 2_0
    Product: 768_1
    Files helping to describe the problem:
    C:\Windows\Minidump\Mini062912-02.dmp
    C:\Users\User\AppData\Local\Temp\WER-98389-0.SysData.XML
    C:\Users\User\AppData\Local\Temp\WER5A10.tmp.version.txt
    Can someone please provide a solution to stop windows from blocking down on me in the middle of tasks. I fear that I will lose all my data. Also, I've tried several hard drive and the system checks that Microsoft recommends and no virus could be found. The a hard disk check that went through all the files on my computer took a whole day. I also tried to uninstall Adobe Flash Player because when I upgraded to what it was when the problems started. Also, I had to uninstall Mozilla Firefox. Thanks in advance for all the solutions to my problem.

    Hello

     
    Remember to make changes to the computer before the question?
     
    See the methods mentioned below and check if that helps.
     
    Method 1:
    Check if the problem persists in safe mode.

    Start your computer in safe mode
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    Restart the computer to return to normal mode

    Method 2:

    If the problem does not persist in safe mode, and then try to clean boot and check.
    It is possible that some third-party programs installed on the computer is causing the problem.

    I suggest that you perform a clean boot and check.

    To help resolve the error and other messages, you can start Windows Vista or Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    Check out the link below to learn more about how to clean boot.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135


    Note: After troubleshooting, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

    Method 3:

    How to fix BlueScreen (STOP) errors that cause Windows Vista to shut down or restart unexpectedly
     

    Note: When you perform the system restore to restore the computer to a previous state, programs and updates that you have installed are removed.

    Note: Perform a clean installation erases all data on the hard drive. Please be sure to take a return of any important data before performing a new installation.

    Hope this information helps.

Maybe you are looking for

  • 1801 - Microcode Patch error

    I've updated my Pentium 4 processor, 1500 MHz for Pentium 4, 2400 MHz.  Now, I get the following error on POST. 1801: Microcode Patch error.  Missing or invalid processor Microcode patch.  Please contact Compaq Computer Corporation for a new ROM BIOS

  • microphone is on all the time and feedback

    microphone is on all the time causing speech recognition of feedback is not on

  • error 641 and 80070641

    I think that my windows installer is damaged I looked for error codes and it is said to run fixit and I did. FixIt says it can't find steps and problems, I also used various suggestions online rInstaller windows install but when I try to rename msli.

  • How to speed up the drive mapped persistent unavailable timeout?

    I have a mapped drive on my laptop that is only accessible when I am connected to my work VPN. If I'm not on the VPN or connected to the internet, open "My computer" or by searching for the results equivalent directory in a timeout, two Windows waits

  • HP DV6T; compatible with SATA II or SATA III?

    Hello world I would like to change the HARD drive in my HP DV6T Select Edition, product # XC102AV that I bought in December 2010 for one SSD, possibly the 840 Samsung EVO (2.5 ", either 250 GB or 500 GB SATA III). I was not able to know whether my sy