Ora-01591 Lock held in by In-doubt distributed transaction - help required

In my web application i am getting an error @ a particular page. I am using JTA user transaction to mark the transaction boundaries. On commit i am confronting the error "lock held in by In-Doubt transaction. I queried pending_trans$,dba_2pc_pending and force commit the transaction.Also i purged the transaction using Purge_Lost_db_entity. Still after doing all these i am facing the same problem with a new transaction no.
I did all the below steps:
I did follow the below steps:
SELECT * FROM PENDING_TRANS$
SELECT
LOCAL_TRAN_ID, GLOBAL_TRAN_ID, STATE, MIXED, HOST, COMMIT#
FROM
DBA_2PC_PENDING
WHERE
LOCAL _TRAN_ID = '??.';
SELECT LOCAL_TRAN_ID, IN_OUT, DATABASE, INTERFACE
FROM DBA_2PC_NEIGHBORS;
COMMIT FORCE 'local transactionID', 'SCN';
DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY (local transactionID); OR
DBMS_TRANSACTION.PURGE_MIXED (local transactionID);
SELECT s.inst_id,
s.sid,
s.serial#,
p.spid,
s.username,
s.program
FROM gv$session s
JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE s.type != 'BACKGROUND'
and s.program='JDBC Thin Client'
ALTER SYSTEM KILL SESSION '102,10' IMMEDIATE;
Database shutdown and restart doesnt work..
Please anyone help..

tis is the result of the query v$version
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
"CORE 10.2.0.3.0 Production"
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
I use websphere6.1 and oracle 10.2.0.3. using JTA UserTransaction to define boundaries. I am facing tis issue from last week only before it was working fine. I did the commit force as mentioned before to manually unlock transaction.From then i am getting this error. Could u pls help. I m having pressure from onsite, i dont know what is causing the error in one particular flow. I have included the error logs below.
[7/14/10 19:15:54:328 IST] 00000023 WSRdbXaResour E DSRA0304E: XAException occurred. XAException contents and details are:
The XA Error is : -3
The XA Error message is : A resource manager error has occured in the transaction branch.
The Oracle Error code is : 17410
The Oracle Error message is: Internal XA Error
The cause is : null.
[7/14/10 19:15:54:343 IST] 00000023 WSRdbXaResour E DSRA0302E: XAException occurred. Error code is: XAER_RMERR (-3). Exception is: <null>
[7/14/10 19:15:54:359 IST] 00000023 XATransaction E J2CA0027E: An exception occurred while invoking commit on an XA Resource Adapter from dataSource jdbc/ScorecardDataSource, within transaction ID {XidImpl: formatId(57415344), gtrid_length(36), bqual_length(54), data(00000129d13434870000000100000008f0685880e9e9a1514500185d37d88f31da70140400000129d13434870000000100000008f0685880e9e9a1514500185d37d88f31da701404000000010000000000000000000000000001)}: oracle.jdbc.xa.OracleXAException
[7/14/10 19:15:54:531 IST] 00000023 MCWrapper E J2CA0081E: Method cleanup failed while trying to execute method cleanup on ManagedConnection WSRdbManagedConnectionImpl@3e0a3e0a from resource jdbc/ScorecardDataSource. Caught exception: com.ibm.ws.exception.WsException: DSRA0080E: An exception was received by the Data Store Adapter. See original exception message: No more data to read from socket. with SQL State : null SQL Code : 17410
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
[7/14/10 19:15:54:593 IST] 00000023 MCWrapper E J2CA0081E: Method destroy failed while trying to execute method destroy on ManagedConnection WSRdbManagedConnectionImpl@3e0a3e0a from resource No longer available. Caught exception: java.lang.NullPointerException
[7/14/10 19:16:08:093 IST] 00000023 SystemErr R Caused by: java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction 9.34.890
Pls help

