with 'PRAGMA AUTONOMOUS_TRANSACTION' function calls another function

I have the 'B' function that is marked as "PRAGMA AUTONOMOUS_TRANSACTION".
Inside the function definition of 'B', I call a function usual non-autonoumus 'C '.
No autonomous function 'A' called 'B '.
In short:
'A' called 'autonomousB '.
'autonomousB' called 'C '.

It is: function 'C' runs in a standalone transaction now?
I understand that everything that is managed or called within an autonomous framework is also running in the standalone context and so I donat must score more 'C' function as independent, is it true?

Published by: CharlesRoos on April 13, 2010 05:40

Looks like you answered your own question.

Have you set up a test case?

SQL> SELECT * FROM V$VERSION;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

SQL> CREATE TABLE MSG_TEST(MSG VARCHAR2(50))

Table created.

SQL> CREATE OR REPLACE PROCEDURE C
  2  AS
  3  BEGIN
  4          INSERT INTO MSG_TEST VALUES('This is procedure C');
  5  END;
  6  /

Procedure created.

SQL> CREATE OR REPLACE PROCEDURE B
  2  AS
  3          PRAGMA AUTONOMOUS_TRANSACTION;
  4  BEGIN
  5          INSERT INTO MSG_TEST VALUES('This is procedure B');
  6          C;
  7          COMMIT;
  8  END;
  9  /

Procedure created.

SQL> CREATE OR REPLACE PROCEDURE A
  2  AS
  3  BEGIN
  4          INSERT INTO MSG_TEST VALUES('This is procedure A');
  5          B;
  6  END;
  7  /

Procedure created.

SQL> EXEC A;

PL/SQL procedure successfully completed.

SQL> SELECT * FROM MSG_TEST;

MSG
--------------------------------------------------
This is procedure A
This is procedure B
This is procedure C

SQL> ROLLBACK;

Rollback complete.

SQL> SELECT * FROM MSG_TEST;

MSG
--------------------------------------------------
This is procedure B
This is procedure C

SQL>

Tags: Database

