HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Auto-Commit in SQL Server and Oracle

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
commitserverautosqlandoracle

Problem

When I worked on Oracle 8 many years before, I used to execute COMMIT command manually after each bulk INSERT. In SQL Server, Auto-Commit is ON by default which has advantages as well as hazards.

I want to know whether the newer versions of Oracle still has Auto-Commit OFF by default? I also want to know how to put OFF Auto-Commit in SQL Server 2005.

Solution

Oracle

From AskTom in 2000:


...the only method Oracle operates in is "client tells us when to commit". We do not have an autocommit mode. Various TOOLS and API's do (eg: I can tell sqlplus to autocommit, that just means sqlplus will issue a commit after each statement).

This is still true and probably always will be. For a detailed description of commit see the Oracle docs

SQL Server 2000+

from SO (inverted):


You can turn autocommit OFF by setting implicit_transactions ON

or if you prefer, from the docs (or Mark's more direct link)

Context

StackExchange Database Administrators Q#7087, answer score: 7

Revisions (0)

No revisions yet.