Re: AutoCommit - Oracle.

From: Eric (Eric_at_nospam.com)
Date: 02/15/05


Date: Mon, 14 Feb 2005 23:40:51 -0500

Jim Heavey wrote:
> I guess I always thought the Oracle stored procedures should be self
> contained for anyone who wanted to use them...so if I was using Toad on SQL+
> and invoked the stored procedures, the user would not have to worry about
> having to have to commit the transaction.

This is incorrect. Oracle never autocommits. TOAD has a configuation
setting to indicate if you want it to commit when you exit, but there is
no autocommit in TOAD until you exit.

I never knew Sqlplus to autocommit, but I haven't used it in a few years
so I can't comment on it.

SQL Server has always had a database option for this because it came
from Sybase.

Unlike SQL Server, Oracle is always in a transaction...COMMIT or
ROLLBACK ends the current tranaction and starts the next one.

When it comes to SPs, you should have 2 types of SPs: those with an
external interface can be used to control transactions, but those that
are only internal should not be used to control transactions.

If you use ADO.NET you have to pay close attention to who controls each
transaction.

It's critically important if you have linked DBs and distributed
transactions (updates accross DB boundaries).

Eric



Relevant Pages

  • Re: Is Interbase still thriving?
    ... when faced with MSSQL and wether to adapt ... In Oracle/IB/Progress you have much less contention problems derived ... Oracle DB. ... It´s very important that you design your transactions to ...
    (borland.public.delphi.non-technical)
  • Re: What is Oracles version of MS SQL Profiler
    ... Tracking code path of a stored procedure (find out what is being ... I'm new to Oracle coming in from Sql Server. ... what I use to debug stored procedures and track performance. ...
    (comp.databases.oracle.server)
  • Re: Passing Back Table Information from Oracle .NET Stored Procedures
    ... Its an abstract way to talk to databases, and there is an Oracle concrete ... > I am working with Oracle .NET Stored Procedures. ... The Oracle namespace has a datareader just like the MS SQL Server namespace has a datareader. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: how to code to avoid SQL insertion attacks
    ... > However i see only 1 reasonable reply, and that is to use stored procedures, ... He only mentioned Oracle after I queried him about it. ... In SQL, ... that is also an egregious programmer error which just as well could ...
    (comp.lang.java.programmer)
  • Re: HELP!!! - STORED PROCEDURE TRANSACTIONS
    ... My issue is related to Transactions. ... > Lets say that I have two stored procedures without ... > these child stored procedures. ... > in less than two minutes, why would the outer TRXN ...
    (microsoft.public.sqlserver.programming)

Loading