Answers

Question and Answer:

  Home  Oracle Database

⟩ What Happens to the Current Transaction If the Session Is Killed?

If a session is killed by the DBA, the current transaction in that session will be rolled back and ended. All the database changes made in the current transaction will be removed. This is called an implicit rollback when session is killed. The following tutorial exercise shows you that the DBA KILL SESSION command forces the current transaction to be rolled back with all the changes uncommitted.

SQL> connect HR/globalguideline

SQL> SELECT * FROM ggl_links;

  ID URL   NOTES  COUNTS CREATED

------- ---------------- ---------- ---------- ---------

101 globalguideline.COM 07-MAY-06

110 globalguideline.COM 07-MAY-06

112 oracle.com 07-MAY-06

113 sql.com 07-MAY-06

SQL> DELETE FROM ggl_links where id = 112;

1 row deleted.

SQL> DELETE FROM ggl_links where id = 113;

1 row deleted.

SQL> SELECT * FROM ggl_links;

  ID URL   NOTES  COUNTS CREATED

------- ---------------- ---------- ---------- ---------

101 globalguideline.COM 07-MAY-06

110 globalguideline.COM 07-MAY-06

 163 views

More Questions for you: