.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

transactions or not

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :

how do you know when there is a transaction?

will both of the following exec be a transaction at run time?

create dbo.procA


insert into dbo.myTable (column1) values (1)


exec procA


create dbo.procB


begin tran

insert into dbo.myTable (column1) values (1)



exec dbo.procB

-- IBM has jobs for USA employee to work oversea (India) and get their wages.

View Complete Post

More Related Resource Links

The Polyglot Programmer: ACID Transactions with STM.NET


STM.NET allows developers to mark their code with ACID-style transactional semantics, and leaves the grunt work of managing locks to the underlying environment.

Ted Neward

MSDN Magazine January 2010

Foundations: Easily Apply Transactions To Services


Managing state and error recovery using transactions is the topic of this month's installment of Foundations.

Juval Lowy

MSDN Magazine January 2009

Transactions: Build Scalable Systems That Handle Failure Without Losing Data


Systems that handle failure without losing data are elusive. Learn how to achieve systems that are both scalable and robust.

Udi Dahan

MSDN Magazine July 2008

NTFS: Enhance Your Apps With File System Transactions


Presented here is an overview of Transactional NTFS and how it revolutionizes transactions.

Jason Olson

MSDN Magazine July 2007

Data Points: Revisiting System.Transactions


The System.Transactions namespace of the Microsoft .NET Framework makes handling transactions much simpler than previous techniques. Read all about it this month.

John Papa

MSDN Magazine November 2006

{ End Bracket }: Transactions for Memory


Injecting parallelism into your app is easy-managed code offers things like explicit threading and a thread pool for that. Ensuring your code remains correct when run in parallel, on the other hand, is not quite so simple.

Joe Duffy

MSDN Magazine January 2006

Can't Commit?: Volatile Resource Managers in .NET Bring Transactions to the Common Type


Here Juval Lowy discusses the benefits you'll get when you implement transactions in your non-database applications, with a little help from volatile resource managers in the .NET Framework 2.0.

Juval Lowy

MSDN Magazine December 2005

Data Points: ADO.NET and System.Transactions


The Microsoft® . NET Framework versions 1. 0 and 1. 1 represented major changes in software development. However, one important thing that did not change much was support for distributed transactions.

John Papa

MSDN Magazine February 2005

web services transactions (select statement)

 Hi everybody, i'm just getting started in web services and i have a problem connecting to a database. All i want is that my web service recieves a string parameter and return a dataset so that in the client aplication i just show the result of the web service in a datagrid. Here's the code of the web service:    <%@ WebService Language="C#" CodeBehind="Service1.asmx.cs" %> using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Linq;using System.Web;using System.Web.Services;using System.Web.Services.Protocols;using System.Xml.Linq;using System.EnterpriseServices;using System.Data.SqlClient;namespace Farmacia{    [WebService(Namespace = "http://localhost/MyWebServices")]    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]    [ToolboxItem(false)]    public class Farmacia : System.Web.Services.WebService    {        private SqlDataAdapter da;        [WebMethod(TransactionOption=TransactionOption.RequiresNew)]        public DataSet Consultas (string sel)        {            if (sel == "")&

System.Transactions.TransactionManagerCommunicationException: Communication with the underlying tran

Hi there,I have an urgent issue at production.I hit the above mentioned exception when my application execute the line of System.Data.SqlClient.SqlBulkCopy.WriteToServer(DataTable table)I also see this message from web server event viewer: MSDTC encountered an error (HR=0x80004005) while attempting to establish a secure connection with system <SQL Server macchine name>.I have configure the MSDTC servive as below at both web server and sql server:- Enable Network DTC Access- Allow Inbound- Allow Outbound- Select Mutual Authentication RequiredFirewall service is not running at both servers.One thing very interesting, I have exactly the same setting for development environment, it works perfectly at development environment, but not production.Please help!Thank you very much.Regards,Fenny

transactional replication falling behind. millions of transactions in sp_brosereplcmds

Hi, Hi All, we have transactional replication set up with all the agents running at source database. The synchronization status is stuck at "delivering replication transactions". The replication latency in replication monitor says excellent. when I check sp_browsereplcmds. it ever ends. It has over more than millions of rows of output. We were having trouble with this replciation recently because at the source db. they run a large batch. So we decided to schedule snapshot agent to run exactly after that batch but the snapshot doesn't seem to helping out with the latency. what should be done to resolve the issue. Please help. thanks.

Distributed Transactions fail on Linked server

We get the below error while performing a distributed transaction on linked server. We have several linked servers configured in the source server and all of them succeed with the distributed transaction except on one.   We did all the basic troubleshooting and moreover the distributed transactions work fine if we use a remote server instead.   Need your expert guidance in resolving this issue     Error:   OLE DB provider "SQLNCLI10" for linked server "SERVERNAME.REDMOND.CORP.MICROSOFT.COM" returned message "No transaction is active.". Msg 7391, Level 16, State 2, Line 3 The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "SERVERNAME.REDMOND.CORP.MICROSOFT.COM" was unable to begin a distributed transaction.     Test code:   begin distributed transaction   select top 10 * from [SERVERNAME.REDMOND.CORP.MICROSOFT.COM].master.sys.objects   ROLLBACK     Source server :      Microsoft SQL Server 2008 (RTM) - 10.0.1779.0 (X64)        Nov 12 2008 12:10:04        Copyright (c) 1988-2008 Microsoft Corporation        Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6001: Service Pack 1) (VM)     Target server :     Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)        Jul  9 2008 14:43:34        Copyright (c) 1988-2008 Microsoft Corporation        Enterprise Edition

Transactions in SSIS packages

Hi guys - I've been working in ssis for a bit but never have encountered the need for transactions - until I realized that I really need them. Here's my setup. I have a master package that has a sequence container in it. In that sequence container are 3 execute package tasks (Insert - Update - Delete). Each execute package task points to a child package which contains 50 execute package tasks (to perform the tasks on my different tables). From there - the actual work is done. (default everything on transaction/isolation etc) My problem/question is that I need to make it where if the insert fails, the update/delete do not happen and everything gets rolled back. Right now if something fails it just stops there and gives me half changed records. Is there a way to do this or am I just hoping for un-doable? Thanks!

Unable to See List of Marked Transactions on New Server

I am trying to do a TFS test restore to new server following the TFS 2010 Backup and Restore processes below verbatim (SQL 2008 SP1): Backup TFS http://msdn.microsoft.com/en-us/library/ms253070.aspx Restore to Different Server http://msdn.microsoft.com/en-us/library/ms252516.aspx#RestoreDB Restore Single Server Deployment to New Hardware http://msdn.microsoft.com/en-us/library/ff459215.aspx I can restore the database to the restoring state on a new server; however, when applying the transaction log backup I don't see any marked transactions to restore to.  I don't even get a list to choose from.  I can restore the database to the original server successfully and can see list of marked transactions to restore to. Is there anything that we could keep me from seeing the list of marked transactions on the new server?  Does this have anything to do with the fact that the marks are stored in the msdb.dbo.logmarkhistory database? Thanks in Advance, Michael

Doubt about Transactions

Hey guys sorry if this is not the place to write this post.   I've encounter a problem while using transactions on asp.net   In a procedure i'm making an INSERT then I call a store procedure that passes some values to a data reader. Well there's where the problem start, because while i'm reading this data reader I need to call another store procedure to make another insert. Since in total I have 3 store procedures i decided to make a transaction on server side so i can rollback if any problem happens on last procedure for exemple. My doubt relates to the data reader...somehow i can't call a store procedure inside the transaction if an data reader is in use. Is this true? Does the transaction have problems with this?  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend