Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question.

Asked: April 16, 2007 - 11:03 pm UTC

Last updated: January 30, 2013 - 1:08 pm UTC

Version: 9.2.0.7

Viewed 10K+ times! This question is

You Asked

Thanks for the chance to ask question.
This may sound too dumb to you...but it is from a dumb person :-)
Is there any way to issue a commit from another session to commit a different session?
I'd issued a delete statement which took about an hour to run. By the time it was done, I was home and logged in to another session. Now, can I do a commit on this previous session from where I deleted the records?

Thanks a lot for your time.



and Tom said...

no there isn't, thank goodness - imagine the havoc it would otherwise create.

I use software such as VNC http://realvnc.com/ to deal with issues like that - it lets me rejoin my desktop from anywhere.

Rating

  (7 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, April 17, 2007 - 4:27 pm UTC

I'd heard of it but wasnt sure how secure it is....but will try for sure...
I wonder...when I see that delete is all done, by looking at the sessions in TOAD and issue a kill session on it, after delete, will it commit since I have autocommit on? As kill session is going to log off that session.

Thanks much.

Tom Kyte
April 18, 2007 - 11:37 am UTC

if you kill it, it'll roll back

Alexander the ok, April 17, 2007 - 4:31 pm UTC

If Oracle does decide to do that, I know what they can call the parameter...

alter system set transaction_atomicity = false;

;)

What the!!!

Sejas, April 18, 2007 - 2:36 am UTC

More like alter system set DB_BLACKHOLE=TRUE you mean?

Neil Kodner, April 18, 2007 - 11:08 am UTC

Slightly related-I thought I remember reading about a built-in DBA command(or supplied pl/sql package) to rollback another session. I didn't save the info and I can't seem to find anything now. Am I out of my mind?
Tom Kyte
April 18, 2007 - 12:46 pm UTC

you can kill it, that'll roll it back

To Neil

Michel Cadot, April 18, 2007 - 12:09 pm UTC

This command is "kill". ;)

Regards
Michel

Implicit Commit

Sudheer, January 24, 2013 - 10:06 am UTC

Hi Tom,

Could you let me know what happens in the below scenario

1.Let's consider a session of USER_1 performing various updates to the data without committing it..
2.Now an other USER_2 with a different session performs an implicit commit(perform DDL statements such as create/alter),does the data being updated by USER_1 get committed?
3.And whether the updates being made through DDL can be viewed by USER_2?

Tom Kyte
January 30, 2013 - 1:06 pm UTC

No, a commit is for a specific transaction - your commit will never commit someone else's transaction.

so the DDL would not commit user_1's work.

Sudheer, January 24, 2013 - 10:10 am UTC

Hi Tom,

Please disregard the third question in the above scenario and consider the below question.

And whether the updates being made through DDL by USER_2 can be viewed by USER_1?




Tom Kyte
January 30, 2013 - 1:08 pm UTC

the work performed by a transaction become visible to everyone else in the database upon commit.

the work done by the DDL performed by user_2 will immediately be available to user_1 if user_1 chooses to see them (user_1 could be in a read only transaction, user_1 could be using flashback query, user_1 could be in a serializable transaction...)

user_1 would be able see the effects of the DDL right away, as soon as it committed.