MO_GLOBAL. SET_ORG_ACCESS be pragma autonomous trxn

Hello
I was going through the body of MO_GLOBAL package. I could understand how SET_POLICY_CONTEXT, INIT, works etc and how they put the g_access_mode, g_current_org_id etc. But my question is on MO_GLOBAL. SET_ORG_ACCESS which is used to set the access mode to M.

Seems MO_GLOBAL. SET_ORG_ACCESS is pragma autonomous Transaction. So how is he submissive for MO_GLOBAL. SET_ORG_ACCESS to set the access mode etc. of the session it is called from? However other procedures of the viz SET_POLICY_CONTEXT, INIT etc package are not Pragma autonomous Trxn.

My question is... Suppose that I am connected to an Oracle session and from there I run MO_GLOBAL. SET_ORG_ACCESS (null, 2062, 'AR'). MO_GLOBAL. SET_ORG_ACCESS transaction autonomous pragma how it can set session variables for the session where I am connected?

Please through little light to make my best understand.

SB:-when a call of function/procedure/session a procedure autonomous trxn, will be two calls and called sharing the same session blocks? I thought that they both have different sessions.

Thank you

Clause autonomous transaction will launch an independent transaction, no new session as a test case below.

DECLARE
PROCEDURE A.
AS
pragma autonomous_transaction;
BEGIN
dbms_output.put_line (' autonomous transaction within my session id ' | sys_context ('USERENV', 'SID'));
ROLLBACK;
END;
BEGIN
dbms_output.put_line ('My session id' | sys_context ('USERENV', 'SID'));
one;
dbms_output.put_line (' autonomous external transaction my session id ' | sys_context ('USERENV', 'SID'));
END;

OUTPUT:

My 531 session id
Inside of an autonomous transaction my id of session 531
Outside an autonomous transaction my id of session 531

Tags: Oracle Applications

