SQL tutorial | Interview questions | Oracle
Would you like to react to this message? Create an account in a few clicks or log in to continue.

What Happens to the Current Transaction If the Session Is Ended?

Go down

What Happens to the Current Transaction If the Session Is Ended? Empty What Happens to the Current Transaction If the Session Is Ended?

Post by Micheal Sun Jan 17, 2010 3:30 am

If a session is ended, the current transaction in that session will be committed and ended. All the
database changes made in the current transaction will become permanent. This is called an
implicit commit when session is ended. The following tutorial exercise shows you that the
"disconnect" command forces the current transaction to be committed and ended. When the
session is reconnected, you can see the changes made by the UPDATE statements.
SQL> connect HR/fyicenter
SQL> UPDATE fyi_links SET url = 'FYICENTER.COM' WHERE id = 101;
SQL> UPDATE fyi_links SET url = 'CENTERFYI.COM' WHERE id = 110;
SQL> disconnect
SQL> connect HR/fyicenter
SQL> SELECT * FROM fyi_links;
ID URL NOTES COUNTS CREATED
---------- ---------------- ---------------- ---------- ---------
101 FYICENTER.COM 07-MAY-06
110 CENTERFYI.COM 07-MAY-06
112 oracle.com 07-MAY-06
113 sql.com 07-MAY-06

Micheal
Admin

Posts : 243
Join date : 2010-01-10

http://sql-tutorial.co.cc

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum