Transactions across procedures

Hi all,
I have a procedure ProcA and procedure ProcB both of which have transactions
Case1. ProcA calls ProcB
Case2. ProcB can also be called independently
How do we handle commits? (something to do with transaction_ids I guess but not sure)
For case 1, we don’t want the commit on ProcB(Only in procA)
But in case 2 we do need a commit.
Any help would be much appreciated

Like John and many others, I'm opposed to having commits in stored procedures in the vast majority of cases. Regardless, there is no magical way for ProcB to know whether you want it to commit or not. You'll need to have an argument to tell it to do so. Give it a default value of true and then you only need to specify it in the call from ProcA.

Similar Messages

  • Transaction Notofocation Procedure - How to know the SAP user?

    Hi Experts,
    In the transaction notification procedure can we know the name of the SAP user whose transaction is being processed?
    Thanks a lot.
    Regards,
    B.

    hi
    sapgenpse get_my_name -v -n validity
    http://wiki.sdn.sap.com/wiki/display/Basis/HowtorenewtheSAPRouterlicense
    http://www.saptechies.com/how-to-renew-the-sap-router-certificate-validity_1/
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCSTROUT/BCCSTROUT.pdf
    Kiran

  • Using ATMI and tuxedo to institue distributed transactions across multiple DBs

    I am creating the framework for a given application that needs to ensure that data
    integrity is maintained spanning multiple databases not necessarily within an
    instance of weblogic. In other words, I need to basically have 2 phase commit
    "internet transactions" between a given coordinator and n participants without
    having any real knowlegde of their internal system.
    Originally I was thinking of using Weblogic but it appears that I may need to
    have all my particular data stores registered with my weblogic instance. This
    cannot be the case as I will not have access to that information for the other
    participating sytems.
    I next thought I would write my own TP...ouch. Everytime I get through another
    iteration I kept hitting the same issue of falling into an infinite loop trying
    to ensure that my coordinator and the set of participants were each able to perform
    the directed action.
    My next attempt has led me to the world of ATMI. Would ATMI be able to help me
    here. Granted I am using JAVA so I am assuming that I would have to use CORBA
    to make the calls but will ATMI enable me to truly manage and create distributed
    transactions across multiple databases. Please, any advice at all would be greatly
    appreciated.
    Thanks
    Chris

    Andy
    I will not have multiple instances of weblogic as I cannot enfore that
    the other participants involved in the transaction have weblogic as
    their application server. That being said, I may not have the choice
    but to use WTC.
    Does this make more sense?
    Andy Piper <[email protected]> wrote in message news:<[email protected]>...
    "Chris" <[email protected]> writes:
    I am creating the framework for a given application that needs to ensure that data
    integrity is maintained spanning multiple databases not necessarily within an
    instance of weblogic. In other words, I need to basically have 2 phase commit
    "internet transactions" between a given coordinator and n participants without
    having any real knowlegde of their internal system.
    Originally I was thinking of using Weblogic but it appears that I may need to
    have all my particular data stores registered with my weblogic instance. This
    cannot be the case as I will not have access to that information for the other
    participating sytems.I don't really understand this. From 6.0 onwards you can do 2PC
    between weblogic instances, so as long as the things you are calling
    are transaction (EJBs for instance) it should all work out fine.
    I next thought I would write my own TP...ouch. Everytime I get through another
    iteration I kept hitting the same issue of falling into an infinite loop trying
    to ensure that my coordinator and the set of participants were each able to perform
    the directed action.
    My next attempt has led me to the world of ATMI. Would ATMI be able to help me
    here. Granted I am using JAVA so I am assuming that I would have to use CORBA
    to make the calls but will ATMI enable me to truly manage and create distributed
    transactions across multiple databases. Please, any advice at all would be greatly
    appreciated.I don't see that ATMI would give you anything different. Transaction
    management Tux is fairly similar to WebLogic (it was written by the
    same people). If you are trying to do interposed transactions
    (i.e. multiple co-ordinators) then WTC would give you this but it is
    only a beta feature in WLS 6.1. Using Tux domain gateways would also
    give you interposed behaviour but would require you write your servers
    in C or C++ ....
    andy

  • Using ATMI and tuxedo for distrubuted transactions across multiple DBs

              I am creating the framework for a given application that needs to ensure that data
              integrity is maintained spanning multiple databases not necessarily within an
              instance of weblogic. In other words, I need to basically have 2 phase commit
              "internet transactions" between a given coordinator and n participants without
              having any real knowlegde of their internal system.
              Originally I was thinking of using Weblogic but it appears that I may need to
              have all my particular data stores registered with my weblogic instance. This
              cannot be the case as I will not have access to that information for the other
              participating sytems.
              I next thought I would write my own TP...ouch. Everytime I get through another
              iteration I kept hitting the same issue of falling into an infinite loop trying
              to ensure that my coordinator and the set of participants were each able to perform
              the directed action.
              My next attempt has led me to the world of ATMI. Would ATMI be able to help me
              here. Granted I am using JAVA so I am assuming that I would have to use CORBA
              to make the calls but will ATMI enable me to truly manage and create distributed
              transactions across multiple databases. Please, any advice at all would be greatly
              appreciated.
              Thanks
              Chris
              

              I am creating the framework for a given application that needs to ensure that data
              integrity is maintained spanning multiple databases not necessarily within an
              instance of weblogic. In other words, I need to basically have 2 phase commit
              "internet transactions" between a given coordinator and n participants without
              having any real knowlegde of their internal system.
              Originally I was thinking of using Weblogic but it appears that I may need to
              have all my particular data stores registered with my weblogic instance. This
              cannot be the case as I will not have access to that information for the other
              participating sytems.
              I next thought I would write my own TP...ouch. Everytime I get through another
              iteration I kept hitting the same issue of falling into an infinite loop trying
              to ensure that my coordinator and the set of participants were each able to perform
              the directed action.
              My next attempt has led me to the world of ATMI. Would ATMI be able to help me
              here. Granted I am using JAVA so I am assuming that I would have to use CORBA
              to make the calls but will ATMI enable me to truly manage and create distributed
              transactions across multiple databases. Please, any advice at all would be greatly
              appreciated.
              Thanks
              Chris
              

  • Distributed transactions across RMI-IIOP client to RMI-IIOP server do not work

    Hi,
              Based on the links below:
              http://e-docs.bea.com/wls/docs61/jta/trxrmi.html#1018506
              http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1067532
              It appears that is possible to have distributed transactions across RMI-IIOP
              clients and RMI-IIOP applications (servers).
              I followed up the "Transactions Sample RMI Code" section but it appears that
              the transaction context is not propagated from client to server. I am also
              surprised by the note:
              Note: These code fragments do not derive from any of the sample applications
              that ship with WebLogic Server. They merely illustrate the use of the
              UserTransaction object within an RMI application.
              The above note suggests that there is no sample code available.
              Is there anyone who successfully had RMI-IIOP applications (servers)
              participating in distributed transactions?
              Is there any sample code that illustrates RMI-IIOP applications (servers)
              participating in distributed transactions?
              If anyone thinks that this should work I will post my code that does not
              work.
              Regards,
              Dan Cimpoesu
              

    But if you look to the diagram:
    http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1040200
    it suggests that transactional context is passed from clients to RMI-IIOP
    servers.
    Am I wrong?
    Dan
    "Andy Piper" <[email protected]> wrote in message
    news:[email protected]..
    "Dan Cimpoesu" <[email protected]> writes:
    Transactions over IIOP are not supported or implemented in WLS 6.1 or
    previous. This is a feature of WLS 7.0. In 7.0 we implement OTS.
    andy
    Hi,
    Based on the links below:
    http://e-docs.bea.com/wls/docs61/jta/trxrmi.html#1018506
    http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1067532
    It appears that is possible to have distributed transactions across
    RMI-IIOP
    clients and RMI-IIOP applications (servers).
    I followed up the "Transactions Sample RMI Code" section but it appearsthat
    the transaction context is not propagated from client to server. I amalso
    surprised by the note:
    Note: These code fragments do not derive from any of the sampleapplications
    that ship with WebLogic Server. They merely illustrate the use of the
    UserTransaction object within an RMI application.
    The above note suggests that there is no sample code available.
    Is there anyone who successfully had RMI-IIOP applications (servers)
    participating in distributed transactions?
    Is there any sample code that illustrates RMI-IIOP applications(servers)
    participating in distributed transactions?
    If anyone thinks that this should work I will post my code that does not
    work.
    Regards,
    Dan Cimpoesu

  • Distributed transactions across RMI-IIOP client to server do not work

    Hi,
    Based on the links below:
    http://e-docs.bea.com/wls/docs61/jta/trxrmi.html#1018506
    http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1067532
    It appears that is possible to have distributed transactions across RMI-IIOP
    clients and RMI-IIOP applications (servers).
    I followed up the "Transactions Sample RMI Code" section but it appears that
    the transaction context is not propagated from client to server. I am also
    surprised by the note:
    Note: These code fragments do not derive from any of the sample applications
    that ship with WebLogic Server. They merely illustrate the use of the
    UserTransaction object within an RMI application.
    The above note suggests that there is no sample code available.
    Is there anyone who successfully had RMI-IIOP applications (servers)
    participating in distributed transactions?
    Is there any sample code that illustrates RMI-IIOP applications (servers)
    participating in distributed transactions?
    If anyone thinks that this should work I will post my code that does not
    work.
    Regards,
    Dan Cimpoesu

    But if you look to the diagram:
    http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1040200
    it suggests that transactional context is passed from clients to RMI-IIOP
    servers.
    Am I wrong?
    Dan
    "Andy Piper" <[email protected]> wrote in message
    news:[email protected]..
    "Dan Cimpoesu" <[email protected]> writes:
    Transactions over IIOP are not supported or implemented in WLS 6.1 or
    previous. This is a feature of WLS 7.0. In 7.0 we implement OTS.
    andy
    Hi,
    Based on the links below:
    http://e-docs.bea.com/wls/docs61/jta/trxrmi.html#1018506
    http://e-docs.bea.com/wls/docs61/jta/gstrx.html#1067532
    It appears that is possible to have distributed transactions across
    RMI-IIOP
    clients and RMI-IIOP applications (servers).
    I followed up the "Transactions Sample RMI Code" section but it appearsthat
    the transaction context is not propagated from client to server. I amalso
    surprised by the note:
    Note: These code fragments do not derive from any of the sampleapplications
    that ship with WebLogic Server. They merely illustrate the use of the
    UserTransaction object within an RMI application.
    The above note suggests that there is no sample code available.
    Is there anyone who successfully had RMI-IIOP applications (servers)
    participating in distributed transactions?
    Is there any sample code that illustrates RMI-IIOP applications(servers)
    participating in distributed transactions?
    If anyone thinks that this should work I will post my code that does not
    work.
    Regards,
    Dan Cimpoesu

  • I Don't know how to use SBO Transaction Notification  procedure

    Hi all
    I don't know how to use SBO Transaction Notification  procedure
    can any body give me description why we use,where we use,how we use some example
    Awaiting soon reply
    Rajkumar G.

    example is for testing, if on delivery is filled ref no of vendor or not
    if @object_type = '20'  and (@transaction_type= 'A' or @transaction_type= 'U')
    begin
         if 1 = (select count(docentry) from opdn with(nolock) where docentry =@list_of_cols_val_tab_del and (numatcard is null or len(numatcard) = 0) )
         begin
              select @error =1
              select @error_message = 'vendor ref no isnt filled'
         end
    end
    next example is for creating BP as vendor and testing, if dont begin for specific sign
    if @object_type = '2' and @transaction_type= 'A'
    begin
    if left(@list_of_cols_val_tab_del, 1) = N'x' or left(@list_of_cols_val_tab_del, 1) = N'X'
         begin
              if 1 = (select count(cardcode) from ocrd where cardcode = @list_of_cols_val_tab_del and cardtype in ('S', N'S') )
                   begin
         select @error =1
              select @error_message = 'Vendor code cannot begin to X sign.'
    end
         end
    end
    is it clear?

  • Any plan to support tightly coupled transactions across domains?

    Hello,
    is there any plan to support tightly coupled XA transactions across domains?
    Our application has a few global transactions that span multiple domains. One domain updates a record in the Oracle DB. Later on in the same transaction the second domain retrieves the same record. But because of the loose coupling, the second domain cannot see the changes made by the first domain.
    Thanks...
    Roger
    PS: In some cases the second domain is actually a WLS domain. Because the loose coupling is a limitation of the Tuxedo Domain Gateway and WTC uses GWTDOMAIN, one could assume that once Tuxedo supports tightly coupled transactions across domains, WTC would also support it.

    Hi Roger,
    We don't have plans at the moment to solve this problem, although if it is a major problem for you, I suggest you contact Oracle support and ask them to enter an enhancement request. In general most customer have separate databases for each domain or application, thereby not normally running into this problem. Also, changing this in Tuxedo doesn't necessarily mean it would be changed in WLS as they use different transaction managers and the problem is more than a TDomain protocol issue. But generally when we make enhancements like this we try to keep GWTDOMAIN and WTC on par with one another.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Maintaining Transactions Across JSP Pages

    Hi,
    I have a multi page Registration (3 steps). On each step data submitted is taken
    to the database via an EJB component (Session Bean). How do I maintain a transaction
    across these JSP pages (i.e. either in the EJB or in the jsp) so that the data
    in the database is consistent? So if there is a problem in the 3rd step the data
    submitted in the first two steps should be rolled back.
    Can I use a statefull session beans, which will maintain a database connection
    created during the first step, so that I can use the same connection for steps
    2 & 3. In the first step after getting the database connection I will begin a
    transaction and insert the first part of the data, then this connection will be
    maintained by the statefull session and used for steps 2 & 3. At the end I will
    commit the transaction. Will this work?
    How do I maintain transaction across multiple pages? Is there is any standards
    for this scenario where the transaction is maintained across multiple pages. I
    cannot carry data across the jsp pages because of the complex data collected.
    Any help appreciated.
    Regards
    -MohanRaj

    You can not and should not do it the way that you are proposing. Keeping a transaction
    open across any interaction with the user is a big mistake. Transactions are scarce
    resources. They need to be short. You will need to collect the data from the three
    pages in the servlet itself. You can use the HTTPSession, or hidden fields in
    the forms. Only after all of the data is collected should you begin a transaction
    and update the database. Alternatively, you could store the partial data in a
    temporary database table, and move it to a permanent table when all of the data
    has been provided.

  • Maintaining Transaction Across Multiple JSP Pages

              Hi,
              I have a multi page Registration (3 steps). On each step data submited is taken
              to the database via an EJB component (Session Bean). How do I maintain a transaction
              across these JSP pages so that the data in the database is consistent. If a there
              is a problem in the 3rd step the data submitted in the first two steps should
              be rolled back.
              How do I maintain transaction across multiple pages.
              Regards
              -MohanRaj
              

    It will take from several minutes to a long time for a user to complete a multiple page registration process. Do you really have enough database connections that each concurrent user can hold on to one?
    Usually you cannot open more than 50-200 connections to a database at any given time.
    Remember that some users will abandon the registration process. Can you afford that their sessions holds a db conenction until the session times out?
    Consider changing your datamodel so you can run and commit a transaction at the end of processing the form data from a page. Immediately after the commit give the db connection back to the pool inside the app. server.
    It can be as simple as having a column in the database of type enum, with a set of values that shows how far in the registration process the registration has procesed.
    BTW. if you absolutely have to hold on to the db connection, you can stuff it into a session scoped attribute and it will be available on all pages.

  • 하나의 DEFERRED TRANSACTION 에 대한 DEFCALL을 알수있는 PROCEDURE.

    제품 : ORACLE SERVER
    작성날짜 : 2002-11-15
    하나의 DEFERRED TRANSACTION 에 대한 DEFCALL을 알수있는 PROCEDURE.
    =================================================================
    PURPOSE
    다음은 하나의 DEFERRED TRANSACTION 에 대한 DEFCALL을 알수 있는
    PROCEDURE를 제공한다.
    Explanation
    각각의 DEFERRED TRANSACTION에대한 DEFCALL을 알 수 있음에 따라
    DEFERRED TRANSACTION 의 ENTRY 에 대하여 다음과 같은 PROCEDURE를
    이용하여 TRANSACTION을 추적할수 있다.
    Example
    다음의 SCRIPT는 REPADMIN으로 실행하여야 하며(sys user도 가능)
    SQLPLUS에서 SET SERVEROUTPUT ON 을 실행후 사용하여야 한다.
    CREATE OR REPLACE PROCEDURE show_call (t IN VARCHAR2) IS
    -- Print the argument type and values of a deferred call.
    -- Modified for Oracle8 and supports all replicated datatypes including
    -- NCHAR, NVARCHAR and all LOBs. (BFILES are not replicated [yet])
    -- NOTE: set serveroutput on before calling this procedure
    -- set serveroutput on size 100000
    argno number;
    argtyp number;
    argform number;
    callno number;
    tranid VARCHAR2(30);
    typdsc char(15);
    rowid_val rowid;
    char_val varchar2(255);
    nchar_val nvarchar2(255);
    date_val date;
    number_val number;
    varchar2_val varchar2(2000);
    nvarchar2_val nvarchar2(2000);
    raw_val raw(255);
    cursor c_defcall (t VARCHAR2) is
    select callno, deferred_tran_id, schemaname, packagename, procname,
    argcount
    from defcall
    where deferred_tran_id = t;
    BEGIN
    FOR c1rec in c_defcall (t) LOOP
    dbms_output.put_line('Call Number: ' ||c1rec.callno);
    dbms_output.put_line('Call to '
    ||c1rec.schemaname||'.'||c1rec.packagename||'.'||c1rec.procname);
    dbms_output.put_line('# of arguments: '||c1rec.argcount);
    dbms_output.put_line(' ARG ' || 'Data Type ' || 'Value');
    dbms_output.put_line(' --- ' || '--------------- ' ||
    argno := 1;
    callno := c1rec.callno; tranid := c1rec.deferred_tran_id;
    WHILE TRUE LOOP
    if argno > c1rec.argcount then
    exit;
    end if;
    argtyp := dbms_defer_query.get_arg_type(callno, argno, tranid);
    argform := dbms_defer_query.get_arg_form(callno, argno, tranid);
    if argtyp = 1 and argform = 1 then
    typdsc := 'VARCHAR2';
    varchar2_val := dbms_defer_query.get_varchar2_arg(callno, argno,
    tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(varchar2_val,'(NULL)'));
    elsif argtyp = 1 and argform = 2 then
    typdsc := 'NVARCHAR2';
    nvarchar2_val := dbms_defer_query.get_nvarchar2_arg(callno, argno,
    tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(translate(nvarchar2_val using char_cs),'(NULL)'));
    elsif argtyp = 2 then
    typdsc := 'NUMBER';
    number_val := dbms_defer_query.get_number_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(to_char(number_val),'(NULL)'));
    elsif argtyp = 11 then
    typdsc := 'ROWID';
    rowid_val := dbms_defer_query.get_rowid_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(rowid_val,'(NULL)'));
    elsif argtyp = 12 then
    typdsc := 'DATE';
    date_val := dbms_defer_query.get_date_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(to_char(date_val,'YYYY-MM-DD HH24:MI:SS'),'(NULL)'));
    elsif argtyp = 23 then
    typdsc := 'RAW';
    raw_val := dbms_defer_query.get_raw_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(raw_val,'(NULL)'));
    elsif argtyp = 96 and argform = 1 then
    typdsc := 'CHAR';
    char_val := dbms_defer_query.get_char_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(char_val,'(NULL)'));
    elsif argtyp = 96 and argform = 2 then
    typdsc := 'NCHAR';
    nchar_val := dbms_defer_query.get_nchar_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(translate(nchar_val using char_cs),'(NULL)'));
    elsif argtyp = 113 then
    typdsc := 'BLOB';
    varchar2_val := dbms_lob.substr(dbms_defer_query.get_blob_arg(callno,
    argno, tranid));
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(varchar2_val,'(NULL)'));
    elsif argtyp = 112 and argform = 1 then
    typdsc := 'CLOB';
    varchar2_val := dbms_lob.substr(dbms_defer_query.get_clob_arg(callno,
    argno, tranid));
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(varchar2_val,'(NULL)'));
    elsif argtyp = 112 and argform = 2 then
    typdsc := 'NCLOB';
    nvarchar2_val :=
    dbms_lob.substr(dbms_defer_query.get_nclob_arg(callno, argno, tranid));
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(translate(nvarchar2_val using char_cs),'(NULL)'));
    end if;
    argno := argno + 1;
    end loop;
    end loop;
    end;
    Examples
    SQL> select * from deftran;
    DEFERRED_TRAN_ID DELIVERY_ORDER D START_TIM
    3.6.74010 4.9392E+12 R 05-SEP-98
    2.8.74149 4.9392E+12 R 05-SEP-98
    3.0.73506 4.9392E+12 D 02-SEP-98
    SQL> set serveroutput on size 1000000
    SQL> execute show_call('2.8.74149');
    Call Number: 0
    Call to SCOTT.DEPT$RP.REP_UPDATE
    # of arguments: 11
    ARG Data Type Value
    01) RAW 06060707
    02) NUMBER 70
    03) NUMBER (NULL)
    04) CHAR WGT
    05) CHAR (NULL)
    06) CHAR ORLANDO
    07) CHAR RMSC
    08) VARCHAR2 INITIAL
    09) VARCHAR2 MOBAY.WORLD
    10) VARCHAR2 MOBAY.WORLD
    11) VARCHAR2 N
    Call Number: 1
    Call to SCOTT.DEPT$RP.REP_UPDATE
    # of arguments: 11
    ARG Data Type Value
    01) RAW 06060707
    02) NUMBER 75
    03) NUMBER (NULL)
    04) CHAR WGT
    05) CHAR (NULL)
    06) CHAR ORLANDO
    07) CHAR RMSC
    08) VARCHAR2 MOBAY.WORLD
    09) VARCHAR2 MOBAY.WORLD
    10) VARCHAR2 MOBAY.WORLD
    11) VARCHAR2 N
    PL/SQL procedure successfully completed.
    Reference Documents
    <Note:2103883.6>

  • Transaction across threads

    Hi,
    Is it safe to distribute a single transaction across multiple threads? Currently, I have a single thread performing adds/deletes/updates to the db in a single monolithic transaction. This pretty much tops out at about 4-5k/sec. Using multiple writer threads to perform the same operations by dividing them up as jobs across threads while using the same transaction.. is this a feasible idea? If so, what performance improvements can I expect?
    Thanks
    Nikunj.

    Hi Nikunj,
    Yes, you may use a transaction across multiple threads. The place where we synchronize is on lock acquistiion (and lock release at commit time). Your performance will depend on the number of processors and how distributed the keys are (i.e. if you're not operating on conflicting keys in the same transaction then you'll get better concurrency). If the lock table becomes a bottleneck, we have a parameter, je.lock.nLockTables that can be used to split the lock table into multiple lock tables. The doc says:
    Number of Lock Tables. Set this to a value other than 1 when
    an application has multiple threads performing concurrent JE
    operations. It should be set to a prime number, and in general
    not higher than the number of application threads performing JE
    operations.
    You may hit serialization issues on the Transaction object before you do on the lock table.
    Charles Lamb

  • Transaction Handling across Procedures

    In the ODI Best Practice Guide for Data Warehouses I came across the following (page 100):
    "ODI procedures include an advanced mechanism for transaction handling across multiple steps or even multiple procedures."
    It states that transaction handling can occur across multiple procedures. I could not get this to work.
    I created a procedure with just one step that inserts into a table. In the step I have set the Transaction dropdown to Transaction 0 and the Commit dropdown to No Commit. However, when I execute the procedure the insert is committed as we terminate the session.
    Any ideas how this commit can be prevented?

    ok, I figured out that parameters to the JDBC driver can be specified at the properties tab of the data server.
    So I presume this will be autocommit = false or sth. similar
    I still have to try this out.

  • Transactions within/across procedures

    Hi,
    I am new to oracle. I would like to know if a savepoint can be started at a higher level procedure, say proc_nestedlevel_0, and the same transaction continue down through lower level procedures proc_nestedlevel_1...2 . . .3 . . .proc_nestedlevel_n? The lower level procedures have dml statements. After processing the lower level procedures I try and rollback in the proc_nestedlevel_0 but the savepoint is no longer recognized and an exception is thrown. If it is possible to do this, could someone provide me an example as to how? I am finding in order for transaction technology to work in oracle procedures, you have to set a savepoint and have all of the DML statements in the same procedure. Only then will any savepoints be "recognized" as being set.
    Any help is appreciated.
    Thanks.

    If it is possible to do this, could someone provide me an example as to how?
    SQL> create or replace procedure p_2th_level
      2  is
      3  begin
      4   insert into t values(3);
      5   rollback to point_0;
      6  end;
      7  /
    Procedure created.
    SQL> create or replace procedure p_1th_level
      2  is
      3  begin
      4   insert into t values(2);
      5   p_2th_level;
      6  end;
      7  /
    Procedure created.
    SQL> create or replace procedure p_0th_level
      2  is
      3  begin
      4   insert into t values(1);
      5   savepoint point_0;
      6   p_1th_level;
      7  end;
      8  /
    Procedure created.
    SQL> select * from t;
    no rows selected
    SQL> exec p_0th_level
    PL/SQL procedure successfully completed.
    SQL> select * from t;
            ID
             1
    I try and rollback in the proc_nestedlevel_0 but the savepoint is no longer
    recognized and an exception is thrown. Don't you complete transaction inside "nested" procedures ? Check this:
    SQL> create or replace procedure p_1th_level
      2  is
      3  begin
      4   insert into t values(2);
      5   commit;
      6   p_2th_level;
      7  end;
      8  /
    Procedure created.
    SQL> exec p_0th_level
    BEGIN p_0th_level; END;
    ERROR at line 1:
    ORA-01086: savepoint 'POINT_0' never established
    ORA-06512: at "SCOTT.P_2TH_LEVEL", line 5
    ORA-06512: at "SCOTT.P_1TH_LEVEL", line 6
    ORA-06512: at "SCOTT.P_0TH_LEVEL", line 6
    ORA-06512: at line 1Rgds.

  • Oracle 11g: How to ensure the same transaction across several BPEL calls?

    How to ensure transaction semantics across invocations of several BPEL services with a Database operations (Insert, update)? We are using transaction REQUIRED property in all of our BPELs. We are using webserive and JCA to access and modify the same row. Our code uses a combination of JCA, Spring bean, enity services, EJBs in these BPELs. The code can be more efficient, but, at this point, we have no option but to fix the transaction issue in this code. So, our question is how to ensure the same transaction context is used in all these BPELs to inser/update the same row? We have tried to set the GetUnitOfWork in the JCA Adapter but it did not provide any solution. Apaert from setting transaction in BPEL to REQUIRED and the JCA Adapter to use Unit of work, we are out of ideas. Any help is much apprecited. We are using Oracle SOA Suite 11g 11.1.1.5 version. --chary

    Hi,
    I can help you if you can describe the processes.
    There can be some difficulties when you try to use the same transaction especially when you use many DB transactions & BPEL processes.
    Using unit of work only ,might not be enough.
    Thanks
    Arik

