Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Implicit Transactions

Posted on 2010-08-14
3
779 Views
Last Modified: 2012-05-10
Hi experts, what is the appropriate setting to work with implicit transactions?
0
Comment
Question by:enrique_aeo
  • 2
3 Comments
 
LVL 3

Expert Comment

by:man2002ua
ID: 33435960
What do you mean by "appropriate settings"?
Just call "SET IMPLICIT_TRANSACTIONS ON"
and don't forget to commit your work. This mode is similar to Oracle default behaviour.
0
 

Author Comment

by:enrique_aeo
ID: 33435996
sorry, wrong question. scenarios in which I use
0
 
LVL 3

Accepted Solution

by:
man2002ua earned 250 total points
ID: 33436048
Understood, this mode is mostly used for Oracle developers, who switching to MSSQL.
In this mode any DDL, DML will start one transaction (untill next COMMIT). The default setting for MSSQL server - each DDL/DML use single transaction.
Exmaple:
-- default mode
delete from tableA;
go
delete from tableB;
go
-- all changes already in DB.
Here you dont need to commit, MSSQL did it for you.
but for:
set implicit_transaction on
go
delete from tableA;
go
delete from tableB;
go
-- at this point you can call rollback and rollback changed
-- or commit to save cahnges
commit
go
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question