Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA-00164 during PL/SQL execution

Status
Not open for further replies.

slicendice

Programmer
Jun 28, 2002
164
GB
Hi
I am running a PL/SQL package that uses a database link to obtain data from a table in another database for processing. The code also has a procedure for logging messages/errors/etc to a log table that uses the PRAGMA AUTONOMOUS TRANSACTION directive - this enables messages that are written to the log table to be made permanent whilst still allowing a ROLLBACK by the calling proc if there is an error.
When I run the code, I get the error:

ORA-00164: autonomous transaction disallowed within distributed transaction

I understand from searching the web that this is a problem on Oracle 8.1.7 (which is what I'm using) when using autonomous transactions at the same time as using database links. What I've not been able to find is if there are any workarounds/fixes for this problem - does anyone know of any?

Failing that, is there an alternative way of writing msgs/errors to a log table without using AUTONOMOUS TRANSACTION?

Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top