Home » SQL & PL/SQL » Client Tools » Commit after each DML
Commit after each DML [message #281986] Tue, 20 November 2007 04:52 Go to next message
veerendranayak
Messages: 5
Registered: November 2007
Location: Pune
Junior Member

Hi Friends,

I would like to commit in my oracle session automatically after each inserts.

I cannot use Autocommit feature in SQLPLUS as it will become editor specific.

Also Can we parametrized such that we can control the commit interval. For example after 10 or 100 inserts automatically commit the data

Thanx in advance
Re: Commit after each DML [message #281991 is a reply to message #281986] Tue, 20 November 2007 05:32 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Transaction (and so commit and rollback) is an application notion: only the application knows when to commit or not.
So this feature can only be configured in the application.

Almost each language allows to configure this.

I strongly discourage to use an autocommit.
I don't see any application for which a statement is a transaction.

Regards
Michel
Re: Commit after each DML [message #286595 is a reply to message #281986] Sat, 08 December 2007 14:13 Go to previous messageGo to next message
mchadder
Messages: 224
Registered: May 2005
Location: UK
Senior Member
Michel: I can tell you an application for statement = transaction.... DB's where writers block readers.... Wink
Re: Commit after each DML [message #286596 is a reply to message #281986] Sat, 08 December 2007 14:15 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
>Michel: I can tell you an application for statement = transaction.... DB's where writers block readers....
What does your statement have to do about/with Oracle; where that does not occur?
Re: Commit after each DML [message #286597 is a reply to message #286596] Sat, 08 December 2007 14:19 Go to previous messageGo to next message
mchadder
Messages: 224
Registered: May 2005
Location: UK
Senior Member
anacedent : I take it you didn't appreciate the irony of my statement, nor did you see the smiley after the comment... oh well..
Re: Commit after each DML [message #286598 is a reply to message #286595] Sat, 08 December 2007 14:20 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This OraFAQ = Oracle FAQ's, not Sybase or MS/SQL Server forum.
Writers do not block readers.
Readers do not block writers.

By the way, if you have a DB that forces you to break the application transaction notion, run away.

Regards
Michel
Re: Commit after each DML [message #286599 is a reply to message #281986] Sat, 08 December 2007 14:23 Go to previous message
mchadder
Messages: 224
Registered: May 2005
Location: UK
Senior Member
Listen guys... the smiley should have given it away... I actually was trying to be funny (obviously, unsuccessfully). I am well aware (having been in Oracle for over 10 years) that writers do not block readers etc. etc.

Next time, looks like i'll have to spell out any sarcasm in larger text... Wink
Previous Topic: character sets
Next Topic: Inserts Chinese Characters using INSERT INTO doesn't work
Goto Forum:
  


Current Time: Sat Dec 03 08:00:14 CST 2016

Total time taken to generate the page: 0.15930 seconds