Select for update no wait polling strategy for an esb process

I have an esb process which currently uses 'logicaldeletepolling strategy'.
I need to change it to use the 'select for update no wait' distributed polling strategy.
What steps do I need to perform on the existing process ?

What do you mean by
same record is opened Do you mean, queried by another form? This is not possible.... other session can always query a table (with approp privs)
You are confusing me....
1) you update DEPT using a form (not clear which one - but it is irrelevant)
2) Another form is querying the DEPT table and you want to know this? Why? What do you care?
If you are worried about a lost update, don't... Forms takes care of this

Similar Messages

  • Select for update no wait distributed polling strategy

    I have an esb process which currently uses 'logicaldeletepolling strategy'.
    I need to change it to use the 'select for update no wait' distributed polling strategy.
    What steps do I need to perform on the existing process ?

    Hi,
    Try: http://download-east.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_db.htm#sthref558 (Oracle® Application Server Adapters for Files, FTP, Databases, and Enterprise Messaging User's Guide
    10g Release 3 (10.1.3.1.0)
    Part Number B28994-02).
    Also you can reconfigure DB adapter (I think this's the best way): laucnch adapter configuration wizard in JDev and at step 9 (adapter options) check distributed polling checkbox (query now contains for update clause).

  • Hi Select for update no wait

    Hi All
    please anybody help me with an ex of select for update no wait.
    my requirement is i want to update one table , before updating i want to know is that table is using by some other.

    What do you mean by
    same record is opened Do you mean, queried by another form? This is not possible.... other session can always query a table (with approp privs)
    You are confusing me....
    1) you update DEPT using a form (not clear which one - but it is irrelevant)
    2) Another form is querying the DEPT table and you want to know this? Why? What do you care?
    If you are worried about a lost update, don't... Forms takes care of this

  • Oracle for update no wait

    Hi All..
    Can any one pls tell me in which case we need to use for update no wait in cursors.
    my understanding is for enable locks on top of records selected by cursor using for update.
    but dont have knowlodge on NOWAIT clause.Can any one pls tell me in which case exactly we have to use nowait clause .
    Thanks in advance,
    Sanjeev.

    Hi Sanejev,
    There are 3 choices
    1. NOWAIT, You will set this, if you don't want to wait for the locks.
    Enough if 1 row is not available for you, you will get a ORA-54.
    2. You can wait up to 'n' seconds. after 'n' seconds you haven't got the rows
    you will get an ORA-30006.
    3. New feature - offically- in Oracle 11g! SKIP LOCKED!
    Sometimes is good for us that we TRY to lock all the rows, but no problem if there are some rows
    which are available for us.
    In this case we modify all availabe rows the remaining will be skipped.
    Later - maybe- we try to repeat our process for the remaining rows.
    Of course, we mark our modified rows somehow(for example with flag)
    Note that this feature is available in Oracle 10g( unofficially)!
    Best regards
    Laszlo
    (SQL and PL/SQL trainer in Hungary)

  • When checking for updates on ipad the checking for update message shows continuiously

    When trying to get updates on Ipad the checking for updates continually is shown

    BHI00 wrote:
    Thanks -  I would rather not upgrade to snow leopard.  Is there a way to revert from IOS 7.0?
    What year, screen size, CPU speed and amount of RAM installed?
    Why not upgrade to Snow Leopard, if you can?
    NO. There is no way to downgrade your iPhone OS back to iOS6. Apple makes downgrades of their mobile OS not possible.
    If you can, the only thing you can do is upgrade your Mac's OS X operating system.
    Sorry,

  • Alternate for Update Stastics(Oracle) in DB2 for SAP instance

    Hi,
    We have installed SAP on DB2 database. Can any one tell me alternate of Update Stastics (Oracle based SAP system) in DB2.
    Some one suggested me that it is RUNSTAT but I do't know the process and when it should run.
    Thanks
    Lokendra Kumar

    Hi,
    In DB13 you will find job action Update Statistics + Reorgcheck all tables for DB2.
    If Automatic RUNSTATS is activated then its not required to schedule this job in DB13. If Automatic RUNSTATS is not activated in your Database, then you should have to schedule this Job in DB13.
    Refer [SAP Note 434495 - DB6: Maintaining table statistics via transaction DB13|https://service.sap.com/sap/support/notes/434495] to get more detailed information.
    Regards,
    Bhavik G. Shroff

  • Firefox opens up "you are updated to newest firefox version" page every time i start. Does the same for for updated extensions. Also checks for add-on compatibility everytime i start. Please help me.

    Everytime i start Firefox (version 9.0.1 -release version) it checks for compatibility with the add-ons just as if i just installed firefox. It also opens up "you have successfully updated to the latest version" pages for firefox (and extensions. ie flashgot and downloadhelper). My homepage was always blank and firefox was always set to load the pages from the last session. A similar issue was covered in this support but that solution (setting the homepage to default) didnt help me.

    Hi meric07,
    You should look at [https://support.mozilla.com/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox this article about that specific issue] and the article [http://kb.mozillazine.org/Preferences_not_saved Preferences not saved]. These should give you all the information you need!
    If that doesn't work:
    # Type about:config in the address bar
    # Click ''I'll be careful, I promise'' if prompted
    # In the Filter input field type ''startup''
    # Double click on startup.homepage_override_url
    # Delete the text string and click ''OK''
    # Close Firefox and reopen the window to verify that it has worked.
    Hopefully this helps!

  • Latest itunes takes me to my computers library when clicking on 'chech for updates' to get iOS 6 for ipod touch!

    any whiz kids out there!

    Confirm that you have a 4G iPod Touch as iOS 6 is not compatible with earlier generation iPod Touch models.
    Identifying iPod models
    B-rock

  • Database select for update locks ADF

    Hi,
    When a user has initiated an update session in an adf application and locking is optimistic it will acquire a lock on table row using select for update no wait; . But when the user closes a tab the session would not be terminated. Now i know as HTTP is a stateless protocol, we can wait for the timeout and then the lock will be released using a session listener implementation. But if the user instead tries to log in again in a new tab and tries to edit the same record he will receive a message stating that another user already holds a lock on the record which is correct, but is misleading.
    So can we rely on javascript for these scenarios that as soon as the user closes the tab the session should be terminated.
    Here's a snippet
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" ></script>
    <script type="text/javascript">
    var unLoad = function() {
        dojo.io.script.get({
        url:'http://127.0.0.1:7101/myapp/adfAuthentication?logout=true',
        timeout:15000,
      dojo.addOnWindowUnload(unLoad);
    </script>I know this might not work always as it depends on the fact that request might / might not be processed by the server.
    Are there any alternate solutions and also reducing the session timeout is ruled out in my scenario.

    Ramandeep,
    So are there other alternatives or solutionsAlternatives or solutions to what, exactly? As Jobinesh has told you, as long as you use optimistic locking, ADF doesn't acquire database locks except in the context of a transaction that is going to be completed in the current HTTP request. You could obviously force ADF to deviate from this if you called "postChanges" during an HTTP request and leave the transaction hanging, but that would just be wrong in an optimistic locking scenario - the solution would be "don't do that."
    John

  • Select for update gives wrong results. Is it a bug?

    Hi,
    Select for update gives wrong results. Is it a bug?
    CREATE TABLE TaxIds
    TaxId NUMBER(6) NOT NULL,
    LocationId NUMBER(3) NOT NULL,
    Status NUMBER(1)
    PARTITION BY LIST (LocationId)
    PARTITION P111 VALUES (111),
    PARTITION P222 VALUES (222),
    PARTITION P333 VALUES (333)
    ALTER TABLE TaxIds ADD ( CONSTRAINT PK_TaxIds PRIMARY KEY (TaxId));
    CREATE INDEX NI_TaxIdsStatus ON TaxIds ( NVL(Status,0) ) LOCAL;
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100101, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100102, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100103, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100104, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200101, 222, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200102, 222, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200103, 222, NULL);
    --Session_1 return TAXID=100101
    select TAXID from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_2 waits commit
    select TAXID from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_1
    update TAXIDS set STATUS=1 Where TaxId=100101;
    commit;
    --Session_2 return 100101 opps!?
    --Session_1 return TAXID=100102
    select TAXID, STATUS from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_2 waits commit
    select TAXID, STATUS from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_1
    update TAXIDS set STATUS=1 Where TaxId=100102;
    commit;
    --Session_2 return 100103                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    This is a bug. Got to be a bug.
    This should be nothing to do with indeterminate results from ROWNUM, and nothing to do with read consistency at the point of statement start time in session2., surely.
    Session 2 should never return 100101 once the lock from session 1 is released.
    The SELECT FOR UPDATE should restart and 100101 should not be selected as it does not meet the criteria of the select.
    A statement restart should ensure this.
    A number of demos highlight this.
    Firstly, recall the original observation in the original test case.
    Setup
    SQL> DROP TABLE taxids;
    Table dropped.
    SQL> 
    SQL> CREATE TABLE TaxIds
      2  (TaxId NUMBER(6) NOT NULL,
      3   LocationId NUMBER(3) NOT NULL,
      4   Status NUMBER(1))
      5  PARTITION BY LIST (LocationId)
      6  (PARTITION P111 VALUES (111),
      7   PARTITION P222 VALUES (222),
      8   PARTITION P333 VALUES (333));
    Table created.
    SQL>
    SQL> ALTER TABLE TaxIds ADD ( CONSTRAINT PK_TaxIds PRIMARY KEY (TaxId));
    Table altered.
    SQL>
    SQL> CREATE INDEX NI_TaxIdsStatus ON TaxIds ( NVL(Status,0) ) LOCAL;
    Index created.
    SQL>
    SQL>
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100101, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100102, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100103, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100104, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200101, 222, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200102, 222, NULL);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> Original observation:
    Session1>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100101
    Session1>
    --> Session 2 with same statement hangs until
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> At which point, Session 2 returns
    Session2>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100101
    Session2>There's no way that session 2 should have returned 100101. That is the point of FOR UPDATE. It completely reintroduces the lost UPDATE scenario.
    Secondly, what happens if we drop the index.
    Let's reset the data and drop the index:
    Session1>UPDATE taxids SET status=0 where taxid=100101;
    1 row updated.
    Session1>commit;
    Commit complete.
    Session1>drop index NI_TaxIdsStatus;
    Index dropped.
    Session1>Then try again:
    Session1>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100101
    Session1>
    --> Session 2 hangs again until
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> At which point in session 2:
    Session2>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100102
    Session2>Proves nothing, Non-deterministic ROWNUM you say.
    Then let's reset, recreate the index and explicity ask then for row 100101.
    It should give the same result as the ROWNUM query without any doubts over the ROWNUM, etc.
    If the original behaviour was correct, session 2 should also be able to get 100101:
    Session1>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    taxid         = 100101
      6  FOR UPDATE;
         TAXID
        100101
    Session1>
    --> same statement hangs in session 2 until
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> so session 2 stops being blocked and:
    Session2>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    taxid         = 100101
      6  FOR UPDATE;
    no rows selected
    Session2>Of course, this is how it should happen, surely?
    Just to double check, let's reintroduce ROWNUM but force the order by to show it's not about read consistency at the start of the statement - restart should prevent it.
    (reset, then)
    Session1> select t.taxid
      2   from
      3    (select taxid, rowid rd
      4      from   taxids
      5      where  locationid = 111
      6      and    nvl(status,0) = 0
      7      order by taxid) x
      8   ,  taxids t
      9   where t.rowid = x.rd
    10   and   rownum = 1
    11   for update of t.status;
         TAXID
        100101
    Session1>
    --> Yes, session 2 hangs until...
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> and then
    Session2> select t.taxid
      2   from
      3    (select taxid, rowid rd
      4      from   taxids
      5      where  locationid = 111
      6      and    nvl(status,0) = 0
      7      order by taxid) x
      8   ,  taxids t
      9   where t.rowid = x.rd
    10   and   rownum = 1
    11   for update of t.status;
         TAXID
        100102
    Session2>Session 2 should never be allowed to get 100101 once the lock is released.
    This is a bug.
    The worrying thing is that I can reproduce in 9.2.0.8 and 11.2.0.2.

  • "SELECT .. FOR UPDATE" lock event

    Hi All,
    The application will send "SELECT .. FOR UPDATE" statement when end-user click one module on screen.
    Now the system have many end-user need to use this module more than before and elapsed time is 15 seconds per session if have 10 sessions click this module that mean the maximum locked time is 150 seconds (15*10) and source code cannot change.
    My question is which oracle parameter can control about lock timeout in this case or not?
    I tried to check all parameter about lock and timeout of oracle parameter that cannot to solve it but I may missing something.
    Thansks
    Hiko

    taohiko wrote:
    Hi All,
    The application will send "SELECT .. FOR UPDATE" statement when end-user click one module on screen.
    Now the system have many end-user need to use this module more than before and elapsed time is 15 seconds per session if have 10 sessions click this module that mean the maximum locked time is 150 seconds (15*10) and source code cannot change.
    My question is which oracle parameter can control about lock timeout in this case or not?
    I tried to check all parameter about lock and timeout of oracle parameter that cannot to solve it but I may missing something.
    Thansks
    Hikohttp://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/static.htm#LNPLS603
    By default, the SELECT FOR UPDATE statement waits until the requested row lock is acquired. To change this behavior, use the NOWAIT, WAIT, or SKIP LOCKED clause of the SELECT FOR UPDATE statement.
    If you are adamant as you say that the application cannot be changed (almost never a truthful statement) ... then you are out of luck.

  • When I select "plugin check" for updates, I have received a "try again later" error message for the last three days.

    for the last few days, I've been experiencing long pauses or crashes while viewing a movie or clip using adobe flash. i've had no update requests for flash from auto updates. so my next thought was the flash plugin. however i'm not able to get the plugin updater to work. i get the error message listed above.

    2 links for Plugin Check. Both are working for me on my XP system with Firefox 3.6.13.
    *https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *https://www.mozilla.com/en-US/plugincheck/
    You must have JavaScript on (Tools > Contents, check "Enable JavaScript")
    If you use NoScript, you must allow (or temporarily allow):
    *on the first link, '''''mozilla.com'''''
    *on the second link, '''''mozilla.com''''' <u>and</u> '''''mozilla.org'''''
    <br />
    '''Other issues that need your attention'''
    The information submitted with your question indicates that you have out of date plugins with known security and stability issues that should be updated. To see the plugins submitted with your question, click "More system details..." to the right of your original question post. You can also see your plugins from the Firefox menu, Tools > Add-ons > Plugins.
    *Adobe Shockwave for Director Netscape plug-in, version 11.5
    *Adobe PDF Plug-In For Firefox and Netscape "9.4.0"
    **New Adobe Reader X (version 10) with Protected Mode was released 2010-11-19
    **See: http://www.securityweek.com/adobe-releases-acrobat-reader-x-protected-mode
    **'''''Security update for versions 9 and 10 of Adobe Reader released 2011-02-08'''''
    *Java Plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)
    **Firefox 3.6+ requires at least version 1.6.0_10
    **16 updates behind
    **You may want to remove the old version before installing the new version; link to removal instructions below
    #'''Check your plugin versions''': http://www.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #'''Update Shockwave for Director'''
    #*NOTE: this is not the same as Shockwave Flash; this installs the Shockwave Player.
    #*Use Firefox to download and SAVE the installer to your hard drive from the link in the article below (Desktop is a good place so you can find it).
    #*When the download is complete, exit Firefox (File > Exit)
    #*locate and double-click in the installer you just downloaded, let the install complete.
    #*Restart Firefox and check your plugins again.
    #*'''<u>Download link and more information</u>''': http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox
    #'''Update Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**Use the links below to avoid getting the troublesome "getplus" Adobe Download Manager and other "extras" you may not want
    #**Use Firefox to download and SAVE the installer to your hard drive from the appropriate link below
    #**Click "Save to File"; save to your Desktop (so you can find it)
    #**After download completes, close Firefox
    #**Click the installer you just downloaded and allow the install to continue
    #***Note: Vista and Win7 users may need to right-click the installer and choose "Run as Administrator"
    #**'''<u>Download link</u>''': ftp://ftp.adobe.com/pub/adobe/reader/
    #***Choose your OS
    #***Choose the latest #.x version (example 9.x, for version 9)
    #***Choose the highest number version listed
    #****NOTE: 10.x is the new Adobe Reader X (Windows and Mac only as of this posting)
    #***Choose your language
    #***Download the file, SAVE it to your hard drive, when complete, close Firefox, click on the installer you just downloaded and let it install.
    #***Windows: choose the .exe file; Mac: choose the .dmg file
    #*Using either of the links below will force you to install the "getPlus" Adobe Download Manager. Also be sure to uncheck the McAfee Scanner if you do not want the link forcibly installed on your desktop
    #**''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #**Also see: https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox (do not use the link on this page for downloading; you may get the troublesome "getplus" Adobe Download Manager (Adobe DLM) and other "extras")
    #*After the installation, start Firefox and check your version again.
    #'''Update the [[Java]] plugin''' to the latest version.
    #*Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)
    #*Also see "Manual Update" in this article to update from the Java Control Panel in Windows Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org
    #*Java Test: http://www.java.com/en/download/help/testvm.xml

  • Last Update Polling Strategy Sets Incorrect Time

    Hi,
    I've created a BPEL process with a database adapter that uses a timestamp polling strategy. The BPEL process picks up table rows that are newer than the last update timestamp. However, the last updated timestamp that is set in the control table is set to the beginning of the current day and not the the last updated timestamp of the row that got changed. For example, if the BPEL process runs today with the last update of 2006-09-20 10:59:00.0 in the table being queried it will update the same field in the control table with 2006-09-20 00:00:00.0
    Can someone suggest why this is happening? And how to resolve?
    Cheers,
    Aashish
    PS - The database resides on a server that is two hours ahead of the application server. I don't believe this is an issue because the dates are all database specific and no dates are extracted from the application server...unless I'm wrong somewhere.

    To add to this earlier note. I can get this to work with the olite database connection, but not Oracle (JDBC) thin driver. Should I be using the Type 2 OCI driver? If so, what should I use?

  • How to update data when primary key is set through for update cursor

    Dear friends,
    I have tried to update data in the table through forms using cursor for update and i have given the plsql i have used please help me where i do mistake.
    DECLARE CURSOR EMP IS
    SELECT EMPNO,EMPNAME,FATHERNAME,COMMUNITY,SEX,BILLUNIT,BIRTHDATE,RLYJOINDATE,RETIREMENTDATE
    FROM PRMAEMP WHERE BILLUNIT=:CTRL.BILLUNIT AND SERVICESTATUS='SR'ORDER BY DESIGCODE,SCALECODE
    FOR UPDATE;
    BEGIN
    GO_BLOCK('EMP_DETAILS');
    SYNCHRONIZE;
    FOR I IN EMP
    LOOP
    I.BILLUNIT:=:EMP_DETAILS.BILLUNIT;     
    I.EMPNO:=:EMPNO;
    I.EMPNAME:=:EMPNAME;
    I.FATHERNAME:=:FATHERNAME;
    I.COMMUNITY:=:COMMUNITY;
    I.SEX:=:SEX;
    I.BIRTHDATE:=:BIRTHDATE;
    I.RLYJOINDATE:=:RLYJOINDATE;
    I.RETIREMENTDATE:=:RETIREMENTDATE;
    DOWN;
    END LOOP;
    COMMIT;
    END;
    your help is needed immediately

    DECLARE CURSOR ABC IS
       SELECT EMPNO,
              EMPNAME,
              FATHERNAME,
              COMMUNITY,
              SEX,
              BILLUNIT,
              BIRTHDATE,
              RLYJOINDATE,
              RETIREMENTDATE
    FROM PRMAEMP
    WHERE BILLUNIT=:CTRL.BILLUNIT
    AND SERVICESTATUS='SR'
    ORDER BY DESIGCODE,SCALECODE
    FOR UPDATE OF COMMUNITY;
    V_EMPNO           PRMAEMP.EMPNO%TYPE;
    V_EMPNAME         PRMAEMP.EMPNAME%TYPE;
    V_FATHERNAME      PRMAEMP.FATHERNAME%TYPE;
    V_COMMUNITY       PRMAEMP.COMMUNITY%TYPE;
    V_SEX             PRMAEMP.SEX%TYPE;
    V_BILLUNIT        PRMAEMP.BILLUNIT%TYPE;
    V_BIRTHDATE       PRMAEMP.BIRTHDATE%TYPE;
    V_RLYJOINDATE     PRMAEMP.RLYJOINDATE%TYPE;
    V_RETIREMENTDATE  PRMAEMP.RETIREMENTDATE%TYPE;
    BEGIN
       GO_BLOCK('EMP');
       SYNCHRONIZE;
       OPEN ABC;
       LOOP
          FETCH ABC INTO .... /*yOU NEED TO MENTION YOUR VARIABLES HERE*/;
          UPDATE PRMAEMP
          SET BILLUNIT= :EMP.BILLUNIT,
              EMPNO= :EMPNO,
              EMPNAME= :EMPNAME,
              FATHERNAME= :FATHERNAME,
              COMMUNITY= :COMMUNITY,
              SEX= :SEX,
              BIRTHDATE= :BIRTHDATE,
              RLYJOINDATE= :RLYJOINDATE,
              RETIREMENTDATE= :RETIREMENTDATE
          WHERE CURRENT OF ABC;
          EXIT WHEN ABC%NOTFOUND;
       END LOOP;
       CLOSE ABC;
    END;
    COMMIT;
    END;Cheers
    Sarma.

  • Best practice for update/insert on existing/non existing rows

    Hello,
    In an application I want to check if a row exists and if yes I want to update the row and if not I want to insert the row.
    Currently I have something like this:
    begin
    select *
    into v_ps_abcana
    from ps_abcana
    where typ = p_typ
    and bsw_nr = p_bsw_nr
    and datum = v_akt_date
    for update;
    exception
    when no_data_found then
    v_update := false;
    when others then
    raise e_error_return;
    end;
    if v_update = false
    then
    /* insert new row */
    else
    /* update locked row */
    end if;
    The problem is that the FOR UPDATE lock has no effect for inserts. So if another session executes this part exactly the same time then there will be two rows inserted.
    What is the best way to avoid this?

    for me the 1st solution is the most efficient one.
    in your 2nd solution it seems to me that you're gonna create a dummy table that will serve as a traffic cop. well that possible but not the proper and clean approach for your requirement. you're absolutely complicating your life where in fact Oracle can do it all for you.
    First thing that you have to consider is your database design. This should somehow corresponds to the business rule and don't just let the program to do it on that level leaving the database vulnerable to data integrity issue such as direct data access. In your particular example, there's no way you can assure that there'll be no duplicate records in the table.
    this is just an advice when designing solution: Don't use a "Mickey Mouse" approach on your design!

Maybe you are looking for

  • Finder issues when copying large amount of files to external drive

    When copying large amount of data over firewire 800, finder gives me an error that a file is in use and locks the drive up. I have to force eject. When I reopen the drive, there are a bunch of 0kb files sitting in the directory that did not get copie

  • Can I use my Photoshop Elements 7 if I bought it unregistered from another person?

    Hello. I am having a question that fusses me lately. I just bought a Photoshop Elements 7 license from someone a few days ago. The person had won the software at a contest, at least that's what he told me, and never used the program. I installed it a

  • Summary report details

    How can I get the comments, suggestions in my form to show in the summary report?

  • Equality between primitive and persistent objects

    Folks, I have discovered by chance that the KODO Query implementation allows me to test for equality between an Integer and a persistent object. This is actually phenomenally useful because it allows me to easily work around some really inefficient a

  • Services and HR

    We have a requirement where we need to assign a personnel no. to a particular service. We are doing this thru ML10. In the HR Master Data I have maintained the basic infotypes and also IT0315. When we try to assign a personnel No. to a particular ser