Pipeline raised ORA-06519 function: active autonomous transaction detected

Hi all

My name is John and I have a problem I need to share with you the guru and the experts. I created the following function of pipeline under user Oracle ABC:

CREATE or replace FUNCTION SomeFunction(p_from_date DATE, p_to_date DATE) T_TAB_A RETURN pipelined
IS
PRAGMA autonomous_transaction;
BEGIN
DELETE FROM temp_rcm;

INSERT INTO temp_rcm
SELECT * FROM int.facility fd.
int. Capacity co
WHERE co.resource_name = fd.resource_name
AND co.trade_date = fd.trade_date
AND co.trade_date BETWEEN p_from_date AND p_to_date;

COMMIT;

FOR rec IN (SELECT co.*
OF temp_rcm co
o left join int.outage
WE (o.flag = 'Y')
AND o.reason_flag = 'F'
AND o.INTERVAL = co. INTERVAL OF
AND co.resource_name = o.resource_name)
ORDER OF co. MEANTIME,
Co.Name) LOOP
pipe ROW (T_A (CRE. INTERVAL, rec.trade_date,
Rec.resource_name, Rec.day_of_week_long, rec.working_day, rec.peak));
END LOOP;

RETURN;
END SomeFunction;


I could compile and create the function SomeFunction successfully, but when I executed the following command:

Select * from table (SomeFunction (to_date ('01 / 01/2010 ', to_date('01/01/2010')));)

I went with the Oracle error: ORA-06519: active autonomous transaction detected and restored

I searched on the web, such Oracle error occurs when the function has a missing "COMMIT" or "ROLLBACK" command inside an autonomous_transaction. But the fact is that I have already included the "COMMIT"; in the function. I suspected that the error was caused by the paintings that I did against (such as int.facility and int.capacity) were all the views which belonged to another schema called int. Or is it something that miss me in the service? Thank you for your time and your help.

Kind regards
John

This isn't how a ref cursor is used in general. See this thread: {: identifier of the thread = 886365}

I can't really answer your question without knowing what kind of client you are using (Java, c#, etc.).

However, the thread should shed a lot of light on the ref Cursor.

Tags: Database

Similar Questions

  • ORA-06519: active autonomous transaction detected and restored

    Hello

    I have a trigger and stored procedure of the trigger call. This stored procedure contains instructions COMMIT. So I used PRAGMA AUTONOMOUS_TRANSACTION in my trigger. I created the trigger to fire after insertion in the table. When I try to insert the data, I get the error below.

    ORA-06519: active autonomous transaction detected and restored

    Can anyone clear or correct me.

    Thank you

    Before returning in a PL/SQL block, autonomous transactions started in the block must be met (to the either committed or rolled back at the back). If this is not the case, the active autonomous transaction implicitly rolls back and this error.

    Ensure that, prior to return from an autonomous PL/SQL block, autonomous, all active transactions are explicitly committed or canceled.

  • Error ORA-14450 function parallel pipeline with PRAGMA AUTONOMOUS_T

    Hello
    I have a problem with a function.
    I define this types:
    CREATE or REPLACE TYPE utrOutRrsc () AS OBJECT
    Id_ressource NUMBER
    , Resource_tp varchar2 (50)
    , Resource_nm varchar2 (256)
    , Message_tp VARCHAR2 (50)
    , Message_tx VARCHAR2 (4000)
    );
    CREATE or REPLACE TYPE uttResources AS TABLE OF THE utrOutRrsc;

    I defined a package with this code:
    TYPE utrResource () IS RENDERING
    Id_ressource rdbmx.resources_vt.resource_id%TYPE
    Resource_tp rdbmx.resources_vt.resource_tp%TYPE
    Resource_nm rdbmx.resources_vt.resource_nm%TYPE);
    TYPE rc_Resources IS REF CURSOR RETURN cons_ref_pkg.utrResource;


    FUNCTION CONS_Process_Pool)
    cur_Pools IN Conshope_pkg.rc_Resources
    , icadena_tp IN VARCHAR2: = '-1212121212'. "
    )
    RETURN uttResources
    PIPELINED PARALLEL_ENABLE (PARTITION cur_Pools IN ALL)
    IS
    PRAGMA AUTONOMOUS_TRANSACTION;

    LTypecons_fl NUMBER: = itypecons_fl;
    r_pools rdbmx_site. Conshope_pkg.utrResource;
    r_Out utrOutRrsc;

    blnInit BOOLEAN: = TRUE;
    numPos NUMBER;
    I have SEVERAL;
    LMessage_tp VARCHAR2 (50): = "OK";
    LMessage_tx VARCHAR2 (4000): = NULL;

    BEGIN
    LOOP
    SEEK cur_Pools INTO r_pools;
    EXIT WHEN cur_Pools % NOTFOUND;

    Start
    insert into mytable values (r_pools.resource_id, r_pools.resource_tp, "other information");
    COMMIT;
    exception
    L_Message_tp: = "ERROR";
    LMessage_tx: = sqlerrm;
    end;

    r_out. Id_ressource: = r_pools. Id_ressource;
    r_out. Resource_tp: = r_pools. Resource_tp;
    r_out. Resource_nm: = r_pools. Resource_nm;
    r_out. Message_tp: = LMessage_tp;
    r_out. Message_tx: = LMessage_tx;

    COURSE OF ACTION (r_out);
    END of LOOP / * cur_Pools * /.

    MSG_LOG ('Salida CONS_Process_Pool (Gestor: ' | r_pools.)) Resource_nm | () ', LTypeCons_fl, 'CONNECT');
    RETURN;

    END CONS_Process_Pool;

    The error is worth trying.

    I need to help you, please

    In addition, as damorgan noted, "There are so many things wrong here", keep in mind:

    >
    Restrictions on independent operations}

    You cannot execute a statement LINE of conduct in your own routine
    your autonomous transaction is open. You must close the autonomous transaction
    before you run the statement LINE of conduct. This is usually accomplished by
    validation or restoring the transaction independent before running the PIPE
    Return LINE. >

    SY.

  • 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
    
  • Pick activity with transaction XA causing the double mistake

    Hi all

    Hi all

    I have a BPEL service that reads the message to a JMS queue and then waits for a response with a PICK 5 min on alarm activity. Now there are rare cases, when I did not receive the answer within 5 minutes (but after > 5 min) and the Pick activity goes into alarm and error. But my JMS queue has an active XA transaction and that translates into a retry of the function of the source. This re-triggers all of the services and another pick activity is created. the choice of the second activity ends sometimes successfully, but sometimes also with the double-error error activity.

    The exact error message is attached here... Note also that we set the correlation id for the intervention on the pick activity...

    concerning

    Rakesh

    Hello

    That's an option... but I try to understand what is causing this intermittent problem to throw the double error message.

    Thank you

    Rakesh JS

  • "An autonomous transaction sees all changes by hand transact.

    Hello
    I'm trying to reproduce designs "a stand-alone transaction sees all changes made by the main transaction" on:
    Oracle® Database Application Developer's Guide - Fundamentals
    10g Release 2 (10.2)
    Part Number B14251-01
    chapter 2 SQL Processing for Application Developers

    Paragraph : Autonomous Transactions
    I implemented a simple case...
    create table emp_ as select * from emp

    begin
      update emp_ set hiredate=hiredate+100 where empno=7934;
    end;

    create or replace trigger trg_emp_
    after insert or update on emp_
    for each row

    declare
        pragma autonomous_transaction;
        emp_var emp.hiredate%type;

      begin
        select hiredate
          into emp_var
          from emp_
        where empno=:new.empno;
        dbms_output.put_line('empno: '||:new.empno);
        dbms_output.put_line('old hiredate: '||:old.hiredate);
        dbms_output.put_line('new hiredate: '||:new.hiredate);
      end;
    Before any change...
    SQL> select empno,hiredate from emp_;

    EMPNO HIREDATE
    ----- -----------
    5498 21/4/1982
    5499 11/10/1981
    5411 10/10/1981
    5410 10/10/1982
    7369 17/12/1980
    7499 20/2/1981
    7521 22/2/1981
    7566 2/4/1981
    7654 28/9/1981
    7698 1/5/1981
    7782 9/6/1981
    7788 19/4/1987
    7839 17/11/1981
    7844 8/9/1981
    7876 23/5/1987
    7900 3/12/1981
    7902 3/12/1981
    7934 23/1/1982
    After the change...
    SQL> begin
      2    update emp_ set hiredate=hiredate+100 where empno=7934;
      3  end;
      4  /

    empno: 7934
    old hiredate: 23/01/82
    new hiredate: 03/05/82

    PL/SQL procedure successfully completed
    According to the doc select Oracle of the autonomous transaction should not see the change to column hiredate in table in the main transaction (in the anonymous block)...

    Matter what I've done wrong... ???

    Thank you
    SIM

    Simon:

    As Tubby has pointed out, your dbms_output orders do not display the selected value in the trigger. Your trigger based demonstration should look like:

    SQL> SELECT * FROM t;
    
            ID DT
    ---------- -----------
             1 05-SEP-2009
             2 17-JUL-2009
    
    SQL> CREATE TRIGGER t_ai
      2     AFTER INSERT OR UPDATE ON t
      3     FOR EACH ROW
      4  DECLARE
      5     PRAGMA AUTONOMOUS_TRANSACTION;
      6     l_dt t.dt%TYPE;
      7  BEGIN
      8     SELECT dt INTO l_dt
      9     FROM t
     10     WHERE id = :new.id;
     11     DBMS_OUTPUT.Put_Line ('ID: '||:new.id);
     12     DBMS_OUTPUT.Put_Line ('Old dt: '||:old.dt);
     13     DBMS_OUTPUT.Put_Line ('New dt: '||:new.dt);
     14     DBMS_OUTPUT.Put_Line ('Aut dt: '||l_dt);
     15  END;
     16  /
    
    Trigger created.
    
    SQL> UPDATE t SET dt = sysdate WHERE id = 2;
    ID: 2
    Old dt: 17-JUL-2009
    New dt: 25-OCT-2009
    Aut dt: 17-JUL-2009
    
    1 row updated.
    

    Thus, the transaction, select automomous doesn't see the modified value of dt.

    I know you are just trying to understand transactions automomous here and would never sometihg like that in the production of right? :-)

    Your trigger, as written, has some interesting side effects because of the automomous transaction. For example:

    SQL> INSERT INTO t VALUES(3, sysdate - 25);
    INSERT INTO t VALUES(3, sysdate - 25)
                *
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "OPS$ORACLE.T_AI", line 5
    ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'
    
    SQL> UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy');
    UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy')
           *
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "OPS$ORACLE.T_AI", line 5
    ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'
    

    John

  • Engage in relaxation with an AUTONOMOUS transaction

    Hi all

    My question is on the trigger. say if we have a before insert trigger wrote on the employee table who agrees to pay his transaction with autonomous, so if our insert on employee statement fails, the trigger is executed as it is before the outbreak.

    Practically, I checked and found that it is not have triggered. Please clarify my understanding trigger a trigger.

    Thank you

    Vipin Kumar Rai

    It's just the way it is. If a fundamental data type is violated, it fires. If a constraint (as a non null) is violated, then he fired.

    I know that you put in comment the autonomous part - I was pointing out that your use of an autonomous transaction in the part that you said is probably wrong, unless you are trying to log on each attempt insert, regardless of whether it succeeds, and (as you saw), a trigger can not capture each insert attempt if the data type is not valid (for example). Even if she did it, insert it into your trigger would fail (assuming you have the same types of data on emp_v as on emp)

  • Raise our level of active directory for 2008

    Currently we are running active directory on Windows 2008 R2 server and all our domain controllers are Windows 2008 R2 servers. But domian functional level is Windows server 2003 and windows 2000 forest functional level. What needs to be done before I can lift the two functional level to Windows server 2008?

    Do I have to run the commands ' adprep /foreestprep and adprep /domainprep /gpprep before I can get up levels?

    Please advise!

    Thank you so much in advance!

    Hello

    Please post your question in Server TechNet Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • ORA-00934: function of group not allowed error when creating index

    ORA-00934: Group feature is not allowed here
    create index idx_emp on emp(max(install_time))

    Hello

    Daniel wrote:
    ORA-00934: Group feature is not allowed here

    create index idx_emp on emp(max(install_time))
    

    It's true. It is documented in the Manual of the SQL language

    Restrictions on Function-based Indexes 
    
    Function-based indexes are subject to the following restrictions:
    ...
    The column_expression cannot contain any aggregate functions.
    

    MAX is an aggregate function.

    What problem are you trying to solve? If you could create an index like this, how would you use it?
    Explain what you need to do, and someone will help you find a good way to do it.

  • ORA-07445 met - request 'Process transaction Interface' running

    Hello

    We get ORA-07445 errors in database alert log whenever we run application "process transaction Interface.

    The transaction of the process interface is the request of parent requests the child 'Inventory transaction worker' spawning, this application is also out error.

    Here is the output of the request log:


    ----------------------------------------------------------------------------------------
    ---------------------------------------------------------------------------
    Inventory: Version: 11.5.0

    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.

    Module INCTCW: worker of the inventory transaction
    ---------------------------------------------------------------------------

    Current system time is February 9, 2010 10:47:05

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

    10:47:05: version upgrade
    10:47:05: isJrelease is 1
    10:47:05: table = 3
    APP-FND-01564: ORACLE error 3113 in inctcw

    Cause: inctcw failed due to the ORA-03113: end of file on communication channel
    .

    The SQL statement being executed at the time of the error was: and was executed from the file.
    Error ORACLE 3114 in AFPRSR-Resubmit_Time

    Cause: AFPRSR-Resubmit_Time failed due to the ORA-03114: not connected to ORACLE
    .

    The SQL statement being executed at the time of the error was: and was executed from the file.
    ORA-03114: not connected to ORACLE

    Systematic AFPPRD encountered an unrecoverable error. ORA-03114: not connected to ORACLE


    Contact your support representative or the system administrator.

    Shutting down competitor Manager: February 9, 2010 10:47:32
    ORA-01041: internal error. hostdef extension doesn't exist

    Error ORACLE 3114 in AFPRSR-Resubmit_Time

    Cause: AFPRSR-Resubmit_Time failed due to the ORA-03114: not connected to ORACLE
    .

    The SQL statement being executed at the time of the error was: and was executed from the file 5617365, fnd, lib, afpsr

    List of errors encountered:
    .............................................................................

    _ 1 _
    Systematic AFPCMT met an ORACLE error. ORA-01041: internal error.
    hostdef extension doesn't exist
    .

    Check your error messages for the cause of the error. (= < POINTER >)

    _ 2 _
    Systematic AFPPRD encountered an unrecoverable error. ORA-03114: not connected
    for ORACLE


    Contact your support representative or the system administrator.

    _ 3 _
    Systematic AFPPRD encountered an unrecoverable error. ORA-03114: not connected
    for ORACLE


    Contact your support representative or the system administrator.
    .............................................................................

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

    The alertlog output:


    [RA-07445: exception encountered: core dump [PC:0xFFFFFFFF7FFED1E0] [SIGSEGV] [ADDR:0xFFFFFFFF7FFED1E0] [PC:0xFFFFFFFF7FFED1E0] [invalid permissions for mapped object]]
    Incident details in: /db1/11g_home/diag/rdbms/diag/rdbms/clonenew/clonenew/incident/incdir_25270/clonenew_ora_20526_i25270.trc
    Kills Feb 09 10:35:14 2010
    Track of dumping performs id = [cdmp_20100209103514]
    Kills Feb 09 10:35:16 2010
    Sweep the Incident [25270]: completed
    Kills Feb 09 10:41:25 2010
    Exception [type: SIGSEGV, permissions not valid for the mapped object] [ADDR:0xFFFFFFFF7FFED1E0] [PC:0xFFFFFFFF7FFED1E0 {empty}]
    Errors in the /db1/11g_home/diag/rdbms/diag/rdbms/clonenew/clonenew/trace/clonenew_ora_21170.trc file (incident = 24814):
    [ORA-07445: exception encountered: core dump [PC:0xFFFFFFFF7FFED1E0] [SIGSEGV] [ADDR:0xFFFFFFFF7FFED1E0] [PC:0xFFFFFFFF7FFED1E0] [invalid permissions for mapped object]]
    Incident details in: /db1/11g_home/diag/rdbms/diag/rdbms/clonenew/clonenew/incident/incdir_24814/clonenew_ora_21170_i24814.trc
    Kills Feb 09 10:41:31 2010

    Need help on this issue.

    Thank you

    Hello

    See note technique- all competitors queries fail with ORA-03113 and database error ORA-07445 ID 945107.1

    Hope helps.

  • "Click to call" function active Mobile HTML (Mail/landings)

    Dear community Eloqua,

    We use eloqua to publish emails landing reagents and distributed to the customer.
    As a best practice of 2015 the command, we have designed and implemented a first Mobile perspective in our HTML code.

    We have detected a problem in Eloqua with click-to-call service from mobile devices. In mobile clients, phone dialer devices receives eloqua settings that prevent us to have a function call.

    In accordance with the recommendations of best practices of web design, we have inserted in the HTML code of our pieces of mail electronics/LP, a code like:

    < a href = "" Tel: + 541140005000 "target ="_blank"> + 54 11 4000 5000 < /a >"

    External reference:

    We checked that the follow-up to the url of this link has been disabled.

    Now, when we open the piece of Gmail or Samsung Mail (Android device), we note that the click-to-call link does not work.

    There is an automatic addition of a tracker of eloqua code (see screenshot).

    After clicking the phone number link in the Gmail room (android device), you'll see in the screenshot the number that appears after clicking the phone number link (office of Gmail), it works, but we can see that the elq_cid = 2121042 & elq_mid = 6131 code correspond to the number of additional generating mobile error (see above).

    We have this problem on all of our pieces version of Gmail and Samsung Mail Mobile email. This also happens in our sensitive LP.

    Support eloqua we proposed to use and minimizer of URL as a work-around.
    we tried with bit.ly y goo.gl and they both denied such: + 541140005000 as a valid URL. The fact tha isd http://"such: + 541140005000 not a valid URL.» With this, we have found a functional answer to our problem.

    Did anyone happened to have a working solution to get our click to call the operational functions in our email and any mobile device lp and customers?

    It seems that your instance has additional "Omniture" followed enabled (> Setup > default Email > external monitoring).

    If you're ok with turning off this option, that the phone number link should be changed.

  • How function active scan to previous frame?

    I use the script below, the problem is the function to the previous image did not work, his command always at the last picture, please help me, tq

    * to frame 1

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_a);

    function fl_SwipeToGoToNextPreviousScene_a(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    slipped right

    Stop();

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    gotoAndPlay (2);

    }

    }

    *-field of 10

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_b);

    function fl_SwipeToGoToNextPreviousScene_b(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    slipped right

    gotoAndPlay (2);

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    gotoAndPlay (11);

    }

    }

    *-field of 20

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_c);

    function fl_SwipeToGoToNextPreviousScene_c(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    slipped right

    gotoAndPlay (11);

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    gotoAndPlay (21);

    }

    }

    *-field of 40

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_d);

    function fl_SwipeToGoToNextPreviousScene_d(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    slipped right

    gotoAndPlay (21);

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    gotoAndStop (40);

    }

    }

    Capture.PNG

    Use removeEventListener to remove event listeners. for example,.

    stage.removeEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_a);

  • FRM-40735 when-pressed key raised ORA-01840

    Hello

    10.1.2.0.2 Oracle Forms Developer

    I use Calendar90.pll to get the calendar to a date field. After execution, it throws error
    FRM-40735 when-pressed button triggered trigger unhandled exception ORA-01840.
    Please help me to fix it.

    Thanks a lot for your help.
    Sandy

    Hi again!

    Please change your trigger:

    date_lov.get_date ( nvl ( :search.created_to_date, sysdate ),
                        'search.created_to_date',
                        0,
                        0,
                        'Date List of Values',
                        'OK',
                        'Cancel',
                        TRUE,
                        FALSE,
                        FALSE);
    

    It will work!

    Concerning

  • ORA-00150: duplicate ID of transaction?

    Hi guys,.
    I'm calling a sql program in my shell script and passing two parameters, but I get a SQL - 150 error Code. Any ideas on what this is?

    Thank you

    When you do not give the third parameter

    t_seqno: = &3;

    becomes

    t_seqno: =;

    where the compile error...

    You can change this way:

    t_seqno: = to_number('&3');)

    which becomes:

    t_seqno: = to_number (»);

    equivalent to:

    t_seqno: = null;

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/01/31/le-direttive-di-compilazione-pragma/]

  • error with triggers

    Hi all
    I get the error message with trigger
    What is the meaning of the error message
    and how to fix it?
    Error at startup on line 63 of order:
    call xx_GL_Vacancies.delete_transaction (128540)
    Error report:
    SQL Error: ORA-06519: active transaction autonomous detected and restored
    ORA-06512: at "XXGLOBALLOGIC. XX_GL_VACANCIES', line 37
    06519 00000 - "active autonomous transaction detected and restored.
    * Cause: Before returning from a PL/SQL stand-alone, autonomous everything block
    > transactions started in the block must be completed (either
    (> validated or cancelled). If not, activate autonomous
    > transaction implicitly rolls back and this error.
    * Action: make sure that before you return from an autonomous PL/SQL block,
    > autonomous all active transactions are explicitly engaged
    or restored back.

    I'm not angry.
    "You wouldn't like me when I'm angry."
    http://en.Wikipedia.org/wiki/The_Incredible_Hulk _ (TV_series)

    Just keen you can do good things.

    Think about what's going on with this autonomous transaction.
    If I run a delete transaction that subsequently cancels for any reason, you have just updated your xx_per_all_vacancies table.
    And you did it in a standalone transaction.
    That must be validated.
    So it won't restore.
    Is that what you want?

    Unless you connect to something that should engage regardless of the success or failure of the main operation, you should not use autonomous transactions.

    None of the actions performed by your trigger must be commit the code to be directly in a trigger or procedure.

    You should also read up on statement restarts and the consequences for triggers to see why the use of the autonomous transaction is doubly bad.
    http://tkyte.blogspot.com/2010/04/that-old-restart-problem-again.html

    So, in summary, if you really need to do all this in a trigger (really?) have then the logic of the trigger or call to a procedure (preferable), do not use an autonomous transaction, not to commit. Simple.

    Also, if it doesn't "work" provide a bit more detail. Error messages, line numbers, they are all here to help. To say something is does not, is not useful.

    Published by: Dom Brooks on February 23, 2011 11:23

    Published by: Dom Brooks on February 23, 2011 11:26

Maybe you are looking for

  • Windows 10 install stuck on "implementing updates to.

    I used Bootcamp to install Win 7 on my MacBook Air (13 "mid-2012). Now, I want to take advantage of the free upgrade to Windows 10.  I downloaded the app update, GetWindows10-Web_Default_Attr, and it seems to finish the installation.  But at the end

  • BlackBerry Z10 voicemail

    Hello! I have in the HUB a voicemail that I can't remove, I tried the menu by selecting the notification and remove... Do not work... I called more than 1000 times to voicemail and checked whether it is something else, but the automated system tells

  • Why checkers continues after my opponent closes?

    Play checkers When your opponent closes a game and the computer takes over, the game should end at this point.  Continuing to play against the computer is a waste of time. In addition, when your opponent takes too long to move and you click on 'move'

  • Discover the lines of odd values

    Oracle 11.2.0.1Windowscreate table marks)number of rollno,Number of the object,Mark VARCHAR2 (3))/insert into values of brands (1,1,40);insert into values of brands (1,2,35);insert into values of brands (1,3,35);insert into values of brands (1,4,38);

  • Cannot change a custom section

    HelloI created a custom section called 'FOCUS' in my profile. Screenshot attached.I can't edit this section. I have tried in different browsers but had no luck. I can change everything.Any ideas?Thank you very muchGillian