Autonomous transaction - user updating information through form

Good afternoon,
I have a form that has a database datablock that is populated using a cursor that does a select on 4 tables, being one the most important (table A). When the user is done he commits the changes and the information is saved in table B, the "source" of the datablock.
This generates a concurrency problem: if two users give the same parameters the cursor populates the same information in their respective sessions and the information is saved twice. I want to prevent this, only one person should be allowed to use the information.
I know about autonomous transactions and perhaps this is the best idea: update the status of the row in table A in order to prevent any further uses but i want to check any other solution. Perhaps i could write the user and the time and the second person would get a message: "being used by"
Thanks,

Yes i too have read about autonomous transaction and its very rare usability.
Ok here's the situation:
Table B
code_B (number) PK
code_B1 (number PK
description
selected (Y/N), default N
more fields...
Table A
code_A PK
description
code_B NOT part of PK_A
code_B1 NOT part of PK_A
more fields
step 1: user opens form X and marks some records from table B, setting selected to Y
step 2: User open forms Y and populates block Z (table A) based on a cursor (PL/sql run through a push button) that looks for all the records from B that have selected = Y
step 3: user commits and the form updates table A with new records
this is the normal procedure but sometimes two users open form Y at almost the same time and the both populate the datablock Z with the same info.
I have thought about creating a new hidden datablock in form Y that uses table B, in order to block other users.
and these forms have been like this for years now, i did not create them and the tables have millions of records now...
This was a design flaw, not taking concurrency into account i guess
Many thanks
Edited by: user474437 on Apr 17, 2010 10:38 AM

Similar Messages

  • User Data Security through forms.

    Hi All,
    I am working on a forms(10g) which once deployed in application env. will have different level of accesses to different users , like view,edit,etc.
    could you please let me how to set up this user data security ,and access levels ...
    Is this to be done through forms development , or any environmental setups required?
    Any quick pointers in this regard are highlu appreciated.
    Thnaks.

    Hi,
    you can define your user level on oracle form,but these user only work on form level not on database level direct,you can make a proper setup form or role form to provide access to different user but you must mentioned these security on each transactional form.You also make a global procedure as security which maintain security only on form.Hope it'll helpful for you.
    Thanks
    Baloch.

  • Child forms are not getting displayed when user is linked through the targe

    I have provisioned the users to OID through OIM and we have the three child forms(USRB_ROLB,USRB_GRPD,USRB_NBNB) which work well when the user flow normally. Our normal flow implemented is that user comes from OHCM and get created in OIM and then get provisioned to AD and OID. We have also implemented the OID target recon. When we create the user directly in OID and then create the user through normal flow ie from OHCM to OIM) as expected the create user task fail as the user is already present in the OID (target system). Then after running the OID target recon the user is getting linked but its not showing the child forms in the new process form created after running the target recon.
    Please let me know if you require more information.
    Please let me know if anybody has encountered this issue and the steps to resolve the same

    what happened when you run target recon without creating user in oim(or just create user in oim without access policy and then run target recon)? Is this work fine?
    If no means you have to verify your child table mapping. But if above work then this the Produce/connector issue and may you need to raise SR

  • How to insert last update date and user id to a form?

    Hi,
    I have created a form to enter data to a custom table.
    When a new record is created, I would like to keep track of the creation date, last update date and who (user id) enters the form.
    Can someone please help or point me to a right place to look for this information?
    Thank you!
    LC

    Create four new columns in your table called Created_On, Created_By, Last_Updated_On and Last_Updated_By.
    You can create a trigger to accomplish the rest:
    create or replace trigger "<name of your trigger>"
      before insert or update on "<name of your table>"
      for each row
    begin
      if inserting then
        :NEW.Created_On := sysdate;
        :NEW.Created_By := v('APP_USER');
      end if;
      if updating then
        :NEW.Last_Updated_On := sysdate;
        :NEW.Last_Updated_By := v('APP_USER');
      end if;
    end;Every time you'll add or modify data in that table, the trigger will automatically fill those fields.
    Regards,
    Mathieu

  • Security protocol for collecting personal information through a web form

    Hi,
    Can someone tell me (or direct me to) what the security protocol for collecting personal information through a form is? I have a client asking, and I've tried searching for this information but can't see to find it.
    Thanks,

    Hi Liam,
    I'm looking for some specs on how a users information is encrypted when submitted through a form. My client is having a privacy policy written, and was asking.

  • ORA-00164 Autonomous transaction when creating batch of users

    Hi,
    I ran the script posted earlier in this forum to create a batch of users, I got some errors, support people told me that is appears to be database errors :
    ORA-00164 Autonomous transaction disallowed with distributed transaction.
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL30.WWCTX_SSO", line 669 ORA-06502: PL/SQL: numeric or value error.
    We use 8.1.7.2 database, Portal 3.0.9.8.
    Anyone having a solution for that problem, I don't want to create 250 users manually.
    Thank's

    i'm getting the same thing, but i'm using hardcoded input,
    so i have no dblinks or anything of the sort.
    this is my entire exception line:
    ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL", line 323 ORA-06512: at "SYS.HTP", line 859 ORA-06512: at "SYS.HTP", line 974 ORA-06512: at "SYS.HTP", line 992 ORA-06512: at "SYS.HTP", line 40 ORA-06512: at "PORTAL30_SSO.WWSEC_UI", line 568 ORA-06512: at "PORTAL30_SSO.WWSSO_APP_USER_MGR", line 576 ORA-06512: at line 1
    any idea what is causing this?

  • Update personnel information through tcode PA40

    Any bapi or function module to update personnel information through tcode PA40

    Hi,
    You can Use Function Module "HR_MAINTAIN_MASTERDATA".
    Functionality
    This function module enables you to maintain master data for employees and applicants. You can enter field names and contents in the 'proposed values' table. This will then be transferred to the corresponding infotypes. The same validation checks take place as would in the individual maintenance screens for the infotypes. You can enter as much data as you like. You can enter several records or infotypes at once. You are responsible for making sure that the data is consistent. If necessary, the module returns an error message. The error messages are the same as the those which appear in the dialog, in other words, the individual maintenance screen error messages are transferred rather than interpreted by this module.
    Regards,
    Ajay Jangid

  • Autonomous transactions not seeing posted data

    I want to add a button to a form to call a report. The users want to update data in the form, run the report then decide if the data is to be committed. I can post the changed data but the report doesn't see the posted data as Oracle starts a new session.
    The report performs various calculations and before it is run, the calculations are performed and data extracted to separate tables, the report then runs on the extracted data then the temporary table data is deleted.
    I thought autonomous transactions would be my solution. The data is posted within forms, the form then calls a database procedure which has the autonomous procedure declared, data extracted and committed to the temporary tables within the autonomous transaction (form data stays uncommitted), report runs using the extracted data. User could then decide if the amended data could then be committed to the database.
    The autonomous transaction does not seem to see the posted data. The procedure picks up the data 'pre post'. Any ideas on what I can do to get round this?
    Thanks in advance
    Karen Stalker

    Thanks for all the replies.
    My form that will call the report can call up to 12 other forms with data always posted and never committed until the user is prompted to on leaving the main form, or the user presses the commit key. I liked the idea of writing to a temporary table but the way this application is designed, this would mean a big rewrite of a lot of complicated forms. I would rather leave them alone as they work!!
    I could pass the record groups into the report - this would mean about 15 groups but that shouldn't be a problem except that there are a few child queries which I read can't be done that way. This may be a daft question but can I pass the record groups into the report and the record groups be then used in the after parameter trigger. There I could do all the necessary complications, write to my extract tables and then carry on as normal - i.e. the report gets the data from these extract tables.
    My best solution would be to get the reports and forms to run in the same session but how can I do this? As far as I'm aware, RUN_REPORT_OBJECT starts a new session. Hopefully someone knows how to get them in the same session.
    Thanks again
    Karen

  • Suppress FRM-41050 through Forms Personalization

    I have a view only form wherein the user can view information but cant update. This form gives warning messages FRM-41050 (You cannot update this record) for each record fetched. I am looking to suppress / hide these messages through forms personalization...Can anybody help me or through some ideas on this...thanks in advance

    Hello-
    I am just wondering if you were able to resolve this issue? I am running into the same problem.
    Thanks,
    Amy Bauman

  • Tabbing Through Form Selections

    When making a form, I select radio buttons to force a user to select 1 choice. When tabbing through the selections, often my tab goes to the first choice and no more, but sometimes my tab goes works through the choices. The actual selection is correct, it is an either or, but the tabbing is what bothers me, I want it to work one way or the other - tab through all selections or tab one and move to the next in line in the form. (I even copy/pasted another radio button that was working like most of the others on the form and renamed it to what I wanted but that still did not fix the issue.) Any ideas?

    Are you really still running Firefox 3.6? Since it hasn't received any security updates for nine months, you may be putting yourself at risk.
    In my experience, tabbing through forms works just fine. Have you tested in Firefox's Safe Mode to see whether the problem is caused by a custom setting or add-on.
    First, I recommend backing up your Firefox settings in case something goes wrong. See [https://support.mozilla.org/en-US/kb/Backing+up+your+information Backing up your information]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, restart Firefox in [http://support.mozilla.org/kb/Safe+Mode Safe Mode] by holding the Shift key when you double-click the program icon.
    In the Safe Mode dialog, do not check any boxes, just click "Continue in Safe Mode."
    If tabbing works correctly, this points to an add-on or custom setting as the most likely cause of the problem.

  • Autonomous Transactions and table locks

    Does a commit statement in an Autonomous Transaction block in PL/SQL release locks aquired in the master transaction block?
    e.g
    CREATE OR REPLACE PACKAGE test_auto_trans AS
    PROCEDURE mainproc;
    PROCEDURE testproc;
    END test_auto_trans;
    CREATE OR REPLACE PACKAGE BODY test_auto_trans AS
    /*****************Main Procedure*********************/
    PROCEDURE mainproc AS
    BEGIN
    LOCK TABLE a,b,c IN EXCLUSIVE MODE nowait;
    /*some processing involving tables a,b,c here. no commit done yet*/
    testproc();
    /* will the locks on a,b,c still be available here? */
    EXCEPTION
    WHEN others THEN
    dbms_output.put_line('Error');
    dbms_output.put_line(sqlcode);
    dbms_output.put_line(sqlerrm);
    RAISE;
    END mainproc;
    /*****************test Procedure*********************/
    PROCEDURE testproc AS
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    /*some processing using tables a,b,c here*/
    commit;
    EXCEPTION
    WHEN others THEN
    dbms_output.put_line('Error');
    dbms_output.put_line(sqlcode);
    dbms_output.put_line(sqlerrm);
    RAISE;
    END testproc;
    END test_auto_trans;
    /

    No transaction will release the locks held by another transaction. When you declare a stored proc to be PRAGMA AUTONOMOUS_TRANSACTION, it is essentially the same as if you logged in as the same user but in a different session.
    For example, if I have two sqlplus sessions running as user a, if I do an update in session1 and a delete and commit in session 2 I can still rollback in session 1.
    However, your psuedo code as posted will not work at all since the call to test_proc will block until you commit in the main proc, and since test_proc will never return, the main proc will never get to commit. It is exactly analogous to the following:
    session1> SELECT * FROM t;
            ID DESCR
             1 One
             2 Two
    session1> LOCK TABLE t IN EXCLUSIVE MODE nowait;
    Table(s) Locked.
    session1> UPDATE t SET descr = 'Un'
      2  WHERE id = 1;
    1 row updated.so far, this is your main proc. Now, in another session (which is equivalent to your autonomous transaction procedure), I do:
    session2> UPDATE t SET descr = 'Deux'
      2  WHERE id = 2;which as I type is still waiting on the commit from session 1. Therefore, I cannot get to commit the autonomous transaction which would return control to session1
    HTH
    John
    Message was edited by:
    John Spencer
    Sorry, I initially forgot to answer your actual question "what about DML statements like truncate". Since TRUNCATE is actually a DDL statement I will assume that is what you meant. My initial answer covers DML statements (except SELECT which will work).
    All DDL statements in Oracle go
    COMMIT
    DDL statement
    COMMIT
    since the initial commit requires a very brief exclusive lock, you will get an error like:
    ORA-00054: resource busy and acquire with NOWAIT specified
    Exactly as if you did:
    session1> LOCK TABLE t IN EXCLUSIVE MODE nowait;
    Table(s) Locked.then tried to do it again the another session
    session2> LOCK TABLE t IN EXCLUSIVE MODE nowait;
    LOCK TABLE t IN EXCLUSIVE MODE nowait
    ERROR at line 1:
    ORA-00054: resource busy and acquire with NOWAIT specified

  • Tabbing through form fields in app doesn't work in Firefox.

    Is there a setting in Firefox that permits tabbing through form fields so that one doesn't have to use the mouse? This works fine in IE. for the same app without any configuration, but not in Firefox.

    Are you really still running Firefox 3.6? Since it hasn't received any security updates for nine months, you may be putting yourself at risk.
    In my experience, tabbing through forms works just fine. Have you tested in Firefox's Safe Mode to see whether the problem is caused by a custom setting or add-on.
    First, I recommend backing up your Firefox settings in case something goes wrong. See [https://support.mozilla.org/en-US/kb/Backing+up+your+information Backing up your information]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, restart Firefox in [http://support.mozilla.org/kb/Safe+Mode Safe Mode] by holding the Shift key when you double-click the program icon.
    In the Safe Mode dialog, do not check any boxes, just click "Continue in Safe Mode."
    If tabbing works correctly, this points to an add-on or custom setting as the most likely cause of the problem.

  • After releasing the order same screen user updating the quantity in process order  in sap pp

    Hi experts,
    After releasing the order in the same screen user updating the quantity in process order  in sap pp.
    How to control it.
    can any help in this regards
    Thanking you,
    Rishit.

    Hi Rishit,
    You can control it by BAdi WORKORDER_UPDATE method AT_SAVE make error message if there is any change in quantity.
    Or you can create Transaction Variant through SHD0 for CO02 and make field Total Qty (CAUFVD-GAMNG) as output only.
    Regards,
    R.Brahmankar

  • Autonomous Transactions usage in PL/SQL anonymous block coding

    Hi,
    I am trying to incorporate Autonomous Transaction for our work. I am using the tables provided below,
    CREATE TABLE T1
    F1 INTEGER,
    F2 INTEGER
    CREATE TABLE T2
    F1 INTEGER,
    F2 INTEGER
    insert into t1(f1, f2)
    values(20, 0)
    insert into t2(f1, f2)
    values(10, 0)
    Now, when I use the code snippet given below, it is working as expected.
    create or replace procedure p1 as
    PRAGMA AUTONOMOUS_TRANSACTION;
    begin
         update t2
         set f2 = 25
         where f1 = 10;
         commit;
    end;
    declare
    PRAGMA AUTONOMOUS_TRANSACTION;
    a integer;
    begin
         update t1
         set f2 = 15
         where f1 = 20;
         p1();
         rollback;
    end;
    Here, updation in t2 table is commited and t1 is rolled back, it is working as
    expected. I would like to achieve the same functionality through PL/SQL
    anonymous block coding, to do this, I use the following code snippet,
    declare
    PRAGMA AUTONOMOUS_TRANSACTION;
    a integer;
    begin
         update t1
         set f2 = 15
         where f1 = 20;
         begin
              update t2
              set f2 = 35
              where f1 = 10;
              commit;
         end;
         rollback;
    end;
    Here, data in both the tables are commited, how do I change it to work as I
    mentioned above like committing t2 alone, please help, thank you.
    Regards,
    Deva

    Can you explain what you're trying to accomplish from a business perspective? This doesn't look like a particularly appropriate way to use autonomous transactions, so you may be causing yourself problems down the line.
    That said, padders's solution does appear to work for me
    SCOTT @ nx102 Local> CREATE TABLE T1
      2  (
      3  F1 INTEGER,
      4  F2 INTEGER
      5  )
      6  /
    Table created.
    Elapsed: 00:00:01.03
    SCOTT @ nx102 Local>
    SCOTT @ nx102 Local>
    SCOTT @ nx102 Local> CREATE TABLE T2
      2  (
      3  F1 INTEGER,
      4  F2 INTEGER
      5  )
      6  /
    Table created.
    Elapsed: 00:00:00.00
    SCOTT @ nx102 Local>
    SCOTT @ nx102 Local> insert into t1(f1, f2)
      2  values(20, 0)
      3  /
    1 row created.
    Elapsed: 00:00:00.01
    SCOTT @ nx102 Local>
    SCOTT @ nx102 Local> insert into t2(f1, f2)
      2  values(10, 0)
      3  /
    1 row created.
    Elapsed: 00:00:00.01
    SCOTT @ nx102 Local> commit;
    Commit complete.
    Elapsed: 00:00:00.01
    SCOTT @ nx102 Local> DECLARE
      2     a INTEGER;
      3 
      4     PROCEDURE update_t2
      5     IS
      6        PRAGMA AUTONOMOUS_TRANSACTION;
      7     BEGIN
      8        UPDATE t2
      9           SET f2 = 35
    10         WHERE f1 = 10;
    11 
    12        COMMIT;
    13     END update_t2;
    14  BEGIN
    15     UPDATE t1
    16        SET f2 = 15
    17      WHERE f1 = 20;
    18    
    19     update_t2;
    20 
    21     ROLLBACK;
    22  END;
    23  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.04Have you done something else that would cause a deadlock?
    Justin

  • USER UPDATE가 안되는 문제 ORA-20001 ORA-06512

    제품 : AOL
    작성날짜 : 2002-11-29
    USER UPDATE가 안되는 문제 ORA-20001 ORA-06512
    =======================================
    PURPOSE
    Problem Description
    SQL> exec fnd_user_pkg.UpdateUser('LGESSO','SEED', 'lgesso2');
    BEGIN fnd_user_pkg.UpdateUser('LGESSO','SEED', 'lgesso2'); END;
    ERROR at line 1:
    ORA-20001: Unabled to change password for user LGESSO for this following
    reason:
    Password was not changed.
    ORA-06512: at "APPS.APP_EXCEPTION", line 51
    ORA-06512: at "APPS.FND_USER_PKG", line 350
    ORA-06512: at line 1
    Workaround
    patch 2426407를 적용해야 한다.
    Solution Description
    FND_USER_PKG.UpdateUser가 유저의 패스워드를 바꿀때 fail이 나는 문제이다.다음과 같은 에러가 난다:
    ERROR at line 1:
    ORA-20001: Unabled to change password for user JFROST for this following
    reason:
    Password was not changed.
    ORA-06512: at "APPS.APP_EXCEPTION", line 51
    ORA-06512: at "APPS.FND_USER_PKG", line 348
    ORA-06512: at line 1
    This is due to a change in FND_WEB_SEC.change_password being defined with a
    pragma of autonomous transaction.
    FND_USER_PKG.UpdateUser calls FND_WEB_SEC.change_password to change a user's
    password.
    Reference Documents
    -------------------

    DBA2008 wrote:
    i disable the trigger messing up tivoli user,& i am able to login fine, wondering if i enable it back it will do the same?If you keep doing the same thing, you can expect the same results.
    Perhaps you should analyze the trigger to figure out
    1) what it was supposed to be doing that is not being done since you disabled it
    2) why it was throwing the error . . .

Maybe you are looking for

  • How to create editable .mov files from After Effects

    Hi, I am creating videos for my clients using after effects. The requirment is that they should be able to edit the .mov files e.g adding their company name, text or logo without using after effects without losing any effects. How can I accomplish th

  • IPhone automatically shuts down.

    My iPhone is currently updated to 4.3.5 but i have this problem that when ever i use an app at battery percentage of below 80%, my iPhone will automatically shut down and display the no battery sign. But after about 5mins when i start my iphone again

  • Page and Tab Security

    Hi This is probably a very basic issue and shows my lack of experience with the product. I have a number of tabs across a page. One of the tabs I need to control so that only certain users will have access to it. I have set Item level security for th

  • Switch view to horizontal

    Switch view of iTouch to hornzontal

  • Drill down  with all other records

    Hi, All how can I see all other records after drilling down but not only record wich i drilled into? i mean drilling like it works in Discoverer or in other words i'd like some records to be expanded and all other collapsed. Does anybody know whether