View previous topic :: View next topic
|
Author |
Message |
mf_karthik
New User
Joined: 26 Jul 2005 Posts: 55
|
|
|
|
hi
explain me about rollback and commit?
where we see the rollback and commit?
which is lowest locking mode? |
|
Back to top |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
Hi mf_karthik,
A commit occurs automatically at the end of the program, or by request one or more times during the execution of the program. Releases all locks acquired by the program since the last commit, so that other programs and users may obtain access to the data. Any open cursors are automatically closed. All database changes are made permanent.If any changes made to the tables are not appropriate, then all the changes must by rolled back resulting in the same state of data as they were prior to making changes. Release all locks acquired by the program.
Hope this helps. |
|
Back to top |
|
|
mf_karthik
New User
Joined: 26 Jul 2005 Posts: 55
|
|
|
|
thnks for your answers
explain me where we will see that? |
|
Back to top |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
Back to top |
|
|
Jag
New User
Joined: 07 Dec 2005 Posts: 30 Location: India
|
|
|
|
HI,
After every logical unit of work the changes will be commited...If you want to commit in middile you will be giving explict...Commit or rollback...
we can see that in between the program
Exec Sql
Commit
End-Exec..
Or rollback
Exec Sql
Rollback
End-Exec..
This way we will be issueing the command inbetween the program when we like to commit or rollback ...
Cheers,
Jag. |
|
Back to top |
|
|
Guest
|
|
|
|
hi,
rollback: if u happend to update a table and u thought the information is wrong.then you can roolback(this option will uncommit all your information entered)
commit:if u commit a table all the updations u made will become perminant means they reamin unchanged, and u will get a sink opint.
but the data definition curious automaticlly comments.
Cheers,
TVM Kishore |
|
Back to top |
|
|
senthilssg
New User
Joined: 09 Dec 2005 Posts: 64 Location: USA
|
|
|
|
Hi,
i want to add a one more point regarding this ,
Auto comit will occur for every statements which are all executed in SPUFI.
Regards,
senthil |
|
Back to top |
|
|
Jag
New User
Joined: 07 Dec 2005 Posts: 30 Location: India
|
|
|
|
Hi,
Every query executed will not get commited in SPUFI unless you specfity default as COMMIT while entering the SPUFI..So you have a choice either to commit automatically or rollback automatically...If you specify rollback automatically then you have give explict commit in spufi to reflect the changes in the database.
Cheers,
Jag |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Okay,
To summarize,
Commit and Rollback are transsaction control commands ( as described by CODD).
These commands are issued automatically / explicitely by application programs or users.
Commit Saves the changes
Rollback : Undo the changes till last commit ( explicit or implecit).
Almost every application programming interface provides the ways to issue these statements explicitely in the program.
More information on this can be found on any database manuals. All most all RDBMS should have a provision for this. ( DB2 has)
Thanks,
Parikshit |
|
Back to top |
|
|
speedcnu
New User
Joined: 27 Jan 2004 Posts: 6 Location: Hyderabad
|
|
|
|
Good Explanation on Commit and Rollback...Any one who have min knowledge on DB2 he/she can easily understand.
Thanks to All.. |
|
Back to top |
|
|
speedcnu
New User
Joined: 27 Jan 2004 Posts: 6 Location: Hyderabad
|
|
|
|
Good Explanation on Commit and Rollback...Any one who have min knowledge on DB2 he/she can easily understand.
Thanks to All.. |
|
Back to top |
|
|
feellikeneo
New User
Joined: 19 Mar 2007 Posts: 73 Location: Chennai
|
|
|
|
to add up one more,,,,
when a cursor declared with "WITH HOLD" option overrides the Commit command meaning the cursor will not be closed.
Cheers,
Neo |
|
Back to top |
|
|
|