Similar Questions

  • details about exceptions

    Hi Master,

    Y'day I attended an interview. He asked me several questions... but I not answered two questions. So, I am rejected me. Please notify these two questions.

    (Q) I have A procedure. In what I call procedure B. But A procedure has part of exception... Procedure B is not exception. If procedure B you have a mistake, what is the result?

    I said... we will have an error message.  He is not satisfied.

    (Q) what is internally pragma autonomous transaction do?

    Please advise...

    Thanks to the adv.

    SA


    something to play with

    declare

    CX varchar2 (50): = ' 10.987654321098765432109876543210987654321098765';

    CY varchar2 (50): = ' 9.123456789012345678901234567890123456789012345';

    x float;

    float of y;

    procedure has (x outside the float in the float y) is

    Start

    x: = x / y;

    exception

    When zero_divide

    then X: = null;

    while others

    then lift;

    end;

    b procedure (x float, y float in) is

    Start

    a(x,y);

    x: = x y;

    end;

    Start

    dbms_output.put_line ('chr_x =' |) CX);

    dbms_output.put_line ('chr_y =' |) CY);

    x: = to_number (cx);

    y: = to_number (cy);

    dbms_output.put_line ('num_x =' | to_char (x) |'; num_y = ' | to_char (y));

    b(x,y);

    dbms_output.put_line (' x_nouveaux = ': case when x is null then 'null' other end to_char (x) |) ("(must be num_x - in theory)');

    end;

    NORMAL PROCESSING:

    chr_x = 10.987654321098765432109876543210987654321098765

    chr_y = 9.123456789012345678901234567890123456789012345

    num_x = 10.98765432109876543210987654321098765432; num_y = 9.12345678901234567890123456789012345679

    x_nouveaux = 10.98765432109876543210987654321098765434 (should be num_x - in theory)

    Statement processed.

    ZERO_DIVIDE EXPECTED:

    chr_x = 10.987654321098765432109876543210987654321098765

    chr_y = 0

    num_x = 10.98765432109876543210987654321098765432; num_y = 0

    x_nouveaux = null (should be num_x - in theory)

    Statement processed.

    UNEXPECTED EXCEPTION ('? (' is entered as cy) :

    ORA-06502: PL/SQL: digital or value error: character of number conversion error

    Concerning

    Etbin

  • Solution for the mutation of table of error when using triggers

    Hello

    Could you please give the solution for the error table mutation during the use of triggers. I'll give you the simple scenario here,

    I created a trigger on the employees table, whenever all DML operations takes place in the employees table, it must run the trigger body. I intentionally used also of the employees in the body of the trigger table. Please give me the solution.

    Triggering factor:

    create or replace trigger test_trigger

    before you insert or update or delete employees

    for each line

    declare

    an employees.first_name%type;

    Start

    Select first_name from people where job_id = "AD_PRES";

    end;

    DML statement:

    Update employees set salary = 20000 where job_id = "AD_PRES" (I run this query)

    Error message:

    ORA-04091: table HR. Is the transfer of EMPLOYEES, the function of triggering/can not see

    ORA-06512: at "HR. TEST_TRIGGER', line 4

    ORA-04088: error during execution of trigger ' HR. TEST_TRIGGER'

    Can anyone tell, in what other scenarios, we get this error or recursive table mutation?

    Thanks in advance

    Hello

    When you create a trigger on a table, you cannot edit/query this table the trigger is not completed.

    You can use

    (1) transaction of Pragma autonomous

    (2) instead of row-level trigger, you have statement-level trigger

    (3) to 11 g, try with COMPOSITE trigger

    Try below to avoid it (a solution):

    create or replace trigger test_trigger

    before you insert or update or delete employees

    for each line

    declare

    PRAGMA AUTONOMOUS_TRANSACTION;

    an employees.first_name%type;

    Start

    Select first_name from people where job_id = "AD_PRES";

    COMMIT;

    end;

  • How to solove this mutation triggers error

    I have a remove after trigger on a table with 2 columns uid and appid

    I check after deletion if there is no other entries in this table with the same uid, I update a flag in another table that also has the uid column.

    But I get an error of mutation.

    Create or replace trigger abc

    after deletion on < tab1 >

    referencing old as old and new like new

    for each line

    declare iCount number (9);

    Start

    Select count (*) from < tab1 > iCount

    where uid =:old.uid;

    If iCount = 0 then

    Update flag set < tab2 > = ' no where uid =:old.uid;

    end if;

    end;

    /

    What I'm doing wrong here and how to fix it?

    Thank you

    YG

    end;

    Hello

    When you create a trigger on a table, you cannot edit/query this table until the trigger/a function completed.

    You can use

    (1) transaction of Pragma autonomous

    (2) instead of row-level trigger, you have statement-level trigger

    (3) to 11 g, try with COMPOSITE trigger

  • Small request help on the use of the global temporary table - some doubts


    Hi all

    Few days back according to a condition, I used a TWG (on the ranks of commit preserve).

    I created a trigger (before the insertion of line level) on GTT that calls a procedure (pragma autonomous transaction declared in the procedure).

    Procedure inserts data into two tables and I have a validation final (after the two insertion of data in tables) in the procedure.

    I tested by inserting the number of lines in TWG and found that the two tables are correctly supply procedure called by trigger.

    Which means that my works absolutely perfect functionality. (performance is also good)

    Now, my question is: since in the production source ETL tool will load this TWG.

    ETL will use this table in different processes simultaneously.

    Suppose that a single session ETL populates this table, and at the same time in parallel another session fills this table with different data. is there a lock on this TWG?

    Would the TWG is blocking other lines to add at any time?

    Is it possible that data may disappear without completing the entire process prematurely TWG?

    PS the feature I developed is the generic exception feature. This works for all valid tables for the database. For most of the tables will be filled with ETL, that's why I had these doubts in my mind.

    I apologize, if these seems like childish doubts.

    Thank you very much

    Arpit Agrawal

    Each line I'll get my GTT and follow all the features [trigger procedure &], will be considered as a session until the validation, right?

    This is not correct, a session is considered between the opening of session (session is created) and close the session (session is closed) of the database.

    If I use, validation TWG deletions here, how would he had differed on commit preserve as when my feature is completed, I don't want to keep more data.

    If on commit delete has been used here, it wouldn't make a difference in your case since you make is ENGAGING in some AUTONOMOUS OPERATIONS.

    In both cases, commit delete and commit preserve, you don't have to worry about the data inside the TWG because it will be empty onece you logoff (session ends).

    However, you can perform a delete operation in your session if you do not want to keep the data up to the end of the session.

  • Problem with trigger on the table

    Hello

    I have the table TEMP AS (NUMBER of SNO
    STATE VARCHAR2 (50).
    DATE OF UPDATE_DATE)

    I want to create the trigger on this table as each time that it is updated in the STATE of temporary table UPDATE_DATE updated columns.
    I am creating the trigger using the PRAGMA autonomous transaction, but it does not work with that and withouht PRAGMA.
    With PRAGMA I get the error message ' ORA-00060: Deadlock detected while you wait resource. "

    Is it possible to create triggers on this table to update columns in the same table.

    Published by: user6040008 on December 11, 2012 01:08

    Hello
    This is not a valid forum for questions like that. Thank you for using {forum: id = 75} forum. However, you can use following code:

    
    create or replace trigger xx
    before update of state
    on cabasys.temp
    for each row
    begin
    :new.update_date := sysdate;
    end; 
    

    Published by: kikolus on 2012-12-11 10:40

  • Commit a single table

    How engage us only one table in a session without validation other tables.

    COMMIT is not specific table. It's operations. If you perform DML operations on multiple tables in a single transaction and commit to the end, all changes to the table will be committed. You can partially achieve you objective is by marching the DML first on the table that you want to validate, then validation and DML for the other tables.
    OR by using the PRAGMA AUTONOMOUS TRANSACTION for transactions that don't have that tables you want to commit to.

    You can post the actual code to give a better idea of your problem.

  • Facing a problem while doing DML operations in Discoverer (Urgent!)

    Hello

    I am facing a problem in the discoverer report I'm working. I would be grateful if you could help me find a solution for this-

    I'm releasing a custom package of discoverer. This package is the insertion of data in a custom table. As we cannot directly put the DML statements in the package of discoverer so that I have defined this package as the Pragma autonomous. The custom table that is being filled is an ordinary table (that is not a global temporary table). In the folder custom in Administrator I just selects the custom table data.

    Problem when I run the report of discoverer, the data get inserted in the custom table, which means that the package is working correctly, but still the report does show all the data. Maybe the running query before even that data is inserted in the table. Can you please what Miss me in this solution?

    Some facts of the report-
    1. I use that only one worksheet.
    2. the packaging is insert the data in the custom table, so I see no problem with the package and trigger.

    Thanks for your help.

    -Anshul

    Hey Anshul
    Now, I understand, and you certainly don't want a user data of another user overwriting data.

    An idea that comes to mind and the other I did have to create a copy of the table in the schema for each user who needs. There will always be an original copy in the main schema. So what you need to do is to create a local synonym for the table, in the schema of the user who performs a redirection of the system to use the local table. Using this approach you can have each user, update their own copy and read it for their reports.

    Another, more difficult the idea would be to use a TEU, private virtual database, to control the data in a central table. The table would not be truncated, but would have a new column added to the owner of the data. Then during the execution of the procedure it delete all the lines for the user and then load new ones for this user. The CAE would be used to filter the data in the report so that the user sees only the data belonging to the user.

    Hope that all makes sense. The first is that I would like to try because it is the simplest.

    Michael

  • Trigger that executes the stored procedure does not

    I have a trigger on a table which triggers the update of the column 'APPLICATION_OFFER_SENT '! The trigger looks like this:
    CREATE OR REPLACE TRIGGER SCHEMA.COPY_APPLICATIONS
    AFTER UPDATE
    OF APPLICATION_OFFER_SENT
    ON PPLE_T_APPLICATION 
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
        UPDATE_OR_INSERT_APPL(:old.PK_APPLICATION_NO);
    END;
    Simply, he runs a procedure and takes the "PK_APPLICATION_NO" as a single parameter.

    When I run the SP itdefl: exec UPDATE_OR_INSERT_APPL (1042); It works very well.
    But when its done through the relaxation it doesn't?



    The Proc looks like this:
    CREATE OR REPLACE PROCEDURE SCHEMA.UPDATE_OR_INSERT_APPL (IN_APPL_NO NUMBER) IS
    
    CURSOR c1 IS
    SELECT title, fullname, universityid, appl_no,  appl_no_hash, OFFER_EXPIRATION_DATE, APPLICATION_CANCEL_DATE, room_hall 
      FROM SCHEMA.ACCOM_APPLICATION_VIEW
     WHERE appl_no = IN_APPL_NO;
    
    rowcnt NUMBER;
    
     BEGIN
      FOR rec IN c1
          LOOP  
          SELECT COUNT(*) INTO rowcnt FROM SCHEMA2.ACCOMM_OFFER_ACCEPTANCE a WHERE a.appl_no = IN_APPL_NO;
               
               IF rowcnt = 0  THEN
                   INSERT INTO SCHEMA2.ACCOMM_OFFER_ACCEPTANCE (title, fullname, universityid, appl_no, appl_no_hash, offer_expiration_date, application_cancel_date, room_hall)
                        VALUES (rec.title, rec.fullname, rec.universityid, rec.appl_no, rec.appl_no_hash, rec.offer_expiration_date, rec.application_cancel_date, rec.room_hall);
                        COMMIT;
                        
                        
                        
               ELSIF rowcnt !=0 THEN
               
                    UPDATE SCHEMA2.ACCOMM_OFFER_ACCEPTANCE t
                       SET (t.offer_expiration_date, t.application_cancel_date, t.room_hall) = (select OFFER_EXPIRATION_DATE, APPLICATION_CANCEL_DATE, ROOM_HALL from SCHEMA.ACCOM_APPLICATION_VIEW B
                                                                                                      where B.appl_no = IN_APPL_NO);        
              
               END IF;
    
          END LOOP; 
     END;
    Published by: oraCraft on Oct / 09/2010 09:11

    Published by: oraCraft on Oct / 09/2010 09:11

    >
    Validation is in my stored procedure, is not my trigger. I'm sure it's very good
    >

    It is not very well according to the Application Developer Fundametals guide...

    >
    DDL statements are not allowed in the body of a trigger. Furthermore, no control of transaction
    statements are allowed in a trigger. SAVEPOINT, COMMIT and ROLLBACK cannot be
    used. For system triggers, TABLE {CREATE/ALTER/DROP} instructions and
    EDIT... COMPILE are allowed.
    Note: A procedure is called by a trigger cannot perform the previous transaction control statements,
    because the procedure runs in the context of the body of the trigger.
    >

    There is an exception to this rule if you use the pragma AUTONOMOUS TRANSACTION, but I do not see that in your trigger.

    Kind regards
    Bob

  • Before Insert TRIGGER to create partitions problem

    Hello

    I m having a problem with the following situation in Oracle 8i:

    I have a table TEST_TABLE, which is divided by the beach with a DATE column. The idea is to have a partition for each month, so the HIGH_VALUE of partitions is always the first day of the month following that represents the partition.

    I created a BEFORE TRIGGER INSERT on the table TEST_TABLE, which tests if the partition for the month of registration which is being inserted exists and, in case it doesn´t, a PROC AUTONOMOUS_TRANSACTION is called to create the TRIGGER.

    Running the code below one can see that even if partitions are created as expected, when you try to insert a record with a date greater than the last partition for the first time, this error is returned:
    ORA-14400: inserted partition key exceeds plu legal partition key.

    Note that if you run the same statement again insert, it s inserted correctly on the partition that was created the first try.

    I´ll appreciate any help on this matter.

    code
    ----------------
    CREATE TABLE TEST_TABLE)
    IDENTIFICATION NUMBER,
    DATE OF THE DT
    )
    TABLESPACE USERS
    PARTITION BY RANGE (DT)
    (
    PART_B42009 PARTITION VALUES LESS THAN (TO_DATE ('2009-01-01 00:00:00 ',' YYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN '))
    LOGGING
    TABLESPACE USERS
    );
    /

    CREATE OR REPLACE PROCEDURE SP_ADD_PARTITION (TEST_TABLE P_DATE. DT % TYPE)
    IS
    PRAGMA AUTONOMOUS_TRANSACTION;
    V_STR VARCHAR2 (500);
    BEGIN

    V_STR: = 'ALTER TABLE TEST_TABLE ADD.
    || 'PARTITION BIRD | TO_CHAR ("P_DATE, ' YYYYMM")
    || ' VALUES LESS (TO_DATE ("')).
    || TO_CHAR (ADD_MONTHS (P_DATE, 1), "YYYY-MM"). '-01 00:00:00 ','
    || ((' SYYYY-MM-DD HH24:MI:SS "," NLS_CALENDAR = GREGORIAN "))';

    EXECUTE IMMEDIATE (V_STR);

    END SP_ADD_PARTITION;
    /

    CREATE OR REPLACE TRIGGER TR_B_I_R_TEST_TABLE
    BEFORE INSERTING
    ON TEST_TABLE FOR EACH LINE
    DECLARE
    NUMBER OF V_PARTITION_EXISTS;
    BEGIN

    IF: NEW. DT > = TO_DATE ('2009-01-01 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS) THEN

    IMMEDIATELY EXECUTE (' SELECT COUNT (1) ")
    || "Of all_tab_partitions atp'."
    || "WHERE atp.table_name ="table_test"'.
    || "AND the atp. Nom_partition =: v1 ')
    IN V_PARTITION_EXISTS
    WITH THE HELP OF "BIRD" | TO_CHAR(:NEW.) "DT,"YYYYMM";)

    IF V_PARTITION_EXISTS = 0 THEN

    DBMS_OUTPUT. Put_line ('Partition [' |]) 'BIRD ' | TO_CHAR(:NEW.) "DT,"YYYYMM"). does not exist!') ;
    DBMS_OUTPUT. Put_line ('creation..');
    SP_ADD_PARTITION (: NEW.) DT);
    DBMS_OUTPUT. Put_line ('success.');

    IMMEDIATELY EXECUTE (' SELECT COUNT (1) ")
    || "Of all_tab_partitions atp'."
    || "WHERE atp.table_name ="table_test"'.
    || "AND the atp. Nom_partition =: v1 ')
    IN V_PARTITION_EXISTS
    WITH THE HELP OF "BIRD" | TO_CHAR(:NEW.) "DT,"YYYYMM";)

    IF V_PARTITION_EXISTS = 1 THEN
    DBMS_OUTPUT. Put_line ("it s visible at this point..");
    ON THE OTHER
    DBMS_OUTPUT. Put_line ("it s not visible at this point..");
    END IF;

    ON THE OTHER

    DBMS_OUTPUT. Put_line ('Partition [' |]) 'BIRD ' | TO_CHAR(:NEW.) DT, "YYYYMM")
    || already exists! ") ;

    END IF;

    END IF;

    DBMS_OUTPUT. Put_line ('continues with insertion...");

    END TR_B_I_R_TEST_TABLE;
    /

    -Go to the low score
    INSERT INTO TABLE_TEST VALUES (1, TO_DATE ('2008-12-31 23:59:59 ',' YYYY-MM-DD HH24:MI:SS'));))

    -Returns the error on the first try
    INSERT INTO TABLE_TEST VALUES (2, TO_DATE ('2009-01-01 00:00:01 ',' YYYY-MM-DD HH24:MI:SS'));))

    ----------------

    It is the use of the pragma AUTONOMOUS TRANSACTION. Your current transaction cannot see the result of this DOF since it occurs outside of the current transaction. The clue is in the name.

    Of course, you cannot run the DDL in a trigger without use of this pragma, so you're pretty much stuck. There is a solution in 11g, but that will not help you. Unfortunately, your only option is to pre-create the partitions required in front of the need. For example, you might have a DBMS JOB to create a partition for the next month, which takes place the last day of each month (or logical date of company).

    Cheers, APC

    blog: http://radiofreetooting.blogspot.com

  • Connect the two spreadsheets through a pl/sql function registered

    Hello
    Need help to connect the two worksheets using a stored function.

    Step 1:
    Created a function * (test_global) Pl/SQL * in which a table * (TWG) global * is inserted with lines based on criteria (via a call to a pl/sql procedure packed).
    The function returns the number of rows in the global table or 0 if no row is returned.
    The TWG was created using "On Commit preserve rows.

    Step 2:
    The function test_global has been saved to the Finder via the "PL/SQL functions to register.

    Step 3:
    Create a spreadsheet calculation - & gt; Sheet1 and included a Calculation (calc_global) that calls the test_global function.

    Step 4:
    Add another sheet of calculation - & gt; Sheet2 based on a query to select lines in the TWG where calc_global & gt; 0

    Step 5:
    Refreshed Sheet1 - & gt; displays the number of rows as * 5119 *.
    Refreshed Sheet2 - & gt; takes some time to run but returns no data

    Tried to:
    ) a calc_global link on Sheet1 with the help of sheet 2 links management, this does not work either
    (b) changed using the Pragma autonomous transaction function; gives an error that says no data returned by 1 sheet Sheet2.

    Please help with a solution, it seems that there are data in the TWG at the time Sheet1 is running need to display data in the sheet2 worksheet.

    Thanks in advance
    SP

    Hello

    You need to call test_global function once on Sheet1 that fit lines within the TWG. In Sheet2, you simply select the TWG and do not have the conditions of anywhere in this form. Try to run Sheet2 without calc_global > 0.

    Rod West

  • Can ' transaction autonomous pragma ' called from exception block?

    CREATE OR REPLACE TRIGGER TRIG_EMP
    AFTER UPDATE
    ON EMP
    FOR EACH LINE

    DECLARE

    NUMBER OF THE CNT: = 0;

    BEGIN

    UPDATE EMP_bkp
    SET COMM = 999
    WHERE ENAME = 'SMITH ';.

    COMMIT; -It will generate the error that commit the cnt b use inside the trigger then wil code exception sommunications

    exception
    while others then
    declare
    PRAGMA AUTONOMOUS_TRANSACTION;
    Start
    commit;
    end;
    END;


    Why code gives error? cant I put PRAGMA AUTONOMOUS_TRANSACTION block of exception, even if I have the rolls in declare... begin... end of block.
    Could be considered to bear, but I m in delema why we cnt pragma 'use', in the exception block when an error themselves in code.as can call any proc, func via exception block then why don't we call pragma?

    A pragma shall apply to a set routine:
    -The anonymous PL/SQL blocks higher level (not nested)
    -Local, autonomous and packaged functions and procedures
    -A SQL object type methods
    -Database triggers

    But, even if you set a pragma autonomous_transaction in the exceptions, these commit will not commit the changes maded in the body of the trigger (because the idea of a stand-alone transaction, is independent).

    Perhaps (I'm not sure) you can try to trick Oracle write a function that do the validation.

    In any case, what you trying to do? There may be another way to achieve your goals

    I hope this helps.

    Kind regards
    Alfonso Vicente
    http / / www.logos.com.uy/el_blog_de_alfonso

  • autonomous transaction block of exception

    Hi friends,

    Can you tell me if it is possible to use an autonomous transaction block exception?

    If so, how? Please provide me with a guide line

    thnx

    ROY wrote:
    Hi friends,

    Can you tell me if it is possible to use an autonomous transaction block exception?

    If so, how? Please provide me with a guide line

    You cannot use an autonomous transaction directly in the exception block:

    SQL> ed
    Wrote file afiedt.buf
    
      1  declare
      2    v_dummy number;
      3  begin
      4    select a into v_dummy from testtab where a = -1;
      5  exception
      6    when no_data_found then
      7      declare
      8        pragma autonomous_transaction;
      9      begin
     10        insert into testtab (a) values (-1);
     11      end;
     12      raise;
     13* end;
    SQL> /
          pragma autonomous_transaction;
                 *
    ERROR at line 8:
    ORA-06550: line 8, column 14:
    PLS-00710: PRAGMA AUTONOMOUS_TRANSACTION cannot be specified here
    

    but, if it is declared in a procedure you can call it the exceptional block...

    SQL> ed
    Wrote file afiedt.buf
    
      1  declare
      2    v_dummy number;
      3    procedure insertit is
      4      pragma autonomous_transaction;
      5    begin
      6      insert into testtab (a) values (-1);
      7      commit;
      8    end;
      9  begin
     10    select a into v_dummy from testtab where a = -1;
     11  exception
     12    when no_data_found then
     13      insertit;
     14      raise;
     15* end;
    SQL> /
    declare
    *
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 14
    

    or

    SQL> ed
    Wrote file afiedt.buf
    
      1  declare
      2    v_dummy number;
      3  begin
      4    select a into v_dummy from testtab where a = -1;
      5  exception
      6    when no_data_found then
      7      declare
      8        procedure insertit is
      9          pragma autonomous_transaction;
     10        begin
     11          insert into testtab (a) values (-1);
     12          commit;
     13        end;
     14      begin
     15        insertit;
     16      end;
     17      raise;
     18* end;
    SQL> /
    declare
    *
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 17
    
  • PRAGMA AOTONOMUS TRANSACATION

    Y at - it a lead performance in the use of PRAGMA AOTONOMUS TRANSACATION?

    Thank you

    REDA

    No,
    An autonomous Transaction is "independent validation" with parent.

    Example of
    Autonomous transaction of procedure procedure
    Start
    Uptate has...
    commit;
    End;

    TRIAL procedure
    Start
    Update B...
    PROCEDURES;
    Rollback;
    End;

    Update has commit, update in B is rollback.

  • Autonomous

    can give everything
    Autonomous_transaction

    with pragma


    Notes:

    I hope to read the articles you want to conclude the following:
    There is only one "legal" reason to use an autonomous transaction: in a logging error routine.
    You must avoid the autononous transactions in all other situations like triggers etc.
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:1171766400346817259

Maybe you are looking for

  • Go back to the old version

    Sorry guys, I am disgusted with this upgrade. 29 doesn't seem at all like a good UI update. The menus is really bad and that the tab bar. In addition, this does not solve my other problem tab I have to be in another question, I asked. How can I go ba

  • HP FK575AA-ABA a66581: How do I know if the computer is equipped WiFi

    Can someone tell me how can I tell if my computer is able to WIFI.   I have examined various items on the computer, but can't find any reference which tells me that the computer is wifi my computer is a HP FK575AA-ABA a66581 with windows 10 64-bit ca

  • S5-1224 used power up

    After going into hibernation (light orange), the computer does not meet the mouse or the keyboard.  Need to press the power button.  After this will not feed.  I disconnected the decision-making and pressed the power switch for 15 seconds to perform.

  • Snow Leopard constant and growing repair permissions - 10.6.8

    Our machine Mac Pro (3,1) seems constant is necessary (starting to Snow Leopard) repair permissions. I've been using Applejack and have an improved version of the Warrior drive. It seems maybe she needed about 5 - 6 times to start or restart, but So

  • Why my vista keep in failure and how to fix

    I had a blue screem comes up saying that the system broke down what happened each time I login in a web browser or whenever I did some work on my pc