Simulated distributed transactions in WLS5.1

Hello
          I can´t use WLS 6.0 I must use WLS 5.1. So I can´t to use distributed
          transactions.
          So that, my problem is this situation:
          Client code: in WL Personalization Server
          method
          UserTransaction.begin
          class1.create
          class2.updateDatabaseOracle1
          this.comit();
          Exception
          this.rollback();
          method commit
          class1.commit();
          class2.commit();
          UserTransaction.commit
          methdo rollback
          class1.rollback;
          class2.rollback;
          UserTransaction.rollback
          class1 in WL Personalization Server
          create
          EJBCreate
          commit
          EJB.putData
          rollback
          EJB.remove
          EJB in WL5.1
          I get this Error:
          "Connection has already been created in this tx context for pool
          named pool1. Illegal attempt to create connection from another
          pool: pool2"
          Can I modify the type of transaction in the EJB that solve this error??
          if the request is false How can I simulated it?
          I can lose the transanction because my class (class1) implements a
          rollback and commit methods that save it.
          Please Help
          Miguel Lopez Montero
          Soluziona Servicios Internet,Spain
          

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDBC_TX ():
In the readme file of Oracle JDBC drivers 8.1.6.0.1 (http://technet.oracle.com/software/tech/java/sqlj_jdbc/files/Readme_01.txt)
it mentioned that it supports "distributed transactions".
As I understand, JDBC transaction is connection based and uses Oracle internal transaction manager. In order to do "distributed transactions", I must have at least two connections open at the same time each to its own database instance. How does the two connections coordinate the transactions? I thought in order to support "distributed transactions", one has to build a higher layer to encapsulate the two connections and therefore coordinate the distributed transactions. Any examples will be welcome.<HR></BLOCKQUOTE>
The two branches of the transaction are coordinated using 2-phase commit.
For samples look under
$ORACLE_HOME/jdbc/demo/samples/oci8/jdbc20-samples/
null

Similar Messages

  • Distributed transactions/jdbc problem WL60

    Hi
              Our company has aworking application running on WLS5.1sp9.
              Im in the process of migrating it to WL6.0sp2.
              Our domain has 2 clusters each running 2 servers:
              1) servlet engines (handling http requests from clients, running servlets
              and jsp's)
              2) ejb containers (runnigour entities and session beans, working with Oracle
              8i database using connection pool and TxDataSource)
              The scenario:
              - a client request invokes a servlet on one of the servlet engines.
              - the servlet opens a jndi context to one of the ejb containers
              - the servlet open a transaction on a UserTransaction stub on that ejb.
              - then the servlet calls an entity bean using a home interface looked up
              using the same context.
              - the entity bean uses DataSource lookup in its own servers jndi to rerieve
              a connection.
              and then i get the following exception:
              java.sql.SQLException: No default driver for database type:
              jdbc:weblogic:jts
              at
              weblogic.jdbcbase.t3.Driver.seeIfWeNeedToInferDriverNameAndUrlFrom(Driver.ja
              va:456)
              at weblogic.jdbcbase.t3.Driver.getAllPropsFrom(Driver.java:255)
              at weblogic.jdbcbase.t3.Driver.connect(Driver.java:75)
              at weblogic.jdbcbase.jts.Driver.createRemoteConnection(Driver.java:199)
              at weblogic.jdbcbase.jts.Driver.connect(Driver.java:134)
              at
              weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java
              :44)
              at com.unisfair.util.DBHelper.getConnection(DBHelper.java:43)
              the transaction toString() gives:
              transaction=(IdHash=7541556,Name = [EJB
              UserBeanImpl.generateSessionSuffix()],Xid=2:b53da78d3c1badbb,Status=Active,n
              umRepliesOwedMe=0,numRepliesOwedOthers=1,seconds since begin=0,seconds
              left=30,activeThread=Thread[ExecuteThread: '8' for queue: 'default',5,Thread
              Group for Queue:
              'default'],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=new,assig
              ned=none),SCInfo[ejb2]=(state=active),SCInfo[servlet2]=(state=active),SCInfo
              [ejb1]=(state=active),properties=({weblogic.transaction.name=[EJB
              UserBeanImpl.generateSessionSuffix()], weblogic.jdbc=t3://10.0.0.31:7007}))
              However the error happens on the other ejb server 10.0.0.33:7007
              It seems that the jts driver tries to get a remote connection on the server
              that coordinates the transaction but uses the deprecated t3 driver.
              I hope someone can help us since this problem is a good enough reason for us
              not moving on to WL6.0 we also looked at WL6.1 Beta and theres nothing new
              about it either.
              thanks
              Dror Last
              Senior Software Engineer
              Unisfair Inc.
              12 Yad Haruzim St. Tel Aviv 67778 Israel
              Tel: +972-3-5373738 Ext. 243
              Fax: +972-3-5373731
              GSM: +972-55-723710
              mailto:[email protected]
              http://www.unisfair.com/
              

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDBC_TX ():
    In the readme file of Oracle JDBC drivers 8.1.6.0.1 (http://technet.oracle.com/software/tech/java/sqlj_jdbc/files/Readme_01.txt)
    it mentioned that it supports "distributed transactions".
    As I understand, JDBC transaction is connection based and uses Oracle internal transaction manager. In order to do "distributed transactions", I must have at least two connections open at the same time each to its own database instance. How does the two connections coordinate the transactions? I thought in order to support "distributed transactions", one has to build a higher layer to encapsulate the two connections and therefore coordinate the distributed transactions. Any examples will be welcome.<HR></BLOCKQUOTE>
    The two branches of the transaction are coordinated using 2-phase commit.
    For samples look under
    $ORACLE_HOME/jdbc/demo/samples/oci8/jdbc20-samples/
    null

  • EJB 3.0 and JTA (Distributed transactions)

    hi, first of all sorry for my english.
    then :)
    i'm working with JBoss Aplication Server an Oracle DataBase using EJB 3.0
    i have no problem before ... but now i want work with multiple database and i wand to manage transactions ... how i understand JTA (Java Transaction Api) is a technology for it.
    i think that i need two datasource file for example oracle-xa-ds.xml and postgres-ds.xml
    <datasources>
      <xa-datasource>
        <jndi-name>XAOracleDS</jndi-name>
        <track-connection-by-tx/>
        <isSameRM-override-value>false</isSameRM-override-value>    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
        <xa-datasource-property name="URL">jdbc:oracle:thin:@192.9.200.177:1521:devnbtwo</xa-datasource-property>
        <xa-datasource-property name="User">paata</xa-datasource-property>
        <xa-datasource-property name="Password">1982226</xa-datasource-property>   <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
        <no-tx-separate-pools/>
          <metadata>
             <type-mapping>Oracle9i</type-mapping>
          </metadata>
      </xa-datasource>
      <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
             name="jboss.jca:service=OracleXAExceptionFormatter">
        <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
      </mbean>
    </datasources>
    <datasources>
      <local-tx-datasource>
        <jndi-name>PostgresDS</jndi-name>
       <connection-url>jdbc:postgresql://localhost:5432/Test</connection-url>
        <driver-class>org.postgresql.Driver</driver-class>
        <user-name>postgres</user-name>
        <password>1982226</password>
            <new-connection-sql>select 1</new-connection-sql>
          <metadata>
             <type-mapping>PostgreSQL 7.2</type-mapping>
          </metadata>
      </local-tx-datasource>
    </datasources>and i dont know what should i do in my persistance.xml file ..... when i was working with single database my persistance.xml file was working
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
         version="1.0">     
         <persistence-unit name="Oracle" transaction-type="JTA">
              <jta-data-source>java:/XAOracleDS</jta-data-source>
              <class>com.magti.businesslayer.ejb3entity.Group</class>
              <class>com.magti.businesslayer.ejb3entity.Student</class>
              <properties>
                   <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
                   <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
                   <property name="hibernate.connection.url" value="jdbc:oracle:thin:@192.9.200.177:1521:devnbtwo"/>
                   <property name="hibernate.connection.username" value="paata"/>
                   <property name="hibernate.connection.password" value="1982226"/>
                   <property name="hibernate.default_schema" value="PAATA"/>
              </properties>
         </persistence-unit>     
    </persistence>but then i added anothe unit for second database and i get error
         <persistence-unit name="PostgreSql" transaction-type="JTA">
              <jta-data-source>java:/PostgresDS</jta-data-source>
              <class>com.magti.businesslayer.ejb3entity.Group</class>
              <class>com.magti.businesslayer.ejb3entity.Student</class>
              <properties>
                   <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
                   <property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
                   <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/Test"/>
                   <property name="hibernate.connection.username" value="postgres"/>
                   <property name="hibernate.connection.password" value="1982226"/>
                   <property name="hibernate.default_schema" value="postgres"/>
              </properties>
         </persistence-unit>     i don't know how i resolve it .
    i can't find any simple exaplme about distributed transactions on net ...
    can anybody help me ....
    thanks.

    Check this one:
    http://www.webagesolutions.com/knowledgebase/javakb/jkb005/index.html

  • Can not commit distributed transaction

    Hi
    We get error "can not commit distributed transaction" during
    commit the transaction in which we have create NEW entities.
    Update-transactions on existing enitites work correct.
    Our problem is probably due to seauences for object IDs: we are using oracle native sequences:
    <sequence name="SeqErrRecObj" strategy="nontransactional" factory-class="native(Sequence=BUYING.SEQ_ERRRECOBJ)"/>
    As soon we use strategy="nontransactional" in managed environment,
    we get "can not commit distributed transaction" error by creating new instance.
    Switching to strategy="transactional" seems to eleminate this problem.
    I did not found any hint in about this in documentation.
    Can some one confirm our assumption that using nontransactional oracle sequences in manageg (WebLogic 9.2) environment
    is responsible for "can not commit distributed transaction" error and "strategy=transactional" is the right solution.
    Probably we are completely wrong and tehre is some other explanation for this error ?
    kind regards
    Andre Teshler

    Hi Andre,
    It sounds like you have not configured a non-transactional datasource. See section "4.2.1. Managed and XA DataSources" in the <kodo>/docs/jdo/pdf/manual.pdf. Connection is for the managed datasource and Connection2 for the non-transactional.
    David Ezzio

  • Problem: [Microsoft][ODBC SQL Server Driver][SQL Server]The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.

    Hi Gurus,
    I have this problem in my MS SQL Server 2012 that is running in SQL Server 2008 R2 Enterprise 64 bit.. Not sure why... Here is the full details of the error:
    Microsoft OLE DB Provider for ODBC Drivers 80040E14
    [Microsoft][ODBC SQL Server Driver][SQL Server]The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.
    /Libraries/DBA/DBA.asa, line 717
    Line 717 is this:
    rs.open destTableName,,,,adCmdTable
    Full details of the code:
        'Field object used to iterate through each field of the rs
        dim rs, fld
        'call dbInitRS(rs)
        set rs = server.createobject("adodb.recordset")
        'On Error Resume Next
        'Open rs
        set rs.activeConnection = myConnection
        rs.cursorType = adOpenKeyset
        rs.lockType = adLockOptimistic
        'rs.open destTableName
        rs.open destTableName,,,,adCmdTable
        'if err.number <> 0 then
        '    goto HandleError
        'end if
        rs.addNew
    Any ideas how to solve this problem?
    Thanks

    Still does not work. I have allow MSDSTC in my firewall list.
    Hi dudskie,
    Have you try to use DTCTester or DTCPing to verify MSDTC functionality over the network? Please refer to the following article:
    Troubleshooting Problems with MSDTC:
    http://msdn.microsoft.com/en-us/library/aa561924.aspx
    Use the DTCTester utility to verify transaction support between two computers if SQL Server is installed on one of the computers. The DTCTester utility uses ODBC to verify transaction support against a SQL Server database. For more information about
    DTCTester see How to Use DTCTester Tool.
    Use DTCPing to verify transaction support between two computers if SQL Server is not installed on either computer. The DTCPing tool must be run on both the client and server computer and is a good alternative to the DTCTester utility when SQL Server
    is not installed on either computer. For more information about DTCPing, see
    How to troubleshoot MS DTC firewall issues.
    If you have any feedback on our support, please click
    here.
    Hope this helps.
    Regards,
    Elvis Long
    TechNet Community Support

  • How to disable distributed transaction in Weblogic 8.1?

              Hi I'm using WL8.1 running EJB. I wish to disable distributed transaction, whatever
              that is. It is preventing me from doing and AutoCommit(true) in my database. Please
              help. Thanks!
              

    You cannot disable transactions if you are using entity EJBs but you can
              get your connections from a non-TX DataSource (just define a regular
              DataSource and not TXDataSource in your configuration) and then those
              connections will not be transaction aware so you'll be able to do
              setAutoCommit(true) in fact it might already be the default setting when
              you get the connection.
              Regards,
              Dejan
              Fred wrote:
              >Hi I'm using WL8.1 running EJB. I wish to disable distributed transaction, whatever
              >that is. It is preventing me from doing and AutoCommit(true) in my database. Please
              >help. Thanks!
              >
              >
              

  • Does Oracle 8.1.5 with weblogic 6.1 sp2 suppports Distributed Transactions ---A really night Mare

              Which version of jdbc thin driver should i use to achieve distributed transaction
              with oracle 8.1.5 in weblogic 6.1 sp2
              right now if iam using the driver classes provided in weblogic.jar iam gettig the
              following Exception
              AccountBean.ejbCreate( id = accountId, initial balance = $ 3000.0)
              java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured
              in the transaction branch start(
              ) failed on resource 'OracleXAPool' Unexpected error during start for XAResource
              'OracleXAPool': null
              at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1044)
              at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1010)
              at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:148)
              at weblogic.jdbc.jta.Connection.prepareStatement(Connection.java:226)
              at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
              at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
              at examples.ejb.basic.beanManaged.AccountBean.ejbCreate(Unknown Source)
              at examples.ejb.basic.beanManaged.AccountBean_g1748h_Impl.ejbCreate(AccountBean_g1748h_Impl.java:172)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.ejb20.manager.DBManager.create(DBManager.java:492)
              at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462)
              at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190)
              at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl.create(AccountBean_g1748h_HomeImpl.java:76)
              at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl_WLSkel.invoke(Unknown
              Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
              at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
              at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:158)
              at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
              at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
              at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
              at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)
              at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
              at $Proxy126.create(Unknown Source)
              at examples.wtc.atmi.simpapp.ToupperBean.putMessage(ToupperBean.java:194)
              at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl.putMessage(ToupperBean_8roqg7_EOImpl.java:284)
              at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl_WLSkel.invoke(Unknown
              Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Regards
              Ranga Rao
              

              Oracle Server 8.1.5 does not provide support for 2PC.
              Full XA support is provided from version 8.1.7.
              Sergi
              "Lawrence" <[email protected]> wrote:
              >
              >Ranga,
              >Please use classes12.zip for this.If you still find problem, please let
              >me know.
              >Thanks
              >Lawrence
              >
              >"Ranga Rao" <[email protected]> wrote:
              >>
              >>
              >>Which version of jdbc thin driver should i use to achieve distributed transaction
              >>with oracle 8.1.5 in weblogic 6.1 sp2
              >>
              >>right now if iam using the driver classes provided in weblogic.jar iam
              >gettig
              >>the
              >>following Exception
              >>
              >>////////////////////////////////////////////////////////////////////////////////////////////
              >>AccountBean.ejbCreate( id = accountId, initial balance = $ 3000.0)
              >>java.sql.SQLException: XA error: XAER_RMERR : A resource manager error
              >has
              >>occured
              >>in the transaction branch start(
              >>) failed on resource 'OracleXAPool' Unexpected error during start for XAResource
              >>'OracleXAPool': null
              >> at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1044)
              >> at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1010)
              >> at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:148)
              >> at weblogic.jdbc.jta.Connection.prepareStatement(Connection.java:226)
              >> at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
              >> at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
              >> at examples.ejb.basic.beanManaged.AccountBean.ejbCreate(Unknown
              >>Source)
              >> at examples.ejb.basic.beanManaged.AccountBean_g1748h_Impl.ejbCreate(AccountBean_g1748h_Impl.java:172)
              >> at java.lang.reflect.Method.invoke(Native Method)
              >> at weblogic.ejb20.manager.DBManager.create(DBManager.java:492)
              >> at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462)
              >> at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190)
              >> at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl.create(AccountBean_g1748h_HomeImpl.java:76)
              >> at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl_WLSkel.invoke(Unknown
              >>Source)
              >> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              >> at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
              >> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
              >> at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:158)
              >> at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
              >> at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
              >> at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
              >> at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)
              >> at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
              >> at $Proxy126.create(Unknown Source)
              >> at examples.wtc.atmi.simpapp.ToupperBean.putMessage(ToupperBean.java:194)
              >> at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl.putMessage(ToupperBean_8roqg7_EOImpl.java:284)
              >> at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl_WLSkel.invoke(Unknown
              >>Source)
              >> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              >> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
              >> at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
              >> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >>/////////////////////////////////////////////////////////////////////////////////
              >>
              >>Regards
              >>Ranga Rao
              >>
              >>
              >
              

  • ORA-00164 Autonomous and Distributed Transactions in Oracle 8i - Forms6i

    Hi, in Forms6i I'm using Autonomous transactions (insert and update), and I want to use also a database link to make a query in a remote database (Distributed transaction). Even when this request are done in different PL/SQL within Forms6i, I get the error message ORA-00164 Distributed transactions disallowed within autonomous transactions. Is there a way to avoid this error message?
    Thanx

    Hello,
    I had a similar Problem, when I tried to log errormessages while selecting by db-link.
    I use pipes now to send the errormessages. The pipe is read at regular intervals and then I can Insert without using autonomous transactions.
    I hope, this will help you
    Marcus

  • Distributed transaction using linked server not working in SQL Server 2008 64 bit

    Hi. I have had an issue trying to get distributed transactions to work in SQL Server 2008 using a linked server. The error message I get is
    OLE DB provider "SQLNCLI10" for linked server "pod1" returned message "No transaction is active.".
    Msg 7391, Level 16, State 2, Line 3
    The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "pod1" was unable to begin a distributed transaction.
    My Environment:
    Windows Server 2008 Enterprise 64 bit, SQL Server 2008 Enterprise 64 bit
    Problem occurs with multiple different builds of SQL Server 2008 - I have been able to reproduce the problem with 10.0.1600.0, 10.0.1779.0 (CU 2), as well as 10.0.2531 (SP1)
    I am aware that other people have had this issue and have reviewed all existing posts. I have verified that the MSDTC is configured correctly on both machines. I have also used DTCTester to verify that DTC is working correctly on all machines in question.
    None of the mentioned resolutions has solved this problem for me.
    I am not seeing this problem occur on my 32 bit test machines - it is only occurring if at least one of the two machines is 64 bit.

    Hi All,
    I realise that this topic may be a little bit out-of-date but if someone gets here from some search engine trying to find a solution for DTC problems, this MAY be useful.
    So... I recently had the same issue, tried all the approaches described in KB and other articles, but it didn't help. Because my task to solve this was not of the highest priority I forgot about it for some time.
    Today I was troubleshooting some other issue and, by accident discovered source of that first problem:
    In the EventViewer I found Error entry logged by MSDTC saying:
    "The local MS DTC detected that the MS DTC on vm-server1 (other machine name that also runs DTC - my comment) has the same unique identity as the local MS DTC. This means that the two MS DTC will not be able to communicate
    with each other. This problem typically occurs if one of the systems were cloned using unsupported cloning tools. MS DTC requires that the systems be cloned using supported cloning tools such as SYSPREP. Running 'msdtc -uninstall' and then 'msdtc -install'
    from the command prompt will fix the problem. Note: Running 'msdtc -uninstall' will result in the system losing all MS DTC configuration information."
    So I followed suggestion and run:
    msdtc -uninstall
    msdtc -install
    This solved my problems with DTC. Hope it will help someone.
    Piotr

  • Is Distributed Transaction Coordinator services of the application role are required by SQL Server 2012 for clustering and support of SharePoint 2013.

    All I want to know is if Distributed Transaction Coordinator services of the application role are required by SQL Server 2012 for clustering and support of SharePoint 2013.
    I have been planning and deploying my companies first Windows Server 2012/SQL Server 2012 Always On cluster and Always On Availability Groups Multi-Subnet cluster and instances for SharePoint 2013, and I will be brutally honest, the documentation on either
    the MSDN and TechNet leave alot to be desired. Continually finding links in the documentation will take me from a Windows 2012 reference to a page talking about Windows Server 2008 or R2, The differences of which there are so many when it comes to configurations,
    settings, roles, services when working with SQL Server 2012. I have been confused, frustrated, screaming mad, with all the misdirection in this documentation.  The documentation takes me windows 2008 R2 which is different than 2012!
    Tired and trying to pick myself up off the floor!
    Greg
    Gman

    In general, DTC is not required for SQL 2012.  But, since you are asking specifically about SharePoint, it would be better to ask in a SharePoint forum.  They would be more likely to know those situations where FTC might be needed by SharePoint. 
    .:|:.:|:. tim

  • Distributed transactions and 2-phase commit in a SAP Netweaver environment

    Hello,
    I am a Java architect., I don't know very much the SAP technologies. I tried to found on forums or technical papers if SAP does support distributed transactions and two-phase commit, it's not clear. I found something on SAP WAS but my project is using a  SAP PI 7.0 and I cannot find anything on the subject.
    My goal is to include a SAP server (via PI 7.0) in a distributed transaction handled by a J2EE ESB (Oracle, ex-BEA Aqualogic) based on XA capabilities.
    Does anyone have experience or feedback on this topic ?
    Thanks.

    Hi,
    Do you know this white paper ?
    [Distributed Transaction and 2 phase commit|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3732d690-0201-0010-a993-b92aab79701f]
    Regards,
    Olivier

  • ORA-02074: cannot ROLLBACK in a distributed transaction

    I have a stored procedure that successfully creates a portal user when I run it with SQLPLUS.
    However when I call the same procedure through ODP.Net, I get the following error.
    "ORA-20001: ORA-02074: cannot ROLLBACK in a distributed transaction\nORA-06512: at \"PORTAL30.WWSEC_API\", line 1915\nORA-02074: cannot SET SAVEPOINT in a distributed transaction\nORA-06512: at \"PORTAL30.PRO_CREATE_WEB_USER\", line 28\nORA-06512: at line 1"
    The portal version is 3.0.9.8.2 The stored proc is in the portal30 schema and I am connecting as portal30 user.
    Any help is greatly appreciated...
    Thanks.
    The following is the code for the stored procedure:-
    CREATE OR REPLACE PROCEDURE PORTAL30.PRO_CREATE_WEB_USER (
    puser IN varchar2,
    puser_last_name IN varchar2,
    puser_first_name IN varchar2,
    puser_group IN varchar2,
    password IN varchar2
    ) AS
    l_group_id number;
    l_id number;
    e_code number;
    begin
    l_id := wwsec_api.add_portal_user(p_User_Name => puser,p_Last_Name => puser_last_name,p_First_Name => puser_first_name,p_Portal_User => 'Y');
    wwsec_api.activate_portal_user(puser);
    portal30_sso.WWSSO_API_USER_ADMIN.CREATE_USER(P_USERNAME=> puser,P_PASSWORD=>password,p_error_code=> e_code);
    wwsec_api.add_user_to_list(p_person_id => l_id,p_to_group_id => wwsec_api.group_id (p_name => puser_group),p_is_owner => wwsec_api.NOT_OWNER);
    wwsec_api.set_defaultgroup(p_groupid => wwsec_api.group_id (p_name => puser_group),p_username => puser);
    commit;
    exception
    when others then
    raise_application_error(-20001,substr(sqlerrm,1,200));
    end;
    The foll is the code I am using to call the stored proc.
    private void createUser()
    string retval ;
    OracleConnection oraconn = new OracleConnection(Data Source=testdb;User ID=portal30;Password=portal30" );
    OracleCommand cmd = new OracleCommand("PRO_CREATE_WEB_USER", oraconn);
    cmd.CommandType = CommandType.StoredProcedure;
    OracleParameter a_uid = new OracleParameter("puser" ,OracleDbType.Varchar2,20);
    a_uid.Direction = ParameterDirection.Input ;
    a_uid.Value = (txtUserId.Text).Trim() ;
    cmd.Parameters.Add(a_uid);
    OracleParameter a_last_name = new OracleParameter("puser_last_name" ,OracleDbType.Varchar2,20);
    a_last_name.Direction = ParameterDirection.Input ;
    if (( txtLName.Text).Trim() != "" )
    a_last_name.Value = (txtLName.Text).Trim() ;
    else
    a_last_name.Value = " ";
    cmd.Parameters.Add(a_last_name);
    OracleParameter a_first_name = new OracleParameter("puser_first_name" ,OracleDbType.Varchar2,20);
    a_first_name.Direction = ParameterDirection.Input ;
    if ((txtFName.Text).Trim() != "")
    a_first_name.Value = (txtFName.Text).Trim() ;
    else
    a_first_name.Value = " ";
    cmd.Parameters.Add(a_first_name);
    OracleParameter a_type = new OracleParameter("puser_group" ,OracleDbType.Varchar2,20);
    a_type.Direction = ParameterDirection.Input ;
    a_type.Value = (lstUserType.SelectedValue).Trim() ;
    cmd.Parameters.Add(a_type);
    OracleParameter a_passwd = new OracleParameter("password" ,OracleDbType.Varchar2,20);
    a_passwd.Direction = ParameterDirection.Input ;
    a_passwd.Value = (txtPassword.Text).Trim() ;
    cmd.Parameters.Add(a_passwd);
    try
    oraconn.Open();
    cmd.ExecuteNonQuery();
    lblMsg.ForeColor = System.Drawing.Color.FromName("blue");
    lblMsg.Text = "User Created.";
    catch(OracleException e)
    { retval = e.Message ;
    lblMsg.ForeColor = System.Drawing.Color.FromName("red");
    lblMsg.Text = "Error Creating user" ;
    finally
    oraconn.Close();

    Also note that remote procedure/function calls (e.g. from ODP.NET), do not support distributed transactions (i.e. a SAVEPOINT/ROLLBACK block within the PL/SQL procedure/function) before database version Oracle 9i.
    So if you are using say Oracle 817 you must use the "OracleTransaction" object in ODP.NET instead.
    See:
    http://www.dotnet247.com/247reference/msgs/39/197274.aspx

  • Need help on  ORA-02074: cannot SET NLS in a distributed transaction

    Hi All,
    I am Writing a plsql Code like this
    DECLARE
    op_job_id NUMBER;
    op_object_version_number NUMBER;
    x_job_definition_id NUMBER;
    op_name VARCHAR2(1000);
    L_VERIFY_FLAG VARCHAR2(1);
    l_error_message VARCHAR2(2000);
    BG_ID NUMBER;
    lv_job_group_id APPS.per_job_groups.job_group_id@SYSTEM_LINK_VISMA%TYPE;
    CURSOR C1 IS SELECT * FROM EBS_PER_JOBS_STG;
    BEGIN
    FOR H1 IN C1
    LOOP
    BEGIN
    IF H1.BUSINESS_GROUP_NAME IS NOT NULL THEN
    SELECT BUSINESS_GROUP_ID,job_group_id INTO BG_ID,lv_job_group_id
    FROM APPS.PER_JOB_GROUPS@SYSTEM_LINK_VISMA
    WHERE DISPLAYED_NAME=H1.JOB_GROUP_NAME;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    L_VERIFY_FLAG := 'E';
    l_error_message := 'Entered Job Group Name is Wrong';
    END;
    -->> JOB GROUP ID <<--
    APPS.hr_job_api.CREATE_JOB@SYSTEM_LINK_VISMA
    (p_business_group_id => BG_ID
    ,p_date_from => H1.DATE_FROM
    ,p_approval_authority => H1.APPROVAL_AUTHORITY
    ,p_emp_rights_flag => H1.EMP_RIGHTS_FLAG
    ,p_benchmark_job_flag => H1.BENCHMARK_JOB_FLAG
    ,p_job_group_id => lv_job_group_id
    ,p_job_information1 => H1.JOB_INFORMATION1
    ,p_job_information2 => H1.JOB_INFORMATION2
    ,p_job_information3 => H1.JOB_INFORMATION3
    ,p_job_information4 => H1.JOB_INFORMATION4
    ,p_job_information5 => H1.JOB_INFORMATION5
    ,p_job_information6 => H1.JOB_INFORMATION6
    ,p_job_information7 => H1.JOB_INFORMATION7
    ,p_segment3 => H1.JOB_CODE --JOB_CODE
    ,p_segment6 => H1.JOB_NAME --JOB_NAME
    ,p_job_id => op_job_id
    ,p_object_version_number => op_object_version_number
    ,p_job_definition_id => x_job_definition_id
    ,p_name => op_name);
    dbms_output.PUT_LINE('OUTPUT JOB NAME CREATED : '||op_name);
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.PUT_LINE('Error Message Is: '||SQLERRM);
    END;
    i am running it in Another database Using database link connecting to Apps.
    when i am running it am getting the following Error:
    Error Message Is: ORA-02074: cannot SET NLS in a distributed transaction
    ORA-06512: at "APPS.HR_KFLEX_UTILITY", line 2423
    ORA-06512: at "APPS.HR_KFLEX_UTILITY", line 2380
    ORA-06512: at "APPS.PER_JBT_UPD", line 468
    ORA-02074: cannot SET NLS in a distributed transaction
    ORA-06512: at "APPS.HR_JOB_API", line 878
    Please help me on this, this is quite urgent to me.
    thanks
    sri

    Please see these docs.
    ORA-02074: Cannot SET NLS in a Distributed Transaction [ID 556391.1]
    Portal Used To Call PO_CHANGE_API1_S: ORA-20001: ORA-02074: Cannot SET NLS In A Distributed Transaction [ID 561246.1]Why are Concurrent Programs Calling FND_GLOBAL.APPS_INITIALIZE Using DBLinks Failing? [ID 466800.1]
    ORA-02074 when Executing set_nls over a DB Link [ID 132679.1]
    Thanks,
    Hussein

  • ADF- Jdev11.1.1.6 Business Components supports distributed transaction ?

    Hi ,
    I'm using Jdeveloper 11.1.1.6 release 1 . How to implement distributed transaction in ADF business component level.
    In my scenario i need to perform A Single transaction with two different database . I do need to role back both if either one fails (Distributed Transactions) . How could i achieve this in ADF business component. Does ADF has any built-in support for Distributed transactions.
    Could anybody advice me .
    Thanks in Advanced .

    Thanks for your response !!! What is the best alternative i can choose to achieve Distributed Transaction in ADF Application , if there is no inbuilt support for it in BC?
    Edited by: 994058 on Mar 15, 2013 7:16 AM
    Edited by: 994058 on Mar 15, 2013 7:18 AM

  • Database to Middleware distributed transaction control

    Hello!
    I'm using RMI in a JAVA stored procedure to invoke an external remote object's method (deployed in an application server). Is there any solution to manage the global transaction between database and middleware?
    I've the same kind of invocations but from middleware to middleware and in that cases JTA (weblogic transaction manager) manage the transaction.
    I've this big challenge in hands. Any idea?
    Thanks a lot

    Hi Kata,
    this won't work as the ALL_TABLES is not a table that exists in your SQl Server  - instead it is a "mimicked" table. This means the gateway will check if you have on your SQL Server a table called all_tables and when there's no table it will start an internal mechanism to check out what sort of tables exist in your SQL Server database. So the gateway is starting internally another transaction to get details from the foreign database and DG4ODBC can't participate in distributed transactions at all. Instead of using all_tables you have to use a real SQL Server table like SQ Server sys.objects or sys.tables.
    - Klaus

Maybe you are looking for