Skip to content
July 6, 2012 / doganay

ORA-02046: distributed transaction already begun

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

We assume Autonomous Transaction used.

Problem:

ORA-02046: distributed transaction already begun
ORA-02063: preceding ...
ORA-06512: ...

Solution:

The query involved is not a normal query ,it is a distributed query over dblink and unlike a local query it needs to be terminated by a commit or rollback. When we use dblink inside a procedure, it will mark the transaction as open only and don’t close the dblink connection and it will result in ORA-02046. In procedure we have to commit the dblink transaction (even if it is a select statement), then only it will mark the transaction as close.

ORA-2046 Using Autonomous Transaction Over Db Link (Doc ID 2122921.1)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: