Home » SQL & PL/SQL » SQL & PL/SQL » savepoint and commit
savepoint and commit [message #382102] Wed, 21 January 2009 00:05 Go to next message
sachinkkhot
Messages: 8
Registered: January 2009
Junior Member
i have query regarding savepoint, commit.
if i created 3 savepoints i.e. A, B and C.
can i 'commit' transaction in savepoint wise? if i commit B, then only B savepoint will commit.
please reply.
Re: savepoint and commit [message #382105 is a reply to message #382102] Wed, 21 January 2009 00:06 Go to previous messageGo to next message
BlackSwan
Messages: 25042
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
So we can help you & please be consistent & correct in your postings.

Post DDL for tables.
Post DML for test data.

Post expected/desired results.
Re: savepoint and commit [message #382114 is a reply to message #382102] Wed, 21 January 2009 00:35 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
sachinkkhot wrote on Wed, 21 January 2009 07:05
i have query regarding savepoint, commit.
if i created 3 savepoints i.e. A, B and C.
can i 'commit' transaction in savepoint wise? if i commit B, then only B savepoint will commit.
please reply.


No. Whereas you can rollback to a savepoint, you can only commit the complete transaction.
Re: savepoint and commit [message #382125 is a reply to message #382114] Wed, 21 January 2009 01:12 Go to previous messageGo to next message
sachinkkhot
Messages: 8
Registered: January 2009
Junior Member
thanks
Re: savepoint and commit [message #382188 is a reply to message #382102] Wed, 21 January 2009 04:52 Go to previous message
cookiemonster
Messages: 12409
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you need to commit some db changes without commiting everything else - i.e insertion into a log table - then you need to use a autonomous transaction.

Note - autonomous transactions should only be used for logging purposes, if you use them for anything else you're probably doing something wrong.
Previous Topic: Regular Expression
Next Topic: ORA-24761: transaction rolled back
Goto Forum:
  


Current Time: Wed Dec 07 03:14:25 CST 2016

Total time taken to generate the page: 0.11085 seconds