Link to home
Create AccountLog in
Avatar of asim252
asim252Flag for United Kingdom of Great Britain and Northern Ireland

asked on

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

We have a tuxedo based application that from time to time thows error saying:

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

And after the error database refuses any inserts and updates till the in-doubt transaction is manually FORCE committed or rolled back.

Is there any way that, from Orcale, we can get the applications/components which is source of the error?

Thanks
Avatar of jaiminpsoni
jaiminpsoni
Flag of India image

ORA-01591: lock held by in-doubt distributed transaction <Transaction ID>

Connect to DB as sysdba (sys)


SELECT * FROM pending_sessions$ WHERE LOCAL_TRAN_ID = '<Transaction ID>'

GRAB THE SESSION ID....

SELECT * FROM V$SESSION WHERE SID='<SESSION_ID>'

From your question, it seems the session information will help you find out what you need.

Let me know if this helps.

View, Pending_Trans$ may also help here.

Thanks,
Jaimin Soni
SOLUTION
Avatar of jaiminpsoni
jaiminpsoni
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Does this help? Can you please let me know.
Avatar of asim252

ASKER

I have gone through the oracle article you sent it was related to what I was looking for an I have one small question,

How can I add the transaction comments? If you see that the article mentions:
CONNECT SYS@warehouse.acme.com AS SYSDBA
SELECT * FROM DBA_2PC_PENDING WHERE LOCAL_TRAN_ID = '1.21.17';
The database returns the following information:

Column Name            Value
---------------------- --------------------------------------
LOCAL_TRAN_ID          1.21.17
GLOBAL_TRAN_ID         SALES.ACME.COM.55d1c563.1.93.29
STATE                  prepared
MIXED                  no
ADVICE
TRAN_COMMENT           Sales/New Order/Trans_type 10B
FAIL_TIME              31-MAY-91
FORCE_TIME
RETRY_TIME             31-MAY-91
OS_USER                SWILLIAMS
OS_TERMINAL            TWA139:
HOST                   system1
DB_USER                SWILLIAMS
COMMIT#

In which part of application code can I set the comments?

Thanks
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of asim252

ASKER

Thanks this was what I was looking for.