Home » SQL & PL/SQL » SQL & PL/SQL » Commit in autonomous transaction
Commit in autonomous transaction [message #194563] Fri, 22 September 2006 12:13 Go to next message
Messages: 85
Registered: March 2006
Hey folks!

When does COMMIT in autonomous transaction gets visible for the main transaction?
I read in manual: "as soon as changes are committed, they are visible to the main transaction."
How do i understand that 'as soon as'? I mean, does main transaction wait for autonomous to return and then it proceeds? Or does it spawn another process, and runs forward, and at some point autonomous transaction results become available for the main transaction?
Can I toggle between such behaviours? (I am runnging Oracle10)

Thanks for the answers.

[Updated on: Fri, 22 September 2006 12:15]

Report message to a moderator

Re: Commit in autonomous transaction [message #194565 is a reply to message #194563] Fri, 22 September 2006 12:18 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Control doesn't pass back to the calling code until the autonomous transaction code is complete. The autonomous transaction is not asynchronous. You can easily prove that by adding a sleep to the autonomous transaction (dbms_lock.sleep(10)) - you'll see the result in the calling code. To make code run asynchronously you'd need to use things like dbms_job, dbms_pipe etc.
Previous Topic: not able to view timestamp column in enterprise manager console
Next Topic: Joining 2 rows into 1
Goto Forum:

Current Time: Thu Aug 17 16:39:11 CDT 2017

Total time taken to generate the page: 0.11400 seconds