Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: When using with DBLink: ORA-01453: SET TRANSACTION must be first statement of transaction
>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