Similar Questions

  • 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.

  • Help: call function that calls another function

    public var sourceFile:File = File.applicationDirectory.resolvePath ("serverIP.txt");

    public var fstream:FileStream = new FileStream();

    public var svrAdd:String = ";


    private void readText(e:Event):void {}

    svrAdd = fstream.readUTFBytes (fstream.bytesAvailable);

    FileStream ();

    }


    public function get vrieniHttpURL (): String

    {

    {}

    fstream.addEventListener (Event.COMPLETE, readText); // I want the readText run before function

    fstream.openAsync (sourceFile, FileMode.READ);    / / because I want to get the new value of svrAdd

    } while(svrAdd == '')

    var v: String = "http://'+ svrAdd +'/ Zion/php /'; "

       return v;

    }

    PLEASE HELP ME

    Hello

    First of all, please go through the Flex documentation on what is aynchronous operation is... ? I think that you are not familiar with this concept... Well, let me explain...

    public function get vrieniHttpURL (): String

    {

    {}

    fstream.addEventListener (Event.COMPLETE, readText);

    fstream.openAsync (sourceFile, FileMode.READ);

    delay execution

    } while(svrAdd == '')

    var v: String = "http://'+ svrAdd +'/ Zion/php /';"

    Return to v;

    }

    In the function as you posted the closure is not necessary it will loop continuously and defenitely will enter an infinite loop because svrAdd remains empty string("") how long loop you... it is because fstream.openAsync (sourceFile, FileMode.READ); is that an asynchronous operation means that the function redaText is executed only when the text file is read completely until the application does not wait for the service to call at the place he will perform the following lines of code in the function vrieniHttpURL i.e;

    var v: String = "http://'+ svrAdd +'/ Zion/php /';"

    Return to v;

    lines executed and your return value will be "http://Zion/php /" instead of http://votre_domaine/Zion/php /.

    Use the code to get the solution below:

    Import mx.core.Application;
      
    public var sourceFile:File = File.applicationDirectory.resolvePath ("serverIP.txt");
    public var fstream:FileStream = new FileStream();
    public var svrAdd:String = ";

    private void readText(e:Event):void {}
    svrAdd = fstream.readUTFBytes (fstream.bytesAvailable);
    FileStream ();
    svrAdd = 'http://'+ svrAdd +'/ Zion/php /';
    }
    public function vrieniHttpURL (): void
    {
    fstream.addEventListener (Event.COMPLETE, readText); I want the readText function to run before
    fstream.openAsync (sourceFile, FileMode.READ);    because I want to get the new value of the svrAdd
    }

     

     

    So whats that the above code is once when the 'vrieniHttpURL' function is called you open the file in read mode, and you cannot get the value of the svrAdd within this service because the contents of the file have not yet read... the content in the file is read-only once the readText function is executed... so once your readText function performed you will have your svrAdd filled with the correct value... That is to say; It contains your exact address. If after this you can use the value of svrAdd... you can not return the value of svrAdd with in the function 'vrieniHttpURL' as you did in your code.

     

    Give it a try...

     

    In fact I am unable to understand why you are so much unnecessary things... you can simply save your domain address in a variable and access in your application as below.

     

    public var svrAdd:String = http://yourdomainname.com/;

     

    If your domain name will change dynamically...?

     

    Please mark as answer if it helped you...

     

    Thank you

    Jean Claude Chari.S

     

     

     

     

     

     

  • Need help with filterFunction with special character function

    Hello

    I am a simple/search filter process to a collection of dataGrid on the text with the filterFunction function entries. Is what I am facing problem in one of my column field (on which I'm filtering) point '. ' as a suffix and it is not included in the research process.

    I have a few values as - i_24., i_245., i_256.

    Now with the function current filterfunction when a user entered i_24. It shows another recording as well - i_245, where the expected input should be i_24. (since i_245 is not i_24.5)

    But it seems that the search function does not take point '. ' as a character in the research process, or at least when it is left as a suffix.

    I toilet maybe some RegExp could solve the problem, but I'm not good and more.

    Help, please.

    Thank you.

    Kind regards

    Shad

    aSuitableBoy,

    Use the 'indexOf' of the string method.  (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/String.html#indexOf ()).
    The syntax is the following: "String (.)." indexOf ()

    Here's a little snippet of code that I have written, that works:

    http://www.Adobe.com/2006/mxml"layout ="absolute"creationComplete ="cc (); » >

    Import mx.controls.Alert;

    Import mx.collections.ArrayCollection;

    [Bindable] private var ac:ArrayCollection = new ArrayCollection();

    private void cc (): void

    {

    var o: Object = new Object();

    o.Field1 = "value 1: ';

    o.Field2 = 'i_24.';

    o.field3 = 'another value '. » ;

    ac.addItem (o);

    o = new Object();

    o.Field1 = ' value 2 ';

    o.Field2 = 'i_245.';

    o.field3 = 'another value '. » ;

    ac.addItem (o);

    o = new Object();

    o.Field1 = "value 3:";

    o.Field2 = 'i_256.';

    o.field3 = 'another value '. » ;

    ac.addItem (o);

    }

    private void filterFunc(o:Object):Boolean

    {

    return String (o.field2) .indexOf ("i_24."). = -1 ;

    }

    ]]>

  • Help with JDBC stored functions

    Hello.. Im having problems with my stored functions (java oracle), where I create the functions but then im I call them, it does not return any value (nothing happens after that I called my function). Can someone help me?

    Here's how to create the registered function:

    /************************************************** ****************/
    create or replace FUNCTION insert_client_func (a_client_name IN CLIENTS.client_name%TYPE)

    RETURN VARCHAR2

    IS


    BEGIN

    INSERT INTO CUSTOMERS (client_name)

    VALUES (a_client_name);


    Return a_client_name;

    END;
    /************************************************** *****************/

    Heres how I call it:

    /************************************************** *****************/
    name = "'" + name + "'";

    Command string = "{call insert_client_func("+name+")}";

    try {}
    String url="jdbcracle:thin:@localhost:1521e; »
    this.dbConnection = DriverManager.getConnection (url, "bd2009", "bd2009");
    System.out.println (Command);
    This.callstmt = This.DbConnection.prepareCall (command d);
    this.callstmt.registerOutParameter (1, Types.VARCHAR);
    this.callstmt.executeUpdate ();
    String simpleArray = this.callstmt.getString (1);
    System.out.println (simpleArray);

    this.dbConnection.commit ();
    This.callstmt.Close ();
    this.dbConnection.close ();
    }
    /************************************************** *****************/

    The syntax of your call is incorrect. For functions, it should be

    "{ ? = call insert_client_func (?)} »

    You can also use the syntax of PL/SQL

    ' BEGIN?: = insert_client_func (a_client_name =>?); END; »

    Then configure your settings

    this.callstmt.registerOutParameter (1, Types.VARCHAR);
    this.callstmt.setObject(2, );

    What is the data type of IN_CLIENTS.client_name?

    Call the function and retrieve the return value

    This.callstmt.Execute ();
    String value = this.callstmt.getString (1);

  • Satellite Pro A300 - 1 GR - VGA ports with TV-out function?

    Hello

    Can someone tell me if the VGA port on my Satellite Pro A300-1 (Mobile Intel GMA 4500MHD) is equipped with TV-out function?

    If a single cable is needed to connect with TV's S-video input while a TV-out function is not available, then a relatively expensive converter is necessary?

    Any help will be greatly appreciated.

    Have you checked the user manual?
    What is the manual says?

  • SatelliteA205 - player for the top menu with shortcuts for functions (Fn)

    Hello

    I have a Satellite A205-S4797 and I installed Vista Business (Pt_Br).
    Even with the drivers for Vista, I can not install the top menu with shortcuts to functions (Fn).

    Is there a specific driver for this version of Vista (Pt_Br)?

    If you write on flash cards that you need to install the package of added value. This package contains several tools and utilities, and one of them is for flash cards.

    Please check the Toshiba download page and see if the VAP is listed.

  • Satellite A100-220: is it possible to extend with the WLan functionality?

    As in the title: is it possible to extend the Satellite A100-220 - without builtin WLAN - with the WLAN functionality?

    Hello

    It is not a problem to use the WLAN option on the unit without internal WLAN card. You can also use the little USB WLAN stick. It is very small and easy to configure. Before you buy something to pick up the info from your local dealer.

  • How to find the number of data items in a file written with the ArryToFile function?

    I wrote a table of number in 2 groups of columns in a file using LabWindows/CVI ArrayToFile... Now, if I want to read the file with the FileToArray function so how do I know the number of items in the file. during the time of writing, I know how many elements array to write. But assume that I want the file to be read at a later time, then how to find the number of items in the file, so that I can read the exact number and present it. Thank you all

    Hello

    I start with the second question:

    bytes_read = ReadLine (file_handle, line_buffer, maximum_bytes);

    the second argument is the buffer to store the characters read, so it's an array of characters; It must be large enough to hold maximum_bytes the value NULL, if char [maximum_butes + 1]

    So, obviously the number of lines in your text tiles can be determined in a loop:

    Open the file

    lines = 0;

    While (ReadLine () > 0)

    {

    lines ++;

    }

    Close the file

  • In our Production, we can share the password of user of database 'Apps' with our consultants functional, although they would like to examine through fields by (help > Diagnostics > review) and here he asked the password of the user "APPS".

    In our Production, we can share the password of user of database 'Apps' with our consultants functional, although they would like to examine through fields by (help > Diagnostics > review) and here he asked the password of the user "APPS". We need to know the path where they can examine the field without knowing the password for user "apps".

    Check

    How to enforce password Protection to access the Menu help > Diagnostics > review? (Doc ID 1487534.1)

  • My Wacom pen works with all other functions than the brush / pencil?

    My Wacom pen works with all other functions than the brush / pencil. He painted with the opposite end, the eraser to erase end? Does anyone have a suggestion what to do?

    Annette

    My husbond problem - I had somehow clicked away from the "normal" position Ooops!

  • Problems with the Row_Number function

    I have problems with the Row_Number function. I use to assign line numbers to records where a student has a note of passage on a module and the exclusion of the modules failed (I want to show her a 0 as the line number for the modules failed). The problem is that when I try to use a condition, the report still assigns a line number to a defective module if it does not display it (it shows a 0 I wanted to show him). The results are displayed as follows:

    Line number Module Grade
    1ModuleAPass
    2ModuleBPass
    0ModuleCIn case of failure
    4 (instead of 3)ModuleDPass

    How can I make him jump to assign a line number to all the modules failed? Please help.

    Thank you.

    Thank you very much, Melanie. I made changes to query as per your suggestion, which is a union of the modules failed and passed (using row_number on success modules). Thanks for the solution.

  • Display with the Table function in pipeline object

    I try to use a read only View object with a pipeline function table which takes in and defined by the user returns the objects. I work with an OraclePreparedStatement, but want to use a view object.

    This is the query:
    SELECT test_pkg.test_function(?,?) FROM DUAL;

    How can I configure the input parameters of the View object? The only method I can find available is setWhereClauseParam, but there is no where clause.
    Is it possible to use an object view in this situation?

    Any help is greatly appreciated. Thank you.
    S

    This can be done very easily. The query of your view object should be:

    SELECT *
      FROM TABLE(test_pkg.test_function(:bind1, :bind2))
    

    Then create variable bind for both parameters.
    You will set the bind variable in the same way that you define bind variables for any other question.

    Published by: jflack on April 9, 2013 16:28

  • Problem with the GetParameter() function in IScript

    Hello

    I am facing a problem with the GetParameter() function in IScript. I created a URL below and appellant IScript

    GenerateScriptContentURL ("EMPLOYEE", "MFC", Record.WEBLIB_REPT_SJ, Field.ISCRIPT1, "FieldFormula", "IScript_GetAttachment"). "? FileName =' | & AttachUserFileURL;

    before generating URLS, I'm just encrypt the name of the ZIP file & assignment in the variable string & AttachUserFileURL I concatenated in link above.

    and try to take the value encrypted text of decryption by %Request.GetParameter("FileName") in IScript who isn't able to get special characters such as +, is.

    Please get this.

    Thank you

    Edited by: 936729 may 25, 2012 03:35

    + and = are allowed in URLS. You just have to URL encode like this EncodeURLForQueryString(&AttachUserFileURL) before adding them to your URL:

    GenerateScriptContentURL("EMPLOYEE", "HRMS", Record.WEBLIB_REPT_SJ, Field.ISCRIPT1, "FieldFormula", "IScript_GetAttachment") | "?FileName=" | EncodeURLForQueryString(&AttachUserFileURL);
    

    Here is the entrance of PeopleBook for EncodeURLForQueryString:

    http://docs.Oracle.com/CD/E28394_01/pt852pbh1/Eng/psbooks/TPCL/htm/tpcl02.htm#_6453b1b1_1355ab71343__503e

  • Frame using Vector with the trace function

    Hi all

    When I convert a raster to vector with the trace function, the result is excellent but I want to reduce the number of points, so I have less layers when I import it to the painter. Can anyone advise how to do?

    Rayne

    RayneMaker,

    You can select everything on every layer, Ctrl/CmdClicking on the names of layers, Ctrl / Cmd + A and Ctrl / Cmd + C to copy the whole and then open a new document, deselect the layers of dough remembers in the layers flyout and Ctrl / Cmd + F to insert a single layer.

    I'm still with 10, and there may be more easy/more smart solutions (in later versions).

Maybe you are looking for

  • "Hey Siri" does not not on iOS 10.0.1 on iPhone 7 more

    Hello "Hey Siri" did not work on iOS 10.0.0 on my iPhone 7 more. When I say the command, the screen trying to move on the screen of Siri but then quickly goes back to where I was before, everything in a second. I did the software updated to 10.0.1 af

  • recovery of iMessage

    Apple IS able to print a copy of the imessafe to their store locations?

  • iOS touchscreen 9.2 / scrolling

    After installing iOS (iPad air) of 9.2 scrolling in Safari and Firefox is very slow and not smooth at all. Is this a bug? What should do?

  • What is IQ Updater and is it Microsoft?

    What is iqupdater? What is Microsoft. I get a pop that says that there is an update available. But I've never heard of him and I think that maybe it's a scam, a virus.

  • BBM blackberry messenger restore/download

    -Very well, is thoughtless and I tried to update my blackberry Messenger (BBM) and the download/update canceled. Later, I restarted my phone and when I tried to open up BBM, it wasn't there. I checked everywhere and now I don't have him anymore. I tr