Maybe you are looking for

  • CS4 Install errors in Windows 7 - Need help!

    I just got this great new ASUS G73JW laptop with windows 7 home premium on it, 8 gigs of Ram, Intel Core I7, Nvidia 480 video card.  One of my biggest reasons for getting it was to run CS4 Master Collection on it so i can work from the road.  However

  • Upgrade from G5 to Mac Pro--no apple TV

    I had all my data transfered at the apple store, but no devices in itunes. I have 2 apple TV's which have been upgraded to 2.0 and they were working fine before. I can't find a place in apple TV 2.0 to resync. How do I get my new Mac Pro to recognize

  • Aperture 3 library appears as a folder?

    I have several Aperture 3 libraries and they all appear as the standard triple pane icon (package I believe-just click it and the library opens in Aperture).  However, my main Aperture 3 library (some 25K pics) appears as a blank folder containing 11

  • Weblogic deployment 11

    Hi, we are isntalling and configuring 11.1.on 64 bit platform and we have web logic with it. I am confused whether to go with manual deployment or auto deployment Any ideas Usha

  • Package Batch File Error Level?

    I have ended all of my SCCM Packages witht he following: exit /B %EXIT_CODE% and the scripts are running, but even if they don't run (fail) the console shows success. In reading this this Post if I understand correctly they are saying to remove the /