Confusion about DTC/enlisting transactions

Hi everyone, our organisation uses Oracle 11g R2 and ODP.Net v4 11.2 in a .Net 4 app and I've been asked to run some tests to see how it copes with connection pooling switched off. While it's unlikely a customer would want to turn off connection pooling, I nevertheless have to test this scenario.
When I change the connection string to "Pooling=false" the app throws the exception "Unable to enlist in a distributed transaction" when attempting to open a connection. The connection string includes "Enlist=true" by the way, and if I change this to false it works. The confusing part is that the connection isn't wrapped in a System.Transactions.TransactionScope() - it's only reading data. We do use TransactionScope elsewhere however. The documentation around DTC, the "enlist" setting, and promotable transactions are a bit unclear, but almost suggests that when enlist=true the connection will be enlisted in an implicit transaction, even if it's not wrapped in a TransactionScope?
And why does ODP.Net seem to rely on connection pooling in order to enlist a transaction?
I've also tried using the Component Services MMC snap-in to view the DTC transactions, and regardless of whether connection pooling is on or off, enlist is true or false, or a TransactionScope has been used or not, a transaction still seems to appear in the console whenever our app performs some database operation. Or am I misunderstanding something?
Our app only connects to a single database, although it may have two or three connections open under different user accounts. I've read somewhere that we shouldn't even need to use DTC when connecting to a single database. Is this correct, and if so what connection string settings should be used regards the above?
Many thanks in anticipation
Andrew

Hi everyone, our organisation uses Oracle 11g R2 and ODP.Net v4 11.2 in a .Net 4 app and I've been asked to run some tests to see how it copes with connection pooling switched off. While it's unlikely a customer would want to turn off connection pooling, I nevertheless have to test this scenario.
When I change the connection string to "Pooling=false" the app throws the exception "Unable to enlist in a distributed transaction" when attempting to open a connection. The connection string includes "Enlist=true" by the way, and if I change this to false it works. The confusing part is that the connection isn't wrapped in a System.Transactions.TransactionScope() - it's only reading data. We do use TransactionScope elsewhere however. The documentation around DTC, the "enlist" setting, and promotable transactions are a bit unclear, but almost suggests that when enlist=true the connection will be enlisted in an implicit transaction, even if it's not wrapped in a TransactionScope?
And why does ODP.Net seem to rely on connection pooling in order to enlist a transaction?
I've also tried using the Component Services MMC snap-in to view the DTC transactions, and regardless of whether connection pooling is on or off, enlist is true or false, or a TransactionScope has been used or not, a transaction still seems to appear in the console whenever our app performs some database operation. Or am I misunderstanding something?
Our app only connects to a single database, although it may have two or three connections open under different user accounts. I've read somewhere that we shouldn't even need to use DTC when connecting to a single database. Is this correct, and if so what connection string settings should be used regards the above?
Many thanks in anticipation
Andrew

Similar Messages

  • Confused about transaction, checkpoint, normal recovery.

    After reading the documentation pdf, I start getting confused about it's description.
    Rephrased from the paragraph on the transaction pdf:
    "When database records are created, modified, or deleted, the modifications are represented in the BTree's leaf nodes. Beyond leaf node changes, database record modifications can also cause changes to other BTree nodes and structures"
    "if your writes are transaction-protected, then every time a transaction is committed the leaf nodes(and only leaf nodes) modified by that transaction are written to JE logfiles on disk."
    "Normal recovery, then is the process of recreating the entire BTree from the information available in the leaf nodes."
    According to the above description, I have following concerns:
    1. if I open a new environment and db, insert/modify/delete several million records, and without reopen the environment, then normal recovery is not run. That means, so far, the BTree is not complete? Will that affact the query efficiency? Or even worse, will that output incorrect results?
    2. if my above thinking is correct, then every time I finish commiting transactions, I need to let the checkpoint to run in order to recreate the whole BTree. If my above thinking is not correct, then, that means that, I don't need to care about anything, just call transaction.commit(), or db.sync(), and let je to care about all the details.(I hope this is true :>)
    michael.

    http://www.oracle.com/technology/documentation/berkeley-db/je/TransactionGettingStarted/chkpoint.html
    Checkpoints are normally performed by the checkpointer background thread, which is always running. Like all background threads, it is managed using the je.properties file. Currently, the only checkpointer property that you may want to manage is je.checkpointer.bytesInterval. This property identifies how much JE's log files can grow before a checkpoint is run. Its value is specified in bytes. Decreasing this value causes the checkpointer thread to run checkpoints more frequently. This will improve the time that it takes to run recovery, but it also increases the system resources (notably, I/O) required by JE.
    """

  • SQL Anywhere 12 (12.0.1.4155) using EF : Unable to enlist transaction; DTC may be down

    What may be causing this error??
    Sometimes the transactions runs fine, and other times I get this error message.
    Database.SqlQuery<int>("select dba.getnextid()");
    NativeError: -803
    Message: Unable to enlist transaction; DTC may be down
    Source: SQL Anywhere .NET Data Provider
    StackTrace:
    at iAnywhere.Data.SQLAnywhere.SAException.CheckException(Int32 idEx)
       at iAnywhere.Data.SQLAnywhere.DurableResourceManager.Enlist(SAInternalConnection conn, Transaction tran)
       at iAnywhere.Data.SQLAnywhere.SAInternalConnection.Enlist(Transaction tran)
       at iAnywhere.Data.SQLAnywhere.SAConnection._EnlistTransaction(Transaction tran)
       at iAnywhere.Data.SQLAnywhere.SAConnection.EnlistTransaction(Transaction transaction)
       at System.Data.EntityClient.EntityConnection.EnlistTransaction(Transaction transaction)
    Can't seem to figure out how to resolve this issue, nor what's causing it.

    Enabling the MSDTC service solved it.  (Distributed Transaction Coordinator)

  • Confusion about recovery

    Hi ,
    I am new to the DBA field and I have a confusion about recovery.
    The confusion is if a database is in noarchivelog mode can a database be recovered from commited changes that were there in the redo log files ?
    If I provide the path name of the redo log files while using recover database using cancel will it work at all given that the database is in noarchivelog mode ?
    Please help to clear my doubts..

    Oracle can use the Online Redo Logs for Recovery. Normally this happens in the case of Instance Recovery (e.g. from a server crash or shutdown abort) -- where the datafiles are not restored from a prior backup.
    If you restore datafiles from a prior backup, you are doing a media recovery. In NOARCHIVELOG mode, you could not have run a backup with the database OPEN, so the backup would have been run with the database SHUTDOWN or MOUNTed. At the subsequent startup, transactions would be in the online redo logs only until LGWR does a "wrap around" and overwrites the first redo log used after the startup. It is only within this window that transactions are in the redo logs.+
    Remember that LGWR uses a "round-robin" algorithm to cycle through the online redo logs. So, if the Online Redo Log that was CURRENT at the time of the backup has been overwritten, you cannot use the Online Redo Logs for a RECOVERy+._
    You must also ensure that there are no NOLOGGING operations !!
    One thing that you might trip up on is the behaviour of CTAS. A "CREATE TABLE AS SELECT" is, by default LOGGING in an ARCHIVELOG database. However, it is automatically a Direct Path operation in a NOARCHIVELOG database ! So the blocks for such a table would be "corrupt" if you attempt a recovery from the Online Redo Log as the row inserts are not captured.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Oct 10, 2011 11:43 AM
    Edited by: Hemant K Chitale on Oct 10, 2011 11:44 AM
    Edited by: Hemant K Chitale on Oct 10, 2011 4:33 PM
    Edited by: Hemant K Chitale on Oct 10, 2011 4:34 PM

  • Confusion about Kodo and JCA

    Hi,
    I'm a bit confused about Kodo's Connection Architecture strategy. It is my understanding that
    PMF's can be built to use the connection architecture. Along this line, one would configure the
    ConnectionFactory or ConnectionFactoryName, and possibly the ConnectionFactory2 and
    ConnectionFactory2Name properties in a PMF. The result of the PMF implementation supporting the
    connection architecture is nice integration with the application servers in terms of security,
    transaction, and connection management. One can lookup in JNDI a reference to a Kodo PMF that
    supports datastore transactions or to another one that supports optimistic transactions or to
    another one that supports NTR, and with proper settings of the transactional properties and suitable
    application code, one's sesson bean will work.
    But from what I can see of Kodo's JDOPersistenceManagerFactory class, it, itself, implements the
    ManagedConnectionFactory interface, meaning, I think, that this class is resource adaptor. And that
    the part that confuses me. Why would Kodo be a resource adaptor? I thought it used a resource
    adaptor, which I think is the same thing as a connection factory.
    Anyway, I'm puzzled, and I'm hoping that someone could straighten me out.
    David Ezzio

    David-
    The fact that Kodo can integrate into an application server as a
    Resource Adaptor, and section 3.2.2 of the specification that says that
    the PersistentManagerFactory should be able to utilize a Resource
    Adaptor to obtain connections to the data store are two separate issues.
    We implement Kodo itself as a Resource Adaptor in order to provide ease
    of integration into recent application servers. Your confusion is
    understandable, since we do not actually yet support the use of Resource
    Adaptors as the Connection Factories as per section 3.2.2.
    Does that make sense?
    David Ezzio <[email protected]> wrote:
    Hi,
    I'm a bit confused about Kodo's Connection Architecture strategy. It is my understanding that
    PMF's can be built to use the connection architecture. Along this line, one would configure the
    ConnectionFactory or ConnectionFactoryName, and possibly the ConnectionFactory2 and
    ConnectionFactory2Name properties in a PMF. The result of the PMF implementation supporting the
    connection architecture is nice integration with the application servers in terms of security,
    transaction, and connection management. One can lookup in JNDI a reference to a Kodo PMF that
    supports datastore transactions or to another one that supports optimistic transactions or to
    another one that supports NTR, and with proper settings of the transactional properties and suitable
    application code, one's sesson bean will work.
    But from what I can see of Kodo's JDOPersistenceManagerFactory class, it, itself, implements the
    ManagedConnectionFactory interface, meaning, I think, that this class is resource adaptor. And that
    the part that confuses me. Why would Kodo be a resource adaptor? I thought it used a resource
    adaptor, which I think is the same thing as a connection factory.
    Anyway, I'm puzzled, and I'm hoping that someone could straighten me out.
    David Ezzio--
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Kodo Java Data Objects Full featured JDO: eliminate the SQL from your code

  • Confuse about the document

    Hi,all . From the document ,i had confused about the following .
    Automatic Undo Management in Oracle RAC
    url >> http://docs.oracle.com/cd/B19306_01/rac.102/b28759/adminrac.htm#CHDGAIFJ
    Oracle automatically manages undo segments within a specific undo tablespace that is assigned to an instance. Only the instance assigned to the undo tablespace can modify the contents of that tablespace. However, each instance can read the undo data blocks created by any instance. Also, when performing transaction recovery, any instance can update any undo tablespace, as long as that undo tablespace is not currently being used by another instance for undo generation or transaction recovery
    what's the meaning of above that is bold ?

    Say you're running a 2-node RAC and node 2 dies. The services which were running on node 2 now get re-located to node 1. It is then possible that node 1 will perform transaction rollback/recovery and, when it does so, it will need to be able to read from node 2's undo tablespace (and maybe update the undo segment headers in node 2's undo tablespace, too).

  • New bie confused about linking different things BP and org struc

    Dear Experts,
    It might sound very silly question but as a fresher to a functional module i am bit confused about all the different concepts.
    1. How actually we start a CRM implementation like after blue printing what are the activities we first start
    like do we first config master data and then org structure and then activities.
    what is the inter linking between these three , i have read CR100, after reading that i am not able to link each one of them like which one is first.
    And last but not least please kindly guide me how to practise the config.
    thanks and regards
    Neel

    Hi Neel,
    first go through with CRM Replication (B09) from building blocks
    http://help.sap.com/bp_crmv340/CRM_DE/BBLibrary/html/BBLibrary.htm
    and also
    http://help.sap.com/bp_crmv250/CRM_DE/index.htm
    technical information - building blocks library
    abt transactions wat ever the std transactions in R3 will present in CRM which already mapped if there r any Ztransactions u have to create the same Ztransactions in CRM for Ztransactions u need to create Zitem categories item category determination and copy controls everything manually and u have to map them, it is not possible to download these from R3 to CRM
    About Business Partners
    Watever u r willing to replicate the BPs from CRM to R3 (u can also avoid some BPs not the replicate to R3) u have to do proper settings in R3 in PIDE transaction, u can do here both dimentional replication settings.
    go through the building block u can understand
    Regards
    Manohar
    Edited by: Manohar R on May 12, 2008 11:51 AM
    Edited by: Manohar R on May 12, 2008 11:52 AM

  • I am confused about something.  How do I read a book on my MacBook Pro?  I can't find the iBook app anywhere, which is what I use on my iPad.  The book I want to read is in my iTunes but I can't click on it.  My iBook library does not show up in iTunes.

    I am confused about something.  How do I read a book on my MacBook Pro?  I can't find the iBook app anywhere, which is what I use on my iPad.  The book I want to read is in my iTunes but I can't click on it.  Some of my iBooks show up in my iTunes but they are "grayed" out.  The only books that respond in iTunes are audiobooks and that's not what I'm looking for.  Is this a stupid question?

    Nevermind - I answered my own question, which is I CAN"T READ ANY BOOKS I purchased in iBooks on my MacBook Pro.  If I want to read on my mac I have to use Kindle or Nook.  Which means any book I've already purchased through iBooks has to be read on my iPad.  Kind of a drag because there are times when it's more convenient for me to read while I'm sitting with my Mac.

  • Confuse about the injecting entity in EJB 3.0?

    Hi all,
    I have an customersBean which is inherit from customersRemote and my problem is i' am little confuse about injecting the entity(customer).
    Where can you apply the EntityManagerFactory is it outside on EJB or Inside the EJB? means outside EJB is use the web application or java application. i have and example.
    this is inside on EJB...............
    public class CustomersBean implements com.savingsaccount.session.CustomersRemote {
    @PersistenceContext(unitName="SavingAccounts")
    EntityManagerFactory emf;
    EntityManager em;
    /** Creates a new instance of CustomersBean */
    public CustomersBean() {
    public void create(int id, String name, String address, String telno, String mobileno)
    try{
    //This is the entity.
    Customer _customer = new Customer();
    _customer.setId(id);
    _customer.setName(name.toString());
    _customer.setAddress(address.toString());
    _customer.setTelno(telno.toString());
    _customer.setMobileno(mobileno.toString());
    em = emf.createEntityManager();
    em.persist(_customer);
    emf.close();
    }catch(Exception ex){
    throw new EJBException(ex.toString());
    in web application, i'm using the @EJB in customer servlets.
    public class CustomerProcessServlet extends HttpServlet {
    @EJB
    private CustomersRemote customerBean;
    blah blah inject directly coming request field from jsp.
    }

    Hi all,
    I have an customersBean which is inherit from customersRemote and my problem is i' am little confuse about injecting the entity(customer).
    Where can you apply the EntityManagerFactory is it outside on EJB or Inside the EJB? means outside EJB is use the web application or java application. i have and example.
    this is inside on EJB...............
    public class CustomersBean implements com.savingsaccount.session.CustomersRemote {
    @PersistenceContext(unitName="SavingAccounts")
    EntityManagerFactory emf;
    EntityManager em;
    /** Creates a new instance of CustomersBean */
    public CustomersBean() {
    public void create(int id, String name, String address, String telno, String mobileno)
    try{
    //This is the entity.
    Customer _customer = new Customer();
    _customer.setId(id);
    _customer.setName(name.toString());
    _customer.setAddress(address.toString());
    _customer.setTelno(telno.toString());
    _customer.setMobileno(mobileno.toString());
    em = emf.createEntityManager();
    em.persist(_customer);
    emf.close();
    }catch(Exception ex){
    throw new EJBException(ex.toString());
    in web application, i'm using the @EJB in customer servlets.
    public class CustomerProcessServlet extends HttpServlet {
    @EJB
    private CustomersRemote customerBean;
    blah blah inject directly coming request field from jsp.
    }

  • Confused about logical table source

    Hi,
    I'm confused about logical table source(LTS), there are 'General', 'Column Mapping', 'Content' tabs in
    LTS, in General tab ,there are some information,like 'Map to there tables' and 'joins',
    just here, we have created relationships in physical layer and BMM layer, so I would like to ask what's the use of the 'joins' here?

    Hi Alpha,
    Valid query, when you establish a complex join it is always between a logical fact and dimension table.Consider a scenario,
    Example:w_person_dx is an extension table not directly joined to a fact but joins to a dimension w_person_d.
    When you model the person_d tables in BMM, you ll have a single logical table with w_person_d as source.If you have to pull columns from both w_person_d and w_person_dx tables in a report, you add dx table as inner join to persond table in the general tab.Now when you check your physical query, you can see the inner join fired between the two dimensions.
    Rgds,
    Dpka

  • How to setup the timeout time about container mangement transaction?

    hi
    i want to modify the time-out time about cantainer management transaction.
    but i don't know where and how to setup it....
    please tell me how to do it, thanks a lot.
    Joe

    We haven't been using the session pool, just the direct Jolt classes, but
    the only way we've found to set the timeout is via a transaction time, it
    seems to be the only one that has any effect.
    hth
    Mike

  • Confused about extending the Sprite class

    Howdy --
    I'm learning object oriented programming with ActionScript and am confused about the Sprite class and OO in general.
    My understanding is that the Sprite class allows you to group a set of objects together so that you can manipulate all of the objects simultaneously.
    I've been exploring the Open Flash Chart code and notice that the main class extends the Sprite class:
    public class Base extends Sprite {
    What does this enable you to do?
    Also, on a related note, how do I draw, say, a line once I've extended it?
    Without extending Sprite I could write:
    var graphContainer:Sprite = new Sprite();
    var newLine:Graphics = graphContainer.graphics;
    And it would work fine. Once I extend the Sprite class, I'm lost. How do I modify that code so that it still draws a line? I tried:
    var newLine:Graphics = this.graphics;
    My understanding is that since I'm extending the Sprite class, I should still be able to call its graphics method (or property? I have no idea). But, it yells at me, saying "1046: Type was not found or was not a compile-time constant: Graphics.

    Thanks -- that helped get rid of the error, I really appreciate it.
    Alas, I am still confused about the extended Sprite class.
    Here's my code so far. I want to draw an x-axis:
    package charts {
        import flash.display.Sprite;
        import flash.display.Graphics;
        public class Chart extends Sprite {
            // Attributes
            public var chartName:String;
            // Constructor
            public function Chart(width:Number, height:Number) {
                this.width = width;
                this.height = height;
            // Methods
            public function render() {
                drawAxis();
            public function drawAxis() {
                var newLine:Graphics = this.graphics;
                newLine.lineStyle(1, 0x000000);
                newLine.moveTo(0, 100);
                newLine.lineTo(100, 100);
    I instantiate Chart by saying var myChart:Chart = new Chart(); then I say myChart.render(); hoping that it will draw the axis, but nothing happens.
    I know I need the addChild method somewhere in here but I can't figure out where or what the parameter is, which goes back to my confusion regarding the extended Sprite class.
    I'll get this eventually =)

  • Confused about standby redo log groups

    hi masters,
    i am little bit confuse about creating redo log group for standby database,as per document number of standby redo group depends on following equation.
    (maximum number of logfiles for each thread + 1) * maximum number of threads
    but i dont know where to fing threads? actually i would like to know about thread in deep.
    how to find current thread?
    thanks and regards
    VD

    is it really possible that we can install standby and primary on same host??
    yes its possible and i have done it many times within the same machine.
    For yours confusion about spfile ,i agree document recommend you to use spfile which is for DG broker handling if you go with DG borker in future only.
    There is no concern spfile using is an integral step for primary and standby database implementation you can go with pfile but good is use spfile.Anyhow you always keep pfile on that basis you created spfile,i said you make an entry within pfile then mount yours standby database with this pfile or you can create spfile from this pfile after adding these parameter within pfile,i said cause you might be adding this parmeter from SQL prompt.
    1. logs are not getting transfered(even i configure listener using net manager)
    2.logs are not getting archived at standby diectory.
    3.'ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION' NEVER COMPLETE ITS RECOVERY
    4. when tried to open database it always note it 'always' said system datafile is not from sufficiently old backup.
    5.i tried 'alter database recover managed standby database camncel' also.Read yours alert log file and paste the latest log here..
    Khurram

  • Confused about SOAP

    Hi all,
    As far as I know, SOAP is initially designed to be an XML based
    RPC protocol.
    But Java API for XML Messaging (JAXM), which is actually a
    messaging API (and not RPC), is also based on SOAP.
    How do they fit to each other?
    In a few words, what does actually SOAP define?
    I am confused about that, can you help me?
    Any idea will be appreciated.
    Thank you

    In a few words -- no. Try here:
    http://java.sun.com/webservices/docs/1.0/tutorial/index.html

  • Confused about passing by reference and passing by valule

    Hi,
    I am confuse about passing by reference and passing by value. I though objects are always passed by reference. But I find out that its true for java.sql.PreparedStatement but not for java.lang.String. How come when both are objects?
    Thanks

    Hi,
    I am confuse about passing by reference and passing
    by value. I though objects are always passed by
    reference. But I find out that its true for
    java.sql.PreparedStatement but not for
    java.lang.String. How come when both are objects?
    ThanksPass by value implies that the actual parameter is copied and that copy is used as the formal parameter (that is, the method is operating on a copy of what was passed in)
    Pass by reference means that the actual parameter is the formal parameter (that is, the method is operating on the thing which is passed in).
    In Java, you never, ever deal with objects - only references to objects. And Java always, always makes a copy of the actual parameter and uses that as the formal parameter, so Java is always, always pass by value using the standard definition of the term. However, since manipulating an object's state via any reference that refers to that object produces the same effect, changes to the object's state via the copied reference are visible to the calling code, which is what leads some folk to think of java as passing objects by reference, even though a) java doesn't pass objects at all and b) java doesn't do pass by reference. It passes object references by value.
    I've no idea what you're talking about wrt PreparedStatement, but String is immutable, so you can't change its state at all, so maybe that's what's tripping you up?
    Good Luck
    Lee
    PS: I will venture a guess that this is the 3rd reply. Let's see...
    Ok, second. Close enough.
    Yeah, good on yer mlk, At least I beat Jos.
    Message was edited by:
    tsith

Maybe you are looking for

  • How do I create folders on my email account?

    When I open my email account on the Internet it shows all my emails in their respected folders that I created and organized. Unfortunately, when I try to open my account on the desktop email app they provide for us (the postage stamp with the bird) i

  • I cant download apps to my ipod because it says something to do with my time

    I go to the computer to fix this problem , & it says i owe money , but i need to switch debit cards , because i cant use that one that i regerstered with .. & everything is messed up .

  • VisualVM not starting correctly

    I have on some Linux servers a weird behaviour of jvisualvm. Java --> jdk1.6.0_43 Linux + X11-Xming for graphics. The first time I start the tool, it starts coorectly. Then I close the tool and restart, and from then on I see the logo dialog, and the

  • Firefox will not open Foxit PDF Reader

    I am using Firefox 34.0 and Foxit PDF Reader 7.0.6.1126. Until a few weeks ago, when I clicked a PDF file I was asked if to open the Foxit Reader or to download the file. Now the file is downloaded whatever I do. I have tried different options in Fir

  • How to switch to full screen faster and change between applications in full screen faster

    Hi, my problem is that when I switch any application to full screen it does a little animation which spends a little time before getting to the full screen mode. The other problem is that when I change between applications in full screen mode it also