Posts

Showing posts from March, 2022

ORA-02050: transaction rolled back, some remote DBs may be in-doubt

ORA-02050: transaction rolled back, some remote DBs may be in-doubt Indicates that a communication error occurred during the two-phase commit. The two phase-commit mechanism is used to ensure data integrity in a distributed transaction. Example of handling the In-Doubt Transactions - in this example we are taking two servers ACCT and FIN.   Got error ORA-02050: transaction rolled back, some remote DBs may be in-doubt at FIN Server Scenario- LOCAL_TRAN_ID and GLOBAL_TRAN_ID are same.   Execute below query in SYS user at FIN server. SQL> SELECT LOCAL_TRAN_ID , STATE FROM dba_2pc_pending ; LOCAL_TRAN_ID  GLOBAL_TRAN_ID         STATE -------------   --------------- ---------------- 3.12 .2 54         --------. 3.12 . 254    collecting   Here local id and Global id is same, so it is the global coordinator. State column is collecting means this ...

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

ORA-01591: lock held by in-doubt distributed transaction If we got ‘ORA-01591: lock held by in-doubt distributed transaction’ error, it means there are some uncommitted transactions in the database. We need to perform rollback or commit force for uncommitted transactions to solve this problem. “Trying to access resource that is locked by a dead two-phase commit transaction that is in prepared state”. The two phase-commit mechanism is used to ensure data integrity in a distributed transaction. Example of handling the In-Doubt Transactions - in this example we are taking two servers ACCT and FIN.   Got error ORA-1591 : lock held by in-doubt distributed transaction 3.1.855 at FIN Server   Scenario A: - LOCAL_TRAN_ID and GLOBAL_TRAN_ID are same.   Execute below query in SYS user at FIN server. SQL> SELECT LOCAL_TRAN_ID , STATE FROM dba_2pc_pending ; LOCAL_TRAN_ID  GLOBAL_TRAN_ID         STATE ---...

Distributed transaction, Oracle Distributed Transactions, distributed transaction in oracle

Distributed transaction, Oracle Distributed Transactions, distributed transaction in oracle A distributed transaction modifies data related to two or more databases, it contains DML statements than span many nodes. For a distributed transaction to be successful all or none of the database nodes involved in the transaction need to commit or rollback the whole transaction. Note the difference between a distributed and a remote transaction; a remote transaction contains one or more DML statements that are executed on the SAME remote node, consider the examples below:- Example of Distributed transaction: insert into table@remotesite; insert into mytable: --local table commit;   Example of Remote transaction: insert into table@remotesite; commit;   Database links are used to communicate between the databases performing distributed transactions. In a distributed environment, it is fundamental that the global name of a database is unique in the network so that eac...

Datapump Export (Expdp) Fails With ORA-31693, ORA-02354, ORA-31693: Table data object failed to load/unload

Datapump Export (Expdp) Fails With ORA-31693, ORA-02354, ORA-31693: Table data object failed to load/unload 'ORA-31693: Table data object "TEST"."TEST_INSERT1" failed to load/unload and is being skipped due to error:' error occurred in expdp log. The export backup are logical database backups that extract logical definitions and data from the database to a file. Export backups are cross-platform and can be easily moved from one operating system to the other. [oracle@testdb ~]$ more testdb-expdp.log | grep error . . exported "TEST"."STUDENT"                               15.50 KB      1388 rows ORA-31693: Table data object "TEST"."TEST_INSERT1" failed to load/unload and is being skipped due to error: ORA-02354: error in exporting/importing data . . exported "TEST"."TEACHER"                           ...

Remove ACL and privileges, Drop ACL in oracle

Image
  Remove ACL and privileges, Drop ACL in oracle See the Network and ACL assignments as below -                                    o    Unassign ACL           begin              dbms_network_acl_admin.unassign_acl(              acl   => 'utl_mail_test.xml',              host => '172.16.20.18',                lower_port   => 25,              upper_port   => NULL              );              commit;          end; ...