What logging implementation for distributed transaction on Oracle 8?

Hi,
I have a script running on Oracle 8 that accesses remote databases. I would like to create a transaction log that creates log entries in another table as the script progresses. I initially tried creating a logging procedure that used PRAGMA AUTONOMOUS_TRANSACTION but this failed because of this error message:
ORA-00164: autonomous transaction disallowed within distributed transaction
I can't set the transaction to read only as database updates are part of the script.
Is there another strategy that I could use to create the logs I need?
Cheers,
kj

Hi,
I have a script running on Oracle 8 that accesses remote databases. I would like to create a transaction log that creates log entries in another table as the script progresses. I initially tried creating a logging procedure that used PRAGMA AUTONOMOUS_TRANSACTION but this failed because of this error message:
ORA-00164: autonomous transaction disallowed within distributed transaction
I can't set the transaction to read only as database updates are part of the script.
Is there another strategy that I could use to create the logs I need?
Cheers,
kj

Similar Messages

  • Connection Factory class for Distributed Transaction?

    Definition of Managed Datasources goes like this at URL: http://download.oracle.com/docs/cd/B31017_01/web.1013/b28958/datasrc.htm#CHDDADCE
    Managed data sources are managed by OC4J. This means that OC4J provides critical system infrastructure such as global transaction management, connection pooling, and error handling.
    In the same document, I could also see a section for configuring Connection Pool, that uses 'factory-class' as 'oracle.jdbc.pool.OracleDataSource' as shown below:
    <connection-pool name="myConnectionPool">
    <connection-factory
    factory-class="oracle.jdbc.pool.OracleDataSource"
    user="scott"
    password="tiger"
    This configuration has worked well for my web application where I was using a single instance of Oracle database. In a new application I've to use two separate instance of Oracle databases and there is a need of distributed transaction.
    I know, I've to create two separate datasources for the two separate Oracle instances.
    My question is: Since now my transaction will be distributed in nature, do I need to use any other factory-class for configuring XA aware Datasources on OC4J? Or whether the same factory-class (oracle.jdbc.pool.OracleDataSource) will work even for distributed transactions?

    Here is the link for using Oracle RAC with WLS
    http://e-docs.bea.com/wls/docs81/jdbc/oracle_rac.html

  • Error connecting SQL Azure - Network access for Distributed Transaction Manager (MSDTC) has been disabled

    Sometimes I have an error connecting SQL Azure. The error occurs in an asp.net application and in a windows service running on VM in Azure. Error details:
    System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Transactions.TransactionManagerCommunicationException: Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network
    access in the security configuration for MSDTC using the Component Services Administrative tool. ---> System.Runtime.InteropServices.COMException: The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT:
    0x8004D024)
       at System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel,
    ITransactionShim& transactionShim)
       at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken)
       --- End of inner exception stack trace ---
       at System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException)
       at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken)
       at System.Transactions.TransactionStatePSPEOperation.PSPEPromote(InternalTransaction tx)
       at System.Transactions.TransactionStateDelegatedBase.EnterState(InternalTransaction tx)
       at System.Transactions.EnlistableStates.Promote(InternalTransaction tx)
       at System.Transactions.Transaction.Promote()
       at System.Transactions.TransactionInterop.ConvertToOletxTransaction(Transaction transaction)
       at System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts)
       at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
       at System.Data.ProviderBase.DbConnectionPool.PrepareConnection(DbConnection owningObject, DbConnectionInternal obj, Transaction transaction)
       at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal&
    connection)
       at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.Open()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       --- End of inner exception stack trace ---
       at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection()
       at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClassb.<GetResults>b__9()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       at System.Data.Entity.Core.Objects.DataClasses.EntityReference`1.Load(MergeOption mergeOption)
       at System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.DeferredLoad()
       at System.Data.Entity.Core.Objects.Internal.LazyLoadBehavior.LoadProperty[TItem](TItem propertyValue, String relationshipName, String targetRoleName, Boolean mustBeNull, Object wrapperObject)
       at System.Data.Entity.Core.Objects.Internal.LazyLoadBehavior.<>c__DisplayClass7`2.<GetInterceptorDelegate>b__2(TProxy proxy, TItem item)

    Hello,
    I am not an expert in MSDTC but as we know,SQL Azure Database does not support
    distributed transactions. This means that SQL Azure doesn’t allow Microsoft Distributed Transaction Coordinator (MS DTC) to delegate distributed transaction handling.
    One common cause of MSDTC getting involved in Entity Framework applications is the fact that we close and reopen the same connection as needed (i.e. for each query that is executed).To avoid the stack from opening and closing the connection multiple times,
    you can simply open the connection explicitly and run the queries in the same connectio.
    The following thread is about a similar issue, please refer to:
    http://answers.flyppdevportal.com/categories/azure/sqlazure.aspx?ID=d705a8cf-cba4-494c-96f6-96a136bd29e3
    What's more, you can also try the workaround that involves setting the Enlist option of the SQL Azure connection to false. For the detail explanation, please refer to:Entity
    FrameWork and SQL Azure
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Errors in DB alert log for distributed transactions

    Hi,
    I am receiving the following type of errors regularly in one of our development databases:
    Errors in file e:\oracle\product\diag\rdbms\agdev10g\agdev10g\trace\agdev10g_reco_16356.trc:
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    ORA-02062: distributed recovery received DBID d672931d, expected 2d7b9dec
    ORA-12154: TNS:could not resolve the connect identifier specified
    ORA-12500: TNS:listener failed to start a dedicated server process
    ORA-12154: TNS:could not resolve the connect identifier specified
    From researching on the net it looks like it may have something to do with distributed transactions and database links however I'm not sure how to proceed to diagnose the problem and find out where the issue is. Can anyone help?
    Thanks
    Adam
    Edited by: Adam J. Sawyer on 27/05/2010 16:57

    SQL*Net typically involves two systems so post following details for both systems
    Post Operating System (OS) name & version for DB server system.
    Post results of
    SELECT * from v$version
    or post Oracle version to 4 decimal places
    oerr ora 12514
    12514, 00000, "TNS:listener does not currently know of service requested in connect descriptor"
    // *Cause:  The listener received a request to establish a connection to a
    // database or other service. The connect descriptor received by the listener
    // specified a service name for a service (usually a database service)
    // that either has not yet dynamically registered with the listener or has
    // not been statically configured for the listener.  This may be a temporary
    // condition such as after the listener has started, but before the database
    // instance has registered with the listener.
    // *Action:
    //  - Wait a moment and try to connect a second time.
    //  - Check which services are currently known by the listener by executing:
    //    lsnrctl services <listener name>
    //  - Check that the SERVICE_NAME parameter in the connect descriptor of the
    //    net service name used specifies a service known by the listener.
    //  - If an easy connect naming connect identifier was used, check that
    //    the service name specified is a service known by the listener.
    //  - Check for an event in the listener.log file.
    bcm@bcm-laptop:~$ oerr ora 2062
    02062, 00000, "distributed recovery received DBID %s, expected %s"
    // *Cause: a database link at a coordinator no longer points to the expected
    //         database.  Link may have been redefined, or a different DB mounted.
    // *Action: restore link definition or remote database.
    bcm@bcm-laptop:~$ oerr ora 12154
    12154, 00000, "TNS:could not resolve the connect identifier specified"
    // *Cause:  A connection to a database or other service was requested using
    // a connect identifier, and the connect identifier specified could not
    // be resolved into a connect descriptor using one of the naming methods
    // configured. For example, if the type of connect identifier used was a
    // net service name then the net service name could not be found in a
    // naming method repository, or the repository could not be
    // located or reached.
    // *Action:
    //   - If you are using local naming (TNSNAMES.ORA file):
    //      - Make sure that "TNSNAMES" is listed as one of the values of the
    //        NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA)
    //      - Verify that a TNSNAMES.ORA file exists and is in the proper
    //        directory and is accessible.
    //      - Check that the net service name used as the connect identifier
    //        exists in the TNSNAMES.ORA file.
    //      - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
    //        file.  Look for unmatched parentheses or stray characters. Errors
    //        in a TNSNAMES.ORA file may make it unusable.
    //   - If you are using directory naming:
    //      - Verify that "LDAP" is listed as one of the values of the
    //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA).
    //      - Verify that the LDAP directory server is up and that it is
    //        accessible.
    //      - Verify that the net service name or database name used as the
    //        connect identifier is configured in the directory.
    //      - Verify that the default context being used is correct by
    //        specifying a fully qualified net service name or a full LDAP DN
    //        as the connect identifier
    //   - If you are using easy connect naming:
    //      - Verify that "EZCONNECT" is listed as one of the values of the
    //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA).
    //      - Make sure the host, port and service name specified
    //        are correct.
    //      - Try enclosing the connect identifier in quote marks.
    //   See the Oracle Net Services Administrators Guide or the Oracle
    //   operating system specific guide for more information on naming.
    bcm@bcm-laptop:~$ oerr ora 12500
    12500, 00000, "TNS:listener failed to start a dedicated server process"
    // *Cause:  The process of starting up a dedicated server process failed.
    // The executable could not be found or the environment may be set up
    // incorrectly.
    // *Action: Turn on tracing at the ADMIN level and reexecute the operation.
    // Verify that the ORACLE Server executable is present and has execute
    // permissions enabled. Ensure that the ORACLE environment is specified
    // correctly in LISTENER.ORA. The Oracle Protocol Adapter that is being
    // called may not be installed on the local hard drive.  Please check that
    // the correct Protocol Adapter are successfully linked.
    // If error persists, contact Oracle Customer Support.What explicit SQL or command trigger these errors?

  • How to configure distributed transaction in Oracle Database Gateway for ODBC? (ORA-02047)

    I am connecting from Oracle to another database server (MS SQL Server, DB2 the error message is the same) through an ODBC connection using Oracle SQL Developer. (This is how I set up)
    I want to query the schema of a non-Oracle database using the data dictionary mapping of the Oracle Database Gateway for ODBC.
    This works well:
    select * from all_tables@katimssql;
    But this doesn't:
    create table alltables_mssql as
    select * from all_tables@katimssql;
    Output:
    Error report:
    SQL Error: ORA-00604: error occurred at recursive SQL level 1
    ORA-02047: cannot join the distributed transaction in progress
    ORA-06512: at "SYS.HS$_DDTF_SQLTABLES", line 58
    ORA-06512: at line 1
    Does anyone know the solution of this?
    Thanks in advance,
    Kata
    Details:
    Oracle Database 11g Express Edition Release 11.2.0.2.0
    Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64)
    ODBC Driver: SQL Server Native Client 11.0 (32 bit)
    initkatimssql.ora:
    HS_FDS_CONNECT_INFO=katimssql
    HS_FDS_TRACE_LEVEL = ON
    HS_TRANSACTION_MODEL = READ_ONLY_AUTOCOMMIT
    I tried these, none of them worked, the error message is the same.
    HS_FDS_TRACE_LEVEL = off
    HS_TRANSACTION_MODEL = SINGLE_SITE
    HS_TRANSACTION_MODEL = READ_ONLY_AUTOCOMMIT
    HS_TRANSACTION_MODEL = READ_ONLY

    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

  • Oracle Link for Distributed Transaction

    In my application, I've to integrate two system (or I would say two separate instances of Oracle databases) through a Java Program.
    Program will copy some data (approximately 100 records/hour) from one instance of Oracle database and transfer the same to other instance of Oracle and Vice versa. Since this is going to be a stand alone batch application, I thought of using Distributed Transaction Manager like JBOSS TM for controlling distributed transaction.
    Is this approach right? Or can you suggest me any other better approach for this job?

    853627 wrote:
    I do agree with your Oracle Link explanation, and Yes that would be ideal to have in this case. For some reason, I'm forced to use the Java way.
    Why i'm using the distributed transaction because, I'm following certain steps to complete one iteration:
    1) Read the data from Database A,
    2) Move the data to Database B
    3) After successful execution of Step 1 and 2, There is another table in Database A where I need to mark that certain records have been migrated from Database 'A' to 'B'
    4) After that I've to update a summary table with details of the migration like : Number of records read, Time when this routine completed, any validation error in records etc..Distributed transactions require database level support and complications.
    But I don't see anything that suggests you need this.
    First step is no transaction based.
    Only failure point is between 2 and 3/4. And I suspect you could handle that with a tracking table in A.
    1) Start transaction, Read the data from Database A, Update tracking table, end transaction.
    2) Move the data to Database B
    3) Start Transaction
    4) After successful execution of Step 1 and 2, There is another table in Database A where I need to mark that certain records have been migrated from Database 'A' to 'B'
    5) (Presumably A) After that I've to update a summary table with details of the migration like : Number of records read, Time when this routine completed, any validation error in records etc..
    6) Clean tracking table
    7) End transaction.
    If there is a failure, then use the tracking table to facilate correction.

  • Unable to enlist in a distributed transaction (Windows7, Oracle 11G R1)

    Hi,
    I have a .Net application running on Windows 7 x64 using VisualStudio2008 and Oracle 11G R1 32bit client
    In it I call a webservice calling another webservice, this requires to use oramts that interfaces with Microsoft DTC. However I'm getting the following error when calling the service method:
    "Unable to enlist in a distributed transaction"
    I have checked the following:
    - Ora MTS is installed
    - DTC is running, the security settings allow AX transactions (in fact I just allowed everything)
    - Network services have the permission to access oracle dlls
    - The registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI contains the following: "OracleXaLib"="xa80.dll" "OracleSqlLib"="SQLLib80.dll" "OracleOciLib"="oci.dll" (not sure if this is right)
    What is it I'm doing wrong ? Does this version of Oracle work correctly on W7 ?
    By the way it works fine on Windows XP !
    I've spend quite some time trying to find a resolution..
    Thanks!

    I think I answered my own question
    It seems that MSDTC is not supported by Oracle 11G R1 on Windows x64 !
    All Oracle Database components are supported on Windows x64 with the following exceptions:
    •Oracle Services for Microsoft Transaction Server are not supported on Windows Vista. As a result, all Oracle Windows data access drivers on Windows Vista that use Oracle Services for Microsoft Transaction Server to enlist in Microsoft Distributed Transaction Coordinator (MSDTC) coordinated transactions cannot participate in those coordinated transactions. These data access drivers include Oracle Data Provider for .NET, Oracle Provider for OLE DB, Oracle Objects for OLE, and ODBC. Check OracleMetaLink for up to date information on Oracle Services for Microsoft Transaction Server certification with Windows Vista.
    http://download.oracle.com/docs/cd/B28359_01/install.111/b32006/reqs.htm#CHDCEFIJ
    Edited by: 845528 on 18 mars 2011 05:05

  • Using Distributed Transaction with oracle 9i and VB

    How to I get distributed transaction to work between a COM + object in VB and oracle using MSDAORA.1 driver? I keep getting the following error:
    error number:
    -2147168229
    error description:
    Cannot connect to the transaction manager or the transaction manager is unavailable.

    Oracle 9i works great with VB.NET. I would recommend you to use Oracle Data Provider .NET (ODP.NET) as a database driver
    http://otn.oracle.com/tech/windows/odpnet/content.html
    for better performance and get full advantage of Oracle 9i features.
    Regards
    Jagriti
    OTN Team @IDC

  • What commands used for taking backup of oracle database using BR*Tools

    Can somebody please help me urgently to know what are the commands used for taking backup of oracle database using BR TOOLS.Also specifythe commands in detail which can be used for taking backups of oracle database ,Online Redo log files in databse using BRBACK tool,Archiving of offline, redo log files using BRARCHIVE, and Restoring a Database using BRRESTORE tool Commands(Plese specify the commands with their Syntax used).Also specify the commands with their Syntax which are used for taking backup of oracle database(online,Offline redo log files) into Tapedrives using BRTOOLS commands.
    Thanking You for helping (in advance).

    Dear Ashish,
    BRBACKUP / BRARCHIVE calls the operating system command to copy the files.
    Simple approach to get the commands is as follows.
    1. Set the BR_TRACE (as given in the SAP note 29321) and run the command for which you need to know the OS / SQL commands.
    2. This will generate the log file with the trace information. This trace has the information of the commands used by the job you have run.
    Hope this helps.
    Regards,
    Madhukar

  • What are considerations for Highly Transactional Database

    Hi,
    Can anyone please tell me about considerations for highly transactional database? Is Oracle 10g RAC better or Oracle DB with dataguard?
    Thanks.
    Regards,
    RJiv.

    I'm still not understanding what your question is... Load characteristics are quite irrelevant when discussing the necessity of DataGuard, though the amount of redo generated obviously impacts how much bandwidth is required between the primary and standby site. Bare transaction numbers are somewhat irrelevant when discussing the necessity or advisability of RAC since the amount of work a "transaction" does depends wildly on the application, the number of "transactions" a server can handle depends wildly on the hardware, and the business's need for scalability/ load balancing/ surviving node failure are independent of the transaction load.
    Justin

  • 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

  • Weblogic 5.1, Distributed Transaction and Oracle Database Link

    We are planning to add a new functionality to run in Weblogic server and it
    needs to update tables in two different Oracle databases. Since we are using
    Weblogic 5.1 and it is unrealistic to upgrade to 6.1 in short term, we have
    to deal with the fact that distributed transaction is not supported by JTS
    on 5.1.
    One workaround we can think of is to utilize Oracle database link. Instead
    of having two connection pools, the application talks to only one database
    and access the tables on the other ones through Oracle database link.
    Therefore, when a session bean tries to update two tables on database 1 in
    one transaction, one of the tables is just a link to the other database. We
    hope that even though distributed transaction is not supported by JTS in
    Weblogic 5.1, but since it is supported by Orable, it would work.
    Do you think the above workaround would work? Does anyone have experience on
    something like that?
    Thanks in advance,
    David Chen
    [email protected]

    Hi. You should be able to use any JDBC driver with WebLogic 5.1.
    It may be the JVM that complains, if you use too old a JVM...
    Joe Weinstein at BEA Systems

  • Problem in Distributed transaction with Oracle 8.1.7 and Weblogic 7.0

              Hi,
              I am using two unmanaged weblogic 7.0 servers and oracle 8.1.7 enterprise edition.
              I am using oracle.jdbc.xa.client.OracleXADataSource for creating connection pool
              in weblogic. The pool gets created fine but when connection it is getting used
              it throws up following error.
              java.sql.SQLException: ORA-02044: transaction manager login denied: transaction
              in progress
              ORA-06512: at "SYS.JAVA_XA", line 0
              ORA-06512: at line 1
              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
              at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
              at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
              at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
              at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
              at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
              at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
              at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
              at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
              at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:407)
              at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:171)
              at weblogic.jdbc.jta.VendorXAResource.start(VendorXAResource.java:41)
              at weblogic.jdbc.jta.DataSource.start(DataSource.java:569)
              I don't know what is causing this problem.Please send me the pointers.
              Regards,
              Vikash
              

    ID is a NUMBER and id.toString() is not a number, for
    example it ca be a null reference.
    well we tryed also this version :
    ps.setLong(1, id.longValue());
    moreover the exception wasn't thrown for the value of id :56 but was thrown for the value of id : 88. Hence I think it is a case of something other than my code.
    michal

  • Distributed Transactions in Oracle

    I have a SP which has explicit commit but it fails in DTC with the following error:
    ORA-02089: COMMIT is not allowed in a subordinate session
    The functionality that I want to achieve is the Oracle procedure should have commit / rollback when its done and also should praticipate in the DTC.
    Iam using .NET transactionscope.

    Hi,
    You want the procedure to commit regardless of whether the distrib txn commits or rolls back? If you want to do that you'll want to declare the stored procedure with PRAGMA AUTONOMOUS_TRANSACTION
    I dont see a way, or reason to, have the procedure under BOTH local txn control and distrib txn control.
    Hope it helps,
    Greg

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

Maybe you are looking for