Solved

Implicit Transactions

Posted on 2010-08-14
3
776 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

937 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now