Similar Messages

  • ORA-01591: lock held by in-doubt distributed transaction

    I am using oracle wcf adapter to connect to oracle to insert.
    I am getting the ORA-01591: lock held by in-doubt distributed transaction.
    Any ideas as to what could be the resolution. I have followed the below mentioned steps. but that's not a permanent solution.
    Please advice.
    The resolution described below is not acceptable and never should have been used.  Although it does avoid the error, it's not okay to turn off AmbientTransaction when performing inserts
    and/or updates.  A different solution needs to be found.<o:p></o:p>
    http://msdn.microsoft.com/en-US/library/dd788352(v=BTS.10).aspx <o:p></o:p>
    "Not performing operations in a transactional context is advisable only for operations that do not make changes to the database. For operations that update data in the database, we recommend
    setting the binding property to true otherwise you might either experience message loss or duplicate messages depending on whether you are performing inbound or outbound operations."<o:p></o:p>
    ********************************************<o:p></o:p>
    This can be resolved by adjusting the configuration settings on the Oracle adapter, accessible via the Send Port properties.  The properties and the values that should be used are shown below:<o:p></o:p>
    ** Binding tab:
    incrPoolSize:  1
    maxPoolSize:  10
    useAmbientTransaction:  False<o:p></o:p>
    ** Messages tab:
    Isolation Level:  ReadCommitted<o:p></o:p>
    Also, you'll need to get a DBA to rollback the hanging "in-doubt" transactions, which will be viewable via the sql below.  Otherwise, if you try processing the same data again, you'll
    still get the same error.<o:p></o:p>
    SELECT LOCAL_TRAN_ID, GLOBAL_TRAN_ID, STATE, MIXED, HOST, COMMIT# FROM DBA_2PC_PENDING;<o:p></o:p>
    The transactions can be rolled back with sql, using this syntax:<o:p></o:p>
    ROLLBACK FORCE '<LOCAL_TRAN_ID>';
    <o:p></o:p>
    Thank you and have great day! Vivek Kulkarni MCAD.net

    Hi Vivek,
    This error is encountered by many DBA's and cause problem by locking the distributed transaction process, and not letting the query go through, because the Two - Phase Commit Mechanism got an error somewhere.
    he DBA should query the pending_trans$ and related tables, and attempt to repair network connection(s) to coordinator and commit point.
    Here are some codes to help you through the process:
    This one brings in-doubt transactions:
    select * from DBA_2PC_PENDING where state='prepared'
    This one prepares the rollback script for the transactions:
    select 'rollback force '''||local_tran_id||''';' from DBA_2PC_PENDING where state='prepared'
    All this is well described in below link
    ORA-01591: lock held by in-doubt distributed transaction
    ORA-01591: lock held by in-doubt distributed transaction string tips
    On BizTalk Side you need to make ambient transaction to false as Oracle does not go ahead with DTC Transaction with  Biz Talk
    Thanks
    Abhishek

  • ERROR:ORA-01591: lock held by in-doubt distributed transaction (URGENT)

    hi
    i m having this error when trying to access one table in oracle 10g database
    ORA-01591: lock held by in-doubt distributed transaction 3.30.4119
    i restarted the server but of no use. can anyone help?

    ORA-01591: lock held by in-doubt distributed transaction string
    Cause: Trying to access resource that is locked by a dead two-phase commit transaction that is in prepared state.
    Action: DBA should query the pending_trans$ and related tables, and attempt to repair network connection(s) to coordinator and commit point. If timely repair is not possible, DBA should contact DBA at commit point if known or end user for correct outcome, or use heuristic default if given to issue a heuristic commit or abort command to finalize the local portion of the distributed transaction.
    go through
    drop locked table
    plz. to through below i hope it will help u.
    Re: ORA-1591 error
    Message was edited by:
    user52

  • ORA-01591: lock held by in-doubt distributed transaction 14.4.44

    Hi,
    I am using WLI 8.1 SP2 on Windows 2000, Oracle 9.2. I am getting this error...
    <Apr 23, 2004 10:43:43 AM EDT> <Error> <WLW> <000000> <error
    java.io.IOException: [BEA][Oracle JDBC Driver][Oracle]ORA-01591: lock held by
    in
    -doubt distributed transaction 14.4.44
    at weblogic.jdbc.base.BaseBlobOutputStream.write(Unknown Source)
    at weblogic.jdbc.base.BaseBlobOutputStream.write(Unknown Source)
    at com.bea.wlw.runtime.core.bean.BMPContainerBean$OracleTableAccess.doSt
    oreByInsert(BMPContainerBean.java:904)
    at com.bea.wlw.runtime.core.bean.BMPContainerBean.doInsert(BMPContainerB
    ean.java:1785)
    at com.bea.wlw.runtime.core.bean.BMPContainerBean.ejbStore(BMPContainerB
    ean.java:1742)
    at com.bea.wli.bpm.runtime.ProcessContainerBean.ejbStore(ProcessContaine
    rBean.java:79)
    at com.bea.wlwgen.PersistentContainer_nga2bb_Impl.ejbStore(PersistentCon
    tainer_nga2bb_Impl.java:149)
    at weblogic.ejb20.manager.ExclusiveEntityManager.beforeCompletion(Exclus
    iveEntityManager.java:556)
    at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManag
    er.java:745)
    at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(Serv
    erSCInfo.java:1010)
    at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(Se
    rverSCInfo.java:115)
    at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAn
    dChain(ServerTransactionImpl.java:1142)
    at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(
    ServerTransactionImpl.java:1868)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(Se
    rverTransactionImpl.java:250)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTran
    sactionImpl.java:221)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
    at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.
    java:316)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    I have tried dropping all wli tables & deleting tlog files (deleting everything
    from cgServer directory). Still get this error.
    Any suggestions??
    TIA
    -Amit

    Getting this problem with WLI. I have just truncated tables and it's fine now.
    Thanks,
    Amit
    "Sheetal Jain" <[email protected]> wrote:
    >
    Amit,
    If these problem is happening with the WLI database then I would suggest
    you should
    talk to BEA support. If it is happening in the application you have built
    just
    look for any deadlock conditions happening in some scenarios inside different
    inter-related transactions running at the same time, I mean transaction
    1 is locking
    something and in the meantime another one B locks something else which
    is required
    for the transaction A to move farward and now second one needs the resource
    locked
    by 1st.
    Hope this helps
    "Nagraj Rao" <[email protected]> wrote:
    Hello Amit !,
    Lock From In-Doubt Transaction is a 2-p TX issue, A query or DML statement
    that
    requires locks on a database is probably blocked due to some lock held
    by a resource
    of an "in-doubt distributed transaction".
    A DB Admin can manually Commit or Rollback an "in-doubt distributedtransaction".
    So I suggest you talk to the DBA
    More at : http://www-rohan.sdsu.edu/doc/oracle/server803/A54653_01/ds_ch3.htm
    BTW here's what Oracle says :
    ORA-01591 lock held by in-doubt distributed transaction string
    Cause: An attempt was made to access resource that is locked by a dead
    two-phase
    commit transaction that is in prepared state.
    Action: The database administrator should query the PENDING_TRANS$ and
    related
    tables, and attempt to repair network connection(s) to coordinator and
    commit
    point. If timely repair is not possible, the database administratorshould
    contact
    the database administrator at the commit point if known or the end user
    for correct
    outcome, or use heuristic default if given to issue a heuristic COMMIT
    or ABORT
    command to finalize the local portion of the distributed transaction.
    "Sheetal Jain" <[email protected]> wrote:
    Amit,
    It could be a bug. Open a ticket with BEA and see if they have a patch.
    "Amit Bhutra" <[email protected]> wrote:
    Hi,
    I am using WLI 8.1 SP2 on Windows 2000, Oracle 9.2. I am getting
    this
    error...
    <Apr 23, 2004 10:43:43 AM EDT> <Error> <WLW> <000000> <error
    java.io.IOException: [BEA][Oracle JDBC Driver][Oracle]ORA-01591: lock
    held by
    in
    -doubt distributed transaction 14.4.44
    at weblogic.jdbc.base.BaseBlobOutputStream.write(Unknown Source)
    at weblogic.jdbc.base.BaseBlobOutputStream.write(Unknown Source)
    at com.bea.wlw.runtime.core.bean.BMPContainerBean$OracleTableAccess.doSt
    oreByInsert(BMPContainerBean.java:904)
    at com.bea.wlw.runtime.core.bean.BMPContainerBean.doInsert(BMPContainerB
    ean.java:1785)
    at com.bea.wlw.runtime.core.bean.BMPContainerBean.ejbStore(BMPContainerB
    ean.java:1742)
    at com.bea.wli.bpm.runtime.ProcessContainerBean.ejbStore(ProcessContaine
    rBean.java:79)
    at com.bea.wlwgen.PersistentContainer_nga2bb_Impl.ejbStore(PersistentCon
    tainer_nga2bb_Impl.java:149)
    at weblogic.ejb20.manager.ExclusiveEntityManager.beforeCompletion(Exclus
    iveEntityManager.java:556)
    at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManag
    er.java:745)
    at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(Serv
    erSCInfo.java:1010)
    at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(Se
    rverSCInfo.java:115)
    at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAn
    dChain(ServerTransactionImpl.java:1142)
    at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(
    ServerTransactionImpl.java:1868)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(Se
    rverTransactionImpl.java:250)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTran
    sactionImpl.java:221)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
    at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.
    java:316)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    I have tried dropping all wli tables & deleting tlog files (deleting
    everything
    from cgServer directory). Still get this error.
    Any suggestions??
    TIA
    -Amit

  • ORA-01591: lock held by in-doubt distributed transaction 2.53.300807

    SQL> select count(*) from TBCD_CCODMSG;
    select count(*) from TBCD_CCODMSG
    ERROR at line 1:
    ORA-01591: lock held by in-doubt distributed transaction 2.53.300807
    SQL> select * from TBCD_CCODMSG where rownum =10;
    select * from TBCD_CCODMSG where rownum =10
    ERROR at line 1:
    ORA-01591: lock held by in-doubt distributed transaction 2.53.300807
    SQL> alter session set events '1591 trace name errorstack level 10';
    Session altered.
    SQL> select * from TBCD_CCODMSG where rownum =10;
    select * from TBCD_CCODMSG where rownum =10
    ERROR at line 1:
    ORA-01591: lock held by in-doubt distributed transaction 2.53.300807
    SQL> select object_name, object_type from user_objects where object_name = 'TBCD_CCODMSG';
    OBJECT_NAME
    OBJECT_TYPE
    TBCD_CCODMSG
    TABLE
    SQL> select * from DBA_2PC_PENDING;
    no rows selected
    SQL> select * from DBA_2PC_NEIGHBORS where local_tran_id = '2.53.300807';
    LOCAL_TRAN_ID IN_
    DATABASE
    DBUSER_OWNER I DBID SESS#
    BRANCH
    2.53.300807 in
    EFT.WORLD
    CD1 N 15f1353d 1
    0B000B00011902000128

    보통은 오라클 Background 프로세스인 RECO 프로세스가
    해당 문제를 자동으로 복구해줍니다.
    하지만, 가끔씩 제대로 처리를 못해주는 경우는 DBA 가 아래 절차를 확인하여
    수동으로 처리를 해줘야 하는 경우도 있습니다.
    아래 내용을 참고하세요...
    No. 12163
    DISTRIBUTED TRANSACTION TROUBLESHOOTING (ORA-1591해결 방법)
    ==========================================================
    다른 database를 이용하지 않는 local transaction이, 비정상 종료시 자동으로
    rollback되는 것과는 달리, 분산 트랜잭션의 경우 2 phase commit수행 단계중에
    fail이 발생하게 되면 관여된 일부 database에서는 rollback 혹은 commit이 되고,
    일부는 distributed lock이 걸린 상태로 계속 지속될 수 있다.
    이렇게 pending된 transaction에 대해서는 기본적으로 Oracle의 background
    process인 RECO process가 자동으로 정리하여 주나, 경우에 따라 자동으로 정리가
    되지 못하는 상황이 발생할 수 있다.
    이렇게 정리가 되지 않아, distributed lock이 걸린 경우에는, 이후 관계된
    table을 조회나 변경시 ora-1591 오류가 발생할 수 있으므로, distributed
    transaction이 실패한 경우 db admin이 관여하여 pending된 transaction을
    정리하여 줄 필요가 있다.
    distributed transaction이 오류가 발생하거나, 혹은 이후에 ora-1591이 발생하는
    경우, 조치 방법을 9단계의 STEP으로 정리하였다.
    *** distributed transaction의 2 phase commit에 대한 개념 및 자세한 절차는
    <korean bulletin:12185>를 참조한다.
    [참고 1] 문서의 이해를 위해서 분산 환경에 포함된 node를 V817LOC와 V817REM으로
    예를 들고, V817LOC node에서 transaction을 수행하였다고 가정한다.
    [참고 2] 아래에 언급되는 dbms_transaction package는 기본적으로 catproc.sql
    script에 의해 생성되나 만약 존재하지 않는다면,
    cd $ORACLE_HOME/rdbms/admin directory의 dbmsutil.sql, prvtutil.plb
    script를 sys user에서 수행하도록 한다.
    (svrmgrl에서 connect internal에서 수행하는것이 일반적)
    그리고 이 package는 항상 transaction의 맨 처음에 수행되어야 한다.
    즉, 새로 session을 연결하여 수행하거나, 혹은 앞에 dml에 있었다면,
    commit이나 rollback을 수행 후 이 package를 수행하여야 한다.
    아래의 STEP중 STEP 1 ~ 3까지는 문제 해결을 위해 필수적인 단계는 아니므로 바로
    문제를 시급히 해결해야 하는 경우 4번부터 확인하도록 한다.
    STEP 1: alert.log file을 check한다.
    bdump directory의 alert.log에는 분산 트랜잭션 fail시 관계된 오류 메시지등
    log가 항상 남게 된다. 예를 들면 다음과 같은 형태인데, rollback/commit되었
    는지, in-doubt 상태인지와 그 외에 transaction id등 정보를 확인할 수 있다.
    Tue Dec 12 16:23:25 2000
    ORA-02054: transaction 1.8.238 in-doubt
    ORA-02063: preceding line from V817REM
    Tue Dec 12 16:23:25 2000
    DISTRIB TRAN V817LOC.WORLD.89f6eafb.1.8.238
    is local tran 1.8.238 (hex=01.08.ee)
    insert pending prepared tran, scn=194671 (hex=0.0002f86f)
    STEP 2: network 환경을 확인한다.
    listener가 떠 있는지, database link가 모두 정상적인지 확인해 본다.
    STEP 3: RECO process가 떠 있는지 확인한다.
    os상에서 RECO process가 떠 있는지 확인하려면 다음과 같이 한다.
    os> ps -ef | grep reco
    RECO process는 db가 startup되면서 자동으로 구동되는 background process로
    distributed recovery를 disable시키면 사라지게 된다. distributed recovery를
    enable/disable시키는 방법은 아래와 같다.
    SQL>alter system enable distributed recovery;
    SQL>alter system disable distributed recovery;
    아래의 조치사항 중에서 STEP 9번을 제외하고는 기본적으로 RECO process가
    자동으로 처리하는 작업과 동일하다. 그러나 여러가지 문제로 인해 RECO가
    자동으로 정리하지 못한 경우 이 문서의 방법대로 manual하게 정리하여 주어야
    한다.
    STEP 4: DBA_2PC_PENDING을 조회해 본다.
    sqlplus system/manager
    SQL>select local_tran_id, global_tran_id, state, mixed, host, commit#
    from dba_2pc_pending;
    다음과 같은 결과가 return된다.
    LOCAL_TRAN_ID|GLOBAL_TRAN_ID |STATE |MIX|HOST |COMMIT#
    -------------|----------------------|--------|---|----------|--------
    1.8.238 |V817LOC.WORLD.89f6eafb|prepared|no |SUP_SERVER|194671
    |.1.8.238 | | |\eykim |
    이 조회로 인해 여러개의 row가 나오는 경우 ora-1591이나 distributed fail에
    관련된 오류시 나타나는 local transaction id값과 return된 LOCAL_TRAN_ID값을
    비교하여 일치하는 row를 확인하면 된다. 이때 LOCAL_TRAN_ID 값과
    GLOBAL_TRAN_ID의 뒷부분의 숫자가 동일하다면 이것은 이 node가 global
    coordinator임을 의미한다.
    STEP 5: DBA_2PC_NEIGHBORS view를 조회해 본다.
    sqlplus system/manager
    SQL>select local_id, in_out, database, dbuser_owner, interface
    from dba_2pc_neighbors;
    LOCAL_TRAN_ID|IN_OUT|DATABASE |DBUSER_OWNER |INT
    -------------|------|-------------------------|---------------|---
    1.8.238 |in | |SCOTT |N
    1.8.238 |out |V817REM.WORLD |SCOTT |C
    여기에 나타난 row들이 해당 분산 트랜잭션에 관여한 database 정보이다. 이때
    DATABASE column 부분이 null로 나타나는 것은 현재 조회하고 있는 local
    database를 의미하며, IN_OUT이 OUT으로 나타나는 경우 참조하는 node정보인데,
    DATABASE 컬럼의 값이 해당 database를 가리키는 database link name이 된다.
    이 database link name을 이용하여 다음과 같이 remote db의 DBA_2PC_PENDING을
    다시 조사하여 관계된 node들의 상태를 확인할 수 있다.
    SQL>select local_tran_id, global_tran_id, state, mixed, host, commit#
    from dba_2pc_pending@v817rem;
    각 node의 DBA_2PC_PENDING의 return된 row들이 같은 분산 트랜잭션에 포함된
    정보인지는 GLOBAL_TRAN_ID 값을 이용하여 확인할 수 있다.
    STEP 6: commit point site를 확인한다.
    commit point site에 대해서는 <korean bulletin:12185>을 참조한다.
    이 예의 경우 COMMIT_POINT_STRENGTH를 지정하지 않았기 때문에 default로
    global coordinator가 아닌 V817REM이 commit point site가 된다. 일반적으로
    commit point site는 global coordinator의 DBA_2PC_NEIGHBORS의 IN_OUT
    field가 OUT으로 나타나고 INTERFACE 부분이 C로 나타나게 된다.
    commit point site가 중요한 이유는 이 node의 local transaction부분은
    prepared상태를 거치지 않아 in-doubt 상태가 되는 일이 없고, 그러므로
    distributed lock에 의해 조회나 DML시 오류가 발생하는 없게 된다.
    이러한 이유로 제일 중요한 data를 포함하는 중심이 되는 node를 commit point
    site로 지정하는 것이 바람직하다.
    STEP 7: DBA_2PC_PENDING의 MIXED column을 확인한다.
    - MIXED값이 NO인 경우 : STEP 8 수행
    - MIXED값이 YES인 경우: STEP 9 수행
    DBA_2PC_PENDING에서 MIXED column을 YES나 NO의 값으로 지정하는 것은 RECO
    process가 결정하여 변경하게 된다. MIXED가 YES가 되는 대표적인 경우는,
    commit point site가 이미 commit을 수행한 상태에서 분산 트랜잭션이 fail된
    경우, non-commit point site에서 prepared 상태의 transaction을 rollback
    force시켜 분산 트랜잭션의 consistency가 깨진 상태이다.
    (STATE column의 경우 commit point site는 COMMITTED로 non-commit point
    site는 FORCED ROLLBACK으로 나타난다)
    [참고] commit point site가 아직 commit을 수행하기 전에 분산 트랜잭션이
    fail되어 commit point site가 rollback된 경우, non-commit point
    site에서 prepared 상태의 transaction을 commit force 하면 이것도
    논리적으로는 consistency가 지켜지지 않은 것은 동일하나 이때는
    MIXED column이 no인 상태가 된다. 그 이유는 commit point site가
    rollback되어 DBA_2PC_PENDING view에 entry가 남지 않기 때문에
    RECO가 명시적으로 mixed 상태로 인식하는 것이 불가능하기 때문으로
    파악된다.
    STEP 8: DBA_2PC_PENDING의 STATE column의 값을 확인한다.
    CASE 8-1: STATE field값이 COMMITTED인 경우
    만약 STATE가 COMMITTED인 경우는 이 local database(V817LOC)에서는
    transaction이 성공적으로 commit 되었음을 나타내므로, 이 node에서는 어떠한
    작업도 수행할 필요가 없다. 이 entry는 RECO process에 의해 자동으로 지워질
    것이며, 만약 RECO가 어떠한 이유로 이 row를 지우지 못했다면 다음과 같이
    db admin이 직접 지워도 된다. 괄호 안의 값은 local_tran_id값이다.
    sqlplus sys/manager (반드시 sys로 접속한다)
    SQL>exec dbms_transaction.purge_lost_db_entry('1.8.238');
    이렇게 V817LOC의 STATE부분이 COMMITTED인 경우는, 이미 commit point site인
    V817REM은 commit된 후임을 나타낸다. 그러므로 V817REM은 STATE가 COMMITTED로
    나타나거나 아니면 commit후 이미 정보가 지워져 DBA_2PC_PENDING에 정보가
    나타나지 않을 수 있다. 그러므로 V817REM에 대해서는 필요한 경우 V817LOC의
    앞의 조치 방법과 동일하게 DBA_2PC_PENDING의 내용만 정리하여 주면 된다.
    만약 V817REM이 아닌 별도의 다른 node가 분산 트랜잭션에 관여했다고 가정하고
    V817LOC가 COMMITTED인 상태에서 그 node의 STATE가 PREPARED로 나타난다면
    그 node에 대해서는 아래의 CASE 8-2를 참조하여 해결하도록 한다.
    CASE 8-2: STATE field값이 PREPARED인 경우
    STATE값이 PREPARED인 경우는 이 node(V817LOC)에서 변경된 data가 속한 block
    에 distributed lock이 걸린 상태이며, 이런 경우 변경된 data가 있는 block에
    대한 모든 read/write가 ora-1591을 발생시키므로 trouble shooting에서 제일
    중요한 부분이라 할 수 있다.
    먼저 STEP 4와 STEP 5를 참조하여 관계된 모든 node들의 DBA_2PC_PENDING view
    를 조회하여 본다. 이때 다른 node(V817REM)의 DBA_2PC_PENDING에 정보가 없다
    면 V817REM이 commit point site이고 이미 data는 rollback되었음을 나타낸다.
    이때는 V817LOC의 prepared 상태의 transaction을 다음과 rollback force 시켜
    준다.
    즉, V817LOC에서,
    SQL>rollback force '1.8.238';
    만약 V817REM node에 해당 정보가 있고 상태가 COMMITTED라면 V817LOC도
    다음과 같이 commit을 해 주어야 한다.
    SQL>commit force '1.8.238';
    이때 local_tran_id 뒤에 SCN을 지정할 수 있는데 이것은 관여된 node 중 제일
    큰 SCN을 지정하도록 한다. 이 SCN 값은 DBA_2PC_PENDING의 COMMIT# field에서
    값을 확인할 수 있으며 이렇게 하는 이유는 이후 분산 database중 한 database
    에서 incomplete recovery가 필요한 경우, 다른 database 들도 일관성을
    맞추기 위해 incomplete recovery를 이용할 수 있게 하기 위한 것이다.
    SQL>commit force '1.8.238', '194671'
    CASE 8-3: STATE field값이 COLLECTING인 경우
    STATE field가 collecting인 경우는 아직 distributed lock을 걸기 전단계에서
    transaction이 비정상 종료됨을 나타내며, 이 단계에서는 distributed lock이
    걸리기 전이어서 변경된 data는 이미 rollback된 상태이다. 이 경우는
    DBA_2PC_PENDING에서 해당 entry를 지워 주면 된다.
    sqlplus sys/manager (반드시 sys로 접속한다)
    SQL>exec dbms_transaction.purge_lost_db_entry('1.8.238');
    CASE 8-4: STATE field값이 FORCED ROLLBACK/FORCED COMMIT 인 경우
    이미 RECO나 db admin이 rollback force나 commit force 명령을 시도하여
    STATE가 FORCED ROLLBACK이나 FORCED COMMIT으로 변경된 경우는 추가적으로
    수행할 작업은 없으며, RECO가 자동으로 이 entry를 지워 줄 것이다. 그러나
    RECO가 작업하기를 기다리지 않고 다음과 같이 직접 삭제할 수 있다.
    sqlplus sys/manager (반드시 sys로 접속한다)
    SQL>exec dbms_transaction.purge_lost_db_entry('1.8.238');
    STEP 9: 불일치 사항을 파악하고 DBA_2PC_PENDING을 정리한다.
    어떠한 경우에 DBA_2PC_PENDING의 MIXED column이 YES가 되는지는 이미 STEP 7
    에서 설명하였다. 이렇게 잘못된 조치에 의해 STEP 7에서 설명한 것과 같은
    분산 데이타베이스간의 불일치가 발생한 경우는 간단한 operation을 통해
    일치성을 맞추는 것은 불가능하다.
    분산 트랜잭션의 consistency가 무엇보다 중요한 경우라면 관계된 node의
    database를 모두 문제의 분산 트랜잭션이 수행되기 이전 상태로, incomplete
    recovery를 수행하거나 할 수 있다. 분산 데이타베이스간의 일관성을 위한
    incomplete recovery에 대해서는 여기에서는 다루지 않는다. 한가지 언급한
    말한 것은 앞에서 설명한 분산 트랜잭션의 commit시 이용하는 commit SCN을
    관계된 모든 node들의 최대 SCN으로 이용하는 것이 바로 이러한 recovery를
    위한 것이다. 이렇게 일부 database에서 SCN값이 이전 SCN에서 1씩 증가하는
    것이 아니라 큰 값으로 건너뛰어 다른 database와 같은 SCN을 유지하게
    함으로써, 이후에 incomplete recovery시에 관계된 node들이 서로 동일한
    SCN으로 recovery를 수행하면, 모두 분산 트랜잭션 적용 이전이 되거나 혹은
    모두 이후가 되어 일관성을 유지할 수 있도록 해준다.
    MIXED가 YES인 상태에서, inconsistency를 받아들이고 DBA_2PC_PENDING view를
    정리하려면 다음과 같이 수행한다.
    sqlplus sys/manager (반드시 sys user로 수행한다)
    SQL>exec dbms_transaction.purge_mixed('1.8.238');

  • ORA-01591: lock held by in-doubt distributed transaction string  error

    Hi Gurus,
    I am getting the error
    ORA-01591: lock held by in-doubt distributed transaction string error while running once procedure.
    Procedure basically inserts 2 tables and update 1 table.
    The order of execution is given below.
    However I get the error as table _a locked.
    Can you please help me how to handle this ?
    Begin
    Insert into table_a values (values1, value2); -- (our DB)
    Insert into table_b@remote_DB values (value1, value2); --( REMOTE DB)
    update table C ; -- (our DB)
    commit; -- when I debugged I get exception with the sql error above in this commit.
    End;

    Tina wrote:
    Hi Gurus,
    I am getting the error
    ORA-01591: lock held by in-doubt distributed transaction string error while running once procedure.
    Procedure basically inserts 2 tables and update 1 table.
    The order of execution is given below.
    However I get the error as table _a locked.
    Can you please help me how to handle this ?
    Begin
    Insert into table_a values (values1, value2); -- (our DB)
    Insert into table_b@remote_DB values (value1, value2); --( REMOTE DB)
    update table C ; -- (our DB)
    commit; -- when I debugged I get exception with the sql error above in this commit.
    End;
    01591, 00000, "lock held by in-doubt distributed transaction %s"
    // *Cause:  Trying to access resource that is locked by a dead two-phase commit
    //          transaction that is in prepared state.
    // *Action: DBA should query the pending_trans$ and related tables, and attempt
    //          to repair network connection(s) to coordinator and commit point.
    //          If timely repair is not possible, DBA should contact DBA at commit
    //          point if known or end user for correct outcome, or use heuristic
    //          default if given to issue a heuristic commit or abort command to
    //          finalize the local portion of the distributed transaction.

  • ORA-01591: lock held by in-doubt distributed transaction 5.43.1205830

    ORA-01591: lock held by in-doubt distributed transaction 5.43.1205830
    ORA-06512: at "LEAP.RUN_BATCH_FROM_TABLE", line 159
    ORA-06512: at line 2
    Please kindly assist.
    Thanks+Regards
    2TOAD

    Is this one time or re-ocurring?
    Oracle, as a RM, is simply pointing out that you have an indoubt transaction, with "unknown" state after the prepare phase (2pc), that holds a resource that your batch run needs. Check dba_2pc_pending and retry your batch run.
    If problem persists then maybe it's time to investigate your distributed transaction system (is your app based on MS DTC, COM+ transactions?). You might need to manually resolve this, by forced rollback or commit.
    Use http://tahiti.oracle.com/ and search for the ORA-nnnnn string, to lookup further info about the message.
    Message was edited by:
    orafad

  • ORA-01591 Lock held by in doubt transaction

    We have this error
    ORA-01591 Lock held by in doubt transaction
    this error appear randomly when
    in the same transaction we use inser,delete or update sentence and a call to MS-MSMQ ( asynchronous transaction)
    (Oracle 9i 9.2.0.5, HP Itanium Unix)
    (Web application with .NET ODP Provider)
    thanks for your help

    Hi Vivek,
    This error is encountered by many DBA's and cause problem by locking the distributed transaction process, and not letting the query go through, because the Two - Phase Commit Mechanism got an error somewhere.
    he DBA should query the pending_trans$ and related tables, and attempt to repair network connection(s) to coordinator and commit point.
    Here are some codes to help you through the process:
    This one brings in-doubt transactions:
    select * from DBA_2PC_PENDING where state='prepared'
    This one prepares the rollback script for the transactions:
    select 'rollback force '''||local_tran_id||''';' from DBA_2PC_PENDING where state='prepared'
    All this is well described in below link
    ORA-01591: lock held by in-doubt distributed transaction
    ORA-01591: lock held by in-doubt distributed transaction string tips
    On BizTalk Side you need to make ambient transaction to false as Oracle does not go ahead with DTC Transaction with  Biz Talk
    Thanks
    Abhishek

  • ORA-01591: lock held by in-doubt distributed

    Hi All,
    We are using oracle 8i to communicate informix through oracle 8i gaeways. we are getting ORA-01591 from quite a few days , the application team complains about the in doubt transcation issue. we tried to investigate and found the local and global cordinater is oracle database and the job trying to query and insert one of the table sitting on informix database. we also discovered that we have many "is local tran" entries reported in alert.log and when I query these transcation , they sometime show me in "prepared state" and after some time , the updated to "rollback forced" in the state column. also , we also have job running for cleaning up in doubt in database , which gets invoked periodically and doees the rollback force. going forward, we just failed to understand one thing that we are able to communicate the gateways through oracle database and also able to query the table for which the application team claims that when they perform insert or select they are getting in doubt. also , you would recommened to move/upgrade since this is oracle 8i , we already started migrating our databases to 11g , since this job is pretty critical , we have no option , but to live with this.I would really appriciate , if you could offer some help to me as I am clueless .
    we have many in doubt in alert log
    is local tran 22.89.4837399 (hex=16.59.49d017)
    is local tran 9.18.5331070 (hex=09.12.51587e)
    is local tran 22.89.4837399 (hex=16.59.49d017)
    is local tran 2.10.5449011 (hex=02.0a.532533)
    is local tran 2.10.5449011 (hex=02.0a.532533)
    is local tran 23.18.5210664 (hex=17.12.4f8228)
    is local tran 19.49.4958014 (hex=13.31.4ba73e)
    is local tran 20.18.4845028 (hex=14.12.49ede4)
    is local tran 23.18.5210664 (hex=17.12.4f8228)
    is local tran 19.49.4958014 (hex=13.31.4ba73e)
    is local tran 20.18.4845028 (hex=14.12.49ede4)
    select LOCAL_TRAN_ID, global_TRAN_ID,STATE,ADVICE,MIXED,TRAN_COMMENT from dba_2pc_pending where LOCAL_TRAN_ID ='20.18.4845028';
    LOCAL_TRAN_ID             GLOBAL_TRAN_ID            STATE            MIX TRAN_
    2.10.5449011              PROD01.US.ESTEE.COM.ceedc prepared         no
                              40c.2.10.5449011
    select LOCAL_TRAN_ID, global_TRAN_ID,STATE,ADVICE,MIXED,TRAN_COMMENT from dba_2pc_pending where LOCAL_TRAN_ID ='20.18.4845028';
    LOCAL_TRAN_ID             GLOBAL_TRAN_ID            STATE            A MIX TRAN_
    2.10.5449011              PROD01.US.ESTEE.COM.ceedc forced rollback    no
                              40c.2.10.5449011
    SELECT LOCAL_TRAN_ID, IN_OUT, DATABASE, DBUSER_OWNER , INTERFACE FROM DBA_2PC_NEIGHBORS where  LOCAL_TRAN_ID ='20.18.4845028';
    LOCAL_TRAN_ID IN_OUT DATABASE                  DBUSER_OWNER    INT
    2.10.5449011  in                               DBTRAN          N
    2.10.5449011  out    TG4MELV.US.ESTEE.COM      DBTRAN          C
    05:35:59 SQL> select count(*) from "recover"."hs_transaction_log"@tg4melv.us.estee.com;
      COUNT(*)
             0
    05:37:23 SQL> select count(*) from "recover"."hs_transaction_log"@tg4padc.us.estee.com;
      COUNT(*)
             0Edited by: 937853 on Aug 23, 2012 3:19 AM

    Hi,
    You haven't said which gateway you are using but is it the TG4Informix or are using HSODBC (generic connectivity).
    I would suggest the following -
    - try to determine which transactions are failing and why to try and prevent them happening.
    - if you are using Tg4Informix then check the recovery user and password so it can connect to the Informix database to automatically resolve transactions that have failed. That may be a reason why they are left in the system.
    The 8i gateways have been desupported for a long time now and once you upgrade your RDBMS to 11g you should then obviously use the 11g gateway.
    You can't use a 8i RDBMS against any 11g gateway so you can't do it before upgrading the RDBMS.
    The Informix transaction log table is empty so the only action is to manually delete the outstanding transactions that have been left in the Oracle database.
    Regards,
    Mike

  • ORA-01591: lock held by in-doubt distributed transaction 206.77.12171

    I am having this type of ORA error. I have tried to look at the PENDING_TRANS$ as said in most threads but there is no record found. I have asked our DBA team if there was any locked transactio but they said that there was none. I have also read from another thread that this is a bug and there is a patch available to fix this but that patch is not available for Orace10g. By the way, I have Oracle 10g as my database.
    Anyone who have an idea to fix this? Thanks in advance

    this scenario generally arises during distributed transactions.may be transaction at the local or distributed site is not committed or roll backed.Try to commit the transaction at your side and ask the DBA at remote site to commit the transaction or roll back the transaction

  • ORA-01591: lock held by in-doubt distributed transaction string

    Hi All,
    How to find out which query is locking the table. this is what I got when I ran the below query.
    SQL> SELECT addr,KTUXEUSN, KTUXESLT, KTUXESQN, /* Transaction ID */
    2 KTUXESTA Status,
    3 KTUXECFL Flags
    4 FROM x$ktuxe
    5 WHERE ktuxesta!='INACTIVE'
    6 AND ktuxeusn=7;
    ADDR KTUXEUSN KTUXESLT KTUXESQN STATUS
    FLAGS
    5D32920C 7 35 1672382 PREPARED
    SCO|COL|REV|DEAD
    Thanks

    Here is the output:
    INST_ID SID SERIAL# STATUS
    MACHINE
    PROGRAM USED_UBLK
    HOURS_ACTIVE USED_UREC
    1 11 49014 ACTIVE
    \WSDB0335
    w3wp.exe 1
    64.295 1
    INST_ID SID SERIAL# STATUS
    MACHINE
    PROGRAM USED_UBLK
    HOURS_ACTIVE USED_UREC
    1 99 312 INACTIVE
    WSDB0335
    ORACLE.EXE 1
    64.295 1

  • Lock held by in-doubt distributed transaction

              I'm having an intermittent problem in our server where a distributed transaction
              between WebLogic JMS (6.1 sp3) and Oracle (using the 9.1.2 XA driver) doesn't
              complete and subsequent attempts to access the rows in question result in:
              java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction
              4.33.52658
              Has anybody else seen anything like this?
              

              Rao,
              The BEA patch is CR095835_610SP4. Apparently there is a corresponding patch for
              SP3 as well. When configuring the jdbc connection pool set XaSetTransactionTimeout
              = true and
              XaTransactionTimeout = yourTimeoutValueInSeconds. This will instruct the Transaction
              manager to set the timeout value on Oracle's XAResource during the two-phase commit
              process. I believe Oracle refers to the timeout value as SesTm.
              Cheers,
              Tony
              "Rao Boppana" <[email protected]> wrote:
              >
              >We are currently facing the same problem. Could you let us know more
              >details about
              >the patch BEA put out to fix this? Is there a patch #/bug #? We are currently
              >running SP4, Oracle 9.2.3 using 9.2.0.1 drivers. We really cannot set
              >our JTA
              >timeout to less than 1 minute and hence we are left with option2. Any
              >help would
              >be greatly appreciated.
              >
              >
              >"Tony Necakov" <[email protected]> wrote:
              >>
              >>Jane,
              >>Thanks for the reply. After talking to Oracle support, we believe we've
              >>discovered
              >>the cause of the problem. Apparently, setting the JTA transaction timeout
              >>does
              >>not affect the default timeout from Oracle's point of view. Consequently,
              >> XA
              >>transactions exceeding 1 minute (Oracle's default) were being marked
              >>by Oracle
              >>as in-doubt. Subsequent commits or rollback from the transaction manager
              >>were
              >>being ignored. The solution is to either knock the JTA timeout value
              >>to something
              >>below Oracle's default or install a BEA patch which allows the transaction
              >>manager
              >>to set the timeout on the Oracle resource manager.
              >>
              >>"Jane Sampson" <[email protected]> wrote:
              >>>Hi Tony,
              >>>
              >>>Yes, I believe there were some problems with 8.1.7. I believe it requires
              >>>an Oracle patch AND a JDriver patch (if you are using the WebLogic
              >JDriver).
              >>>Open a case with support for details.
              >>>
              >>>Thanks,
              >>>
              >>>Jane
              >>>BEA Support
              >>>
              >>>
              >>>"Tony Necakov" <[email protected]> wrote in message
              >>>news:[email protected]...
              >>>>
              >>>> We're seeing the same intermittent problem with Oracle 8.1.7.2 and
              >>>8.1.7.4. The
              >>>> problem occurs with WLS 6.1 service pack 3 and service pack 4.
              >>>>
              >>>> "Jane Sampson" <[email protected]> wrote:
              >>>> >Hi Tim,
              >>>> >
              >>>> >There is an issue has been reported for Oracle 9.2.0.1 Database/Oracle
              >>>> >9.2.0.1 Thin Driver and exhibits this behavior and is being address
              >>>by
              >>>> >both
              >>>> >BEA and Oracle. I would suggest you open a case with Customer Support
              >>>> >and
              >>>> >mention CR090816. It could be the same problem.
              >>>> >
              >>>> >Thanks,
              >>>> >
              >>>> >Jane
              >>>> >BEA Support
              >>>> >
              >>>> >"Tim Dawson" <[email protected]> wrote in message
              >>>> >news:[email protected]...
              >>>> >>
              >>>> >> I'm having an intermittent problem in our server where a distributed
              >>>> >transaction
              >>>> >> between WebLogic JMS (6.1 sp3) and Oracle (using the 9.1.2 XA
              >driver)
              >>>> >doesn't
              >>>> >> complete and subsequent attempts to access the rows in question
              >>>result
              >>>> >in:
              >>>> >>
              >>>> >> java.sql.SQLException: ORA-01591: lock held by in-doubt distributed
              >>>> >transaction
              >>>> >> 4.33.52658
              >>>> >>
              >>>> >> Has anybody else seen anything like this?
              >>>> >
              >>>> >
              >>>>
              >>>
              >>>
              >>
              >
              

  • "in-doubt distributed transaction" (WLS 8.1 SP2/Oracle 9.2.0.4)

              I've developed an MDB that reads a message from a queue, performs database updates
              against up to 2 databases, and sends an outgoing JMS message when all is complete.
              The MDB uses container-managed transactions to ensure that all DB updates and
              JMS messages are committed or rolled back together. I have had a lot of problems
              related to transactions failing, becoming "in-doubt" in the database and locking
              database resources indefinitely.
              My environment is configured as follows:
              WebLogic 8.1.2 Server
              Oracle 9.2.0.4 database with RAC
              XA Connection Pool with WebLogic Type 2 Oracle Driver OR Oracle 9.2.0.4
              OCI Driver
              I have read the BEA/HP white paper regarding Weblogic 8.1 with Oracle 9i RAC (http://dev2dev.bea.com/products/wlserver81/whitepapers/wls_bea_hp.jsp)
              and have tried all of the solutions suggested in that paper. The only solution
              that worked consistently without causing the in-doubt transactions was to change
              my connection pools to point directly to a single node of the RAC cluster, not
              to the shared instance. However, even with this configuration, I have seen these
              errors occur when certain database failures occur.
              A side-effect of this problem is that the associated WebLogic connection pools
              begin to "forget" connections. The pool thinks that all of the connections are
              in use (even though I am always calling Statement.close() and Connection.close()),
              and the connection pool cannot be reset manually. The only way to clear the connection
              pool is to bounce WebLogic.
              The only posts I have found related to this error were regarding Oracle 8.1.7
              and WebLogic 6.1. Any help would be greatly appreciated.
              Exceptions:
              <Mar 23, 2004 2:59:36 PM EST> <Error> <EJB> <BEA-010026> <Exception occurred during
              commit of transaction Xid=BEA1-0526A28664707F28EDB9(6412513),Status=Rolled back.
              [Reason=javax.transaction.xa.XAException
              : prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID
              is not valid],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds
              left=60,XAServerResourceInfo[JMS_my
              JmsStore]=(ServerResourceInfo[JMS_myJmsStore]=(state=rolledback,assigned=myserver),xar=JMS_myJmsStore),XAServerResourceInfo[ProfilingPool]=(ServerResourceInfo[ProfilingPool]=(state=rolledback,ass
              igned=myserver),xar=ProfilingPool),SCInfo[mydomain+myserver]=(state=rolledback),local
              properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+10.41.0.61:7001+m
              ydomain+t3+, XAResources={JMS_myJmsStore, JMS_FileStore, ProfilingPool, SearchManagementPool,
              AnnouncementsTxPool},NonXAResources={})],CoordinatorURL=myserver+10.41.0.61:7001+mydomain+t3+):
              javax.tran
              saction.xa.XAException: prepare failed for XAResource 'ProfilingPool' with error
              XAER_NOTA : The XID is not valid
              at weblogic.jdbc.oci.xa.XA.createException(XA.java:386)
              at weblogic.jdbc.oci.xa.XADataSource.internalPrepare(XADataSource.java:905)
              at weblogic.jdbc.oci.xa.XADataSource.prepare(XADataSource.java:885)
              at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:846)
              at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1167)
              at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:401)
              at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              --------------- nested within: ------------------
              weblogic.transaction.RollbackException: Could not prepare resource 'ProfilingPool
              prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID is
              not valid - with nested exception:
              [javax.transaction.xa.XAException: prepare failed for XAResource 'ProfilingPool'
              with error XAER_NOTA : The XID is not valid]
              at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
              at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
              at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              2004-03-23 15:00:45,406 ERROR IS003989 [ExecuteThread: '17' for queue: 'ProfileCompleteListenerBean.ExecuteQueue']
              my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:350
              ) - Failed to update profiling status for holding 10014 [] (-2)
              java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for
              lock
              at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              at weblogic.jdbc.oci.PreparedStatement.executeUpdate(PreparedStatement.java:226)
              at weblogic.jdbc.oci.xa.PreparedStatement.executeUpdate(PreparedStatement.java:81)
              at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:94)
              at my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:345)
              at my.package.search.business.ProfilingManager.disseminateAndAcknowledge(ProfilingManager.java:254)
              at my.package.search.business.ProfileCompleteListenerBean.onMessage(ProfileCompleteListenerBean.java:128)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              2004-03-23 15:01:43,093 ERROR IS003989 [ExecuteThread: '18' for queue: 'HoldingStatusListenerBean.ExecuteQueue']
              my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:265)
              - Failed to retrieve profiling results for holding 10060 [] (-2)
              java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction
              189.47.12
              at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              at weblogic.jdbc.oci.PreparedStatement.executeQuery(PreparedStatement.java:152)
              at weblogic.jdbc.oci.xa.PreparedStatement.executeQuery(PreparedStatement.java:48)
              at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80)
              at my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:256)
              at my.package.search.business.ProfiledHoldingDAO.storeHoldingMetadata(ProfiledHoldingDAO.java:489)
              at my.package.search.business.ProfiledHoldingDAO.storeNewHolding(ProfiledHoldingDAO.java:406)
              at my.package.search.business.ProfilingManager.profileHolding(ProfilingManager.java:128)
              at my.package.search.business.HoldingStatusListenerBean.onMessage(HoldingStatusListenerBean.java:121)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              

    Hi. There is a serious bug in the Oracle DBMS (all versions) where in-doubt
              transactions have their data locked in the DBMS by page rather than by row,
              so it will indefinitely prevent access to all data on the page, including
              logically uninvolved data. Oracle understands the problem but currently
              says they will never fix it (it would take too much work). They offer the
              alternative that you configure your table data to ensure that no more than
              one datarow resides on a page.
              Joe
              Matt Smith wrote:
              > I've developed an MDB that reads a message from a queue, performs database updates
              > against up to 2 databases, and sends an outgoing JMS message when all is complete.
              > The MDB uses container-managed transactions to ensure that all DB updates and
              > JMS messages are committed or rolled back together. I have had a lot of problems
              > related to transactions failing, becoming "in-doubt" in the database and locking
              > database resources indefinitely.
              >
              > My environment is configured as follows:
              > WebLogic 8.1.2 Server
              > Oracle 9.2.0.4 database with RAC
              > XA Connection Pool with WebLogic Type 2 Oracle Driver OR Oracle 9.2.0.4
              > OCI Driver
              >
              > I have read the BEA/HP white paper regarding Weblogic 8.1 with Oracle 9i RAC (http://dev2dev.bea.com/products/wlserver81/whitepapers/wls_bea_hp.jsp)
              > and have tried all of the solutions suggested in that paper. The only solution
              > that worked consistently without causing the in-doubt transactions was to change
              > my connection pools to point directly to a single node of the RAC cluster, not
              > to the shared instance. However, even with this configuration, I have seen these
              > errors occur when certain database failures occur.
              >
              > A side-effect of this problem is that the associated WebLogic connection pools
              > begin to "forget" connections. The pool thinks that all of the connections are
              > in use (even though I am always calling Statement.close() and Connection.close()),
              > and the connection pool cannot be reset manually. The only way to clear the connection
              > pool is to bounce WebLogic.
              >
              > The only posts I have found related to this error were regarding Oracle 8.1.7
              > and WebLogic 6.1. Any help would be greatly appreciated.
              >
              > Exceptions:
              > -----------------
              > <Mar 23, 2004 2:59:36 PM EST> <Error> <EJB> <BEA-010026> <Exception occurred during
              > commit of transaction Xid=BEA1-0526A28664707F28EDB9(6412513),Status=Rolled back.
              > [Reason=javax.transaction.xa.XAException
              > : prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID
              > is not valid],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds
              > left=60,XAServerResourceInfo[JMS_my
              > JmsStore]=(ServerResourceInfo[JMS_myJmsStore]=(state=rolledback,assigned=myserver),xar=JMS_myJmsStore),XAServerResourceInfo[ProfilingPool]=(ServerResourceInfo[ProfilingPool]=(state=rolledback,ass
              > igned=myserver),xar=ProfilingPool),SCInfo[mydomain+myserver]=(state=rolledback),local
              > properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+10.41.0.61:7001+m
              > ydomain+t3+, XAResources={JMS_myJmsStore, JMS_FileStore, ProfilingPool, SearchManagementPool,
              > AnnouncementsTxPool},NonXAResources={})],CoordinatorURL=myserver+10.41.0.61:7001+mydomain+t3+):
              > javax.tran
              > saction.xa.XAException: prepare failed for XAResource 'ProfilingPool' with error
              > XAER_NOTA : The XID is not valid
              > at weblogic.jdbc.oci.xa.XA.createException(XA.java:386)
              > at weblogic.jdbc.oci.xa.XADataSource.internalPrepare(XADataSource.java:905)
              > at weblogic.jdbc.oci.xa.XADataSource.prepare(XADataSource.java:885)
              > at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:846)
              > at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1167)
              > at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:401)
              > at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              > --------------- nested within: ------------------
              > weblogic.transaction.RollbackException: Could not prepare resource 'ProfilingPool
              > prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID is
              > not valid - with nested exception:
              > [javax.transaction.xa.XAException: prepare failed for XAResource 'ProfilingPool'
              > with error XAER_NOTA : The XID is not valid]
              > at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
              > at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
              > at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              > ...
              > 2004-03-23 15:00:45,406 ERROR IS003989 [ExecuteThread: '17' for queue: 'ProfileCompleteListenerBean.ExecuteQueue']
              > my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:350
              > ) - Failed to update profiling status for holding 10014 [] (-2)
              > java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for
              > lock
              > at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              > at weblogic.jdbc.oci.PreparedStatement.executeUpdate(PreparedStatement.java:226)
              > at weblogic.jdbc.oci.xa.PreparedStatement.executeUpdate(PreparedStatement.java:81)
              > at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:94)
              > at my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:345)
              > at my.package.search.business.ProfilingManager.disseminateAndAcknowledge(ProfilingManager.java:254)
              > at my.package.search.business.ProfileCompleteListenerBean.onMessage(ProfileCompleteListenerBean.java:128)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              > ...
              > 2004-03-23 15:01:43,093 ERROR IS003989 [ExecuteThread: '18' for queue: 'HoldingStatusListenerBean.ExecuteQueue']
              > my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:265)
              > - Failed to retrieve profiling results for holding 10060 [] (-2)
              > java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction
              > 189.47.12
              > at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              > at weblogic.jdbc.oci.PreparedStatement.executeQuery(PreparedStatement.java:152)
              > at weblogic.jdbc.oci.xa.PreparedStatement.executeQuery(PreparedStatement.java:48)
              > at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80)
              > at my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:256)
              > at my.package.search.business.ProfiledHoldingDAO.storeHoldingMetadata(ProfiledHoldingDAO.java:489)
              > at my.package.search.business.ProfiledHoldingDAO.storeNewHolding(ProfiledHoldingDAO.java:406)
              > at my.package.search.business.ProfilingManager.profileHolding(ProfilingManager.java:128)
              > at my.package.search.business.HoldingStatusListenerBean.onMessage(HoldingStatusListenerBean.java:121)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              >
              

  • SSO Doubts !! Help required

    Hello everybody,
    I have few doubts implementing SSO with EP. Let me first briefly explain our design approach.
    We have 5 SAP boxes (R/3, APO, BW, Portal, K-pro) in our landscape and we want to have the functionality of SSO via EP and Active directory to access them.
    I guess i have read all blogs on SDN and lot of SAP documentation for it and below is high level design based upon my understanding.
    1. For internal users(employee) create there user ID in SAP-HR and push it into Active directory using LDAP connector.
    2. Portal and Basis admin to setup the security for these users so that the user can access only those boxes and transaction which they are suppose to access.
    3. User will login into EP and it will authenticate it against Active directory and issue login ticket.(if successful).
    4. This ticket will be used to access other SAP boxes.
    Now below are my doubts:
    1. At what level i will control access of various SAP boxes (APO, BW, R/3, Kpro) for a user ID. Can i control it at Enterprise Portal User management or should i do it in Acive directory. eg: a given user should have access only to portal and R/3 boxes and not to other SAP boxes.
    2. How to handle external users (Customers and vendors) in this architecture, should i create a user id for them in each SAP box to handle security or is there a work around.
    For employee's i am creating HR master in SAP and then planning to use LDAP and use infotype PA0105 for linking employee master with User ID. And then use this user ID to control security/authorization in various systems.
    Though not sure about external users.
    3. Should i allow External users and Internal users to share same Network domain, i mean what is the best practice.
    4, How does companies having multiple SAP boxes achieve SSO, is my appraoch correct or is there a batter or easier way.
    Thanks in advance.
    Regards,
    Jeet

    Please don't take any of this as a recommendation. I don't know enough about your environment for that. But I can give you some options to consider:
    Question#1) There are lots of options there: administer the roles in the portal and push them out, or administer in the backends and pull them intot the portal. Also, have you considered using Central User Administration to administer the authorizations in the various SAP systems. You can also use the CUA server as an authentication source in EP6.
    #2) To avoid creating userIDs in each system, you could write a trusted portal application that makes RFC connections to the various systems. It would have the authorization to look at any external users data, but would only do so for the session's authenticated userID.
    #3) External users can access the internal network as long as you have ensured that you are not open to attack from the internet (e.g., without a good firewall a distributed denial of service attack could overload the internal network).
    #4) At a minimum you will probably want a central authentication source (whether LDAP or CUA) and use SAP logon tickets from there. Whether you centralize authorization administration is a separate question, and you may do one without the other. Maybe break it into stages?
    Regards,
    Sean

  • Oracle BPM Issue - By lock held by indoubt transaction

    Hi ,
    I am getting the below issue while processing the work items(Applications) in the Oracle BPM. I am using Oracle BPM 10g R3 (10.3.1.0.0  Build# 100812) in Linux Environment.
    An unexpected error occured while trying to execute an automatic task,pending automatic tasks will continue to be executed. Details:\n"An error occured while accessing the database. Detail: SQL statement: 'SELECT DUETIME, ID, PROCESSID,INSTDID, THREADID, ANCESTORTHREADID, TSTAMP, TYPE, ACTIVITYNAME,ORIGINPROCESSDN, REAL THREADID, NETYPE, PRIORITY, LATER, DATA FROM PTODOITEMS WHERE DUETIME=2011-12-22 11:23:53.0 AND PROCESSID=31 AND ID=94370151 FOR UPDATE' Caused by :[BEA][Oracle JDBC Driver][Oracle]ORA-01591: lock held by in doubt distributed transaction 9.30.1176766 fuego.transaction.DatabaseException; An error occured while accessing the database. Detail:SQL statment: 'SELECT DUETIME, ID, PROCESSID,INSTDID, THREADID, ANCESTORTHREADID, TSTAMP, TYPE, ACTIVITYNAME,ORIGINPROCESSDN, REAL THREADID, NETYPE, PRIORITY, LATER, DATA FROM PTODOITEMS WHERE DUETIME=2011-12-22 11:23:53.0 AND PROCESSID=31 AND ID=94370151 FOR UPDATE' at
    If I force COMMIT the Transaction 9.30.1176766 in the dba_2pc_pending, pending_trans$, pending_sessions$ tables, I am able to move forward.
    Please help me to resolve this issue.
    Thanks In Advance.
    Bhaskara

    Hi ,
    I am getting the below issue while processing the work items(Applications) in the Oracle BPM. I am using Oracle BPM 10g R3 (10.3.1.0.0  Build# 100812) in Linux Environment.
    An unexpected error occured while trying to execute an automatic task,pending automatic tasks will continue to be executed. Details:\n"An error occured while accessing the database. Detail: SQL statement: 'SELECT DUETIME, ID, PROCESSID,INSTDID, THREADID, ANCESTORTHREADID, TSTAMP, TYPE, ACTIVITYNAME,ORIGINPROCESSDN, REAL THREADID, NETYPE, PRIORITY, LATER, DATA FROM PTODOITEMS WHERE DUETIME=2011-12-22 11:23:53.0 AND PROCESSID=31 AND ID=94370151 FOR UPDATE' Caused by :[BEA][Oracle JDBC Driver][Oracle]ORA-01591: lock held by in doubt distributed transaction 9.30.1176766 fuego.transaction.DatabaseException; An error occured while accessing the database. Detail:SQL statment: 'SELECT DUETIME, ID, PROCESSID,INSTDID, THREADID, ANCESTORTHREADID, TSTAMP, TYPE, ACTIVITYNAME,ORIGINPROCESSDN, REAL THREADID, NETYPE, PRIORITY, LATER, DATA FROM PTODOITEMS WHERE DUETIME=2011-12-22 11:23:53.0 AND PROCESSID=31 AND ID=94370151 FOR UPDATE' at
    If I force COMMIT the Transaction 9.30.1176766 in the dba_2pc_pending, pending_trans$, pending_sessions$ tables, I am able to move forward.
    Please help me to resolve this issue.
    Thanks In Advance.
    Bhaskara

Maybe you are looking for

  • Report of Document Types/ Activity

    Hello SAP Guru's Is there a way I can view all the document types currently opened or cleared for my customers?  I am looking for something to give me that plus the ability to drill down by document number to view activity. Thanks! POINTS AWARDED

  • Advanced Action works 2 times and stops working

    Hi Everyone, I'm creating a Captivate 4 (4.0.1 Build 1658) presentation of a simple LAN setup with 2 hosts.  I have a caption showing setup parameters for the hosts (IP and Hostname) and a dropdown box allowing for selection of which host to configur

  • Message History,Multiple Devices and Hacking

    I have a skype account in which I sign in only from my laptop and not any other device. I have selected not to keep history. I have noticed that the following thing has happened two or three times over the past month: Previous messages randomly poppe

  • Get the File Name received from FTP Adapter

    Hi, How to get the File name reived through the FTP Adpater. I have created a variable with the Message type from ftpAdapterinboundheader.wsdl. from there I mapped the filename attribute to a local string variable. But I did not receive the file name

  • Need to download a youtube video. What's the best way?

    Hi. I need to download a youtube video. I need a safe program, preferably free. Don't want one that adds a bunch of junk to my computer. What do you recommend?