Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: When using with DBLink: ORA-01453: SET TRANSACTION must be first statement of transaction

Re: When using with DBLink: ORA-01453: SET TRANSACTION must be first statement of transaction

From: Maxim <mdemenko_at_gmail.com>
Date: 13 May 2005 10:34:31 -0700
Message-ID: <1116005671.157221.255550@g47g2000cwa.googlegroups.com>


>From the Note

http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1070310.6

/////////////////////////////////////////////
Solution Description:

A remote select (a select using a database link) must be followed by a commit.
Then the set transaction command will succeed.

Explanation:


This is expected behavior. A select or any other operation which uses a
database link is considered the beginning of a distributed transaction.

Even though there are no inserts, updates, or deletes, a select across a
database link is considered the beginning of a distributed transaction, and
therefore must be committed before a new transaction can begin.

//////////////////////////////////////////

Also, if you put the "commit;" on the line before "set transaction" , you eliminate the error.

Best regards

Maxim Received on Fri May 13 2005 - 12:34:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US