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

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

Snapshot isolation transaction aborted due to update conflict.

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :Sql Server
To avoid deadlocks, we switched from ReadCommittedSnapshot isolation to SnapShot isolation for a SQL Server database at the database level and transaction level in the client code. Now, when two users perform concurrent operations on the database through the client, one of the clients get this error: "Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.cust_table' directly or indirectly in database 'cust_database' to update, delete, or insert the row that has been modified or deleted by another transaction. Retry the transaction or change the isolation level for the update/delete statement."What can we do to avoid deadlocks and update conflicts at the same time? (The same code with Oracle database and Oracle client works without any issues with the default Read Committed Snapshot isolation level)

View Complete Post

More Related Resource Links

multiple executions of MERGE statement: Help with suitable TRANSACTION ISOLATION LEVEL

Folks, I am reasonably new to SQL Server. I am using SQL Server 2008 (no SP) on Windows XP. I am using the MERGE statement within a TSQL procedure to update a master/detail table pair (Master/Child), in which the MERGE inserts into the MASTER if a record based on the primary key doesn't exist and does, effectively nothing, if it does (well, it does an UPDATE set PK=PK so the record is passed on to the OUTPUT statement for insertion into the CHILD). Regardless as to the situation, the CHILD record has a record created when the MASTER exists or doesn't exist. Now, this code works fine with the standard TRANSACTION LEVELS. But I don't know what to do when I am running two instances of the same MERGE statement at the same time. One execution could create a record in the MASTER which the other process might try and create 5 minutes later. I really don't know what SET TRANSACTION ISOLATION LEVEL to use to allow both processes to run at the same time. I have looked at: ALTER DATABASE $(usedbname) SET READ_COMMITTED_SNAPSHOT ON; ALTER DATABASE $(usedbname) SET ALLOW_SNAPSHOT_ISOLATION ON; But these don't seem to work with their associated TSQL calls. I know this is a complex issue, but as a new SQL Server user, I didn't know where else to go. regards Simon                              

which is best Snapshot Replication or Transaction Replication for my requirement?

Hi,    We have a main transaction database where all the live data is there.Now, to run a reporting application,we need a  different database, but the data is as EXACTLY as the live database.So,probaly every noght aroung 1 0'clock,we want to sync these two databases.   In this scenario,which is better, Snapshot replication or Transaction Replication? what are the pros and cons of using them? As I am new to this things,ur answers would be very much helpful..

Can't Create a Web App - Update Conflict Error


When attempting to create a new web application I get the following error:

An update conflict has occurred, and you must re-try this action. The object SPWebApplication Name=SharePoint - 36411 Parent=SPWebService is being updated by DOMAIN\user, in the w3wp process, on machine MACHINENAME.  View the tracing log for more information about the conflict.

The Event Log error is:

Unknown SQL Exception 547 occured. Additional error information from SQL Server is included below.


The DELETE statement conflicted with the REFERENCE constraint "FK_Dependencies1_Objects". The conflict occurred in database "SharePoint_Config", table "dbo.Dependencies", column 'ObjectId'.

The statement has been terminated.


I'm working with a single server farm, SP2 on Windows 2003 x64.  I was able to re-run the configuration wizard successfully, but still cannot create a new web application.  Any ideas?

Using "Transaction activty" in Workflow to update 2 tables - throws "communication with the underlyi


I created a transactionscope over 2 code activities,
Code activity1 opens a connection, fires an insert into a table and closes the connection.
Code actibity2 also opens connection, does a simple insert into same table and closes the connection

I get the following exception:
The 1st code activity runs fine, then the second code activity fails when it tries to open a connection and I get this message "Communication with the underlying transaction manager has failed. "

I have persistence services working properly, I'm able to persist the workflows..which means my MSDTC is configured right, also able to insert data into the tables..but when I use the transactionscope I just get that error whever I open the connection in the second code activity

Am I missing something or this is one of those inbuilt bugs of the "workflowfoundation" bugs like the timer etc?

Snapshot Isolation Levels


I have a customer that is getting long blocking chains caused by reporting against OLTP data. I have successfully setup replication to report against a subset of the tables for another customer and this has worked fine. The only downside to this, besides the replication performance impact, is that if many reports are running and updates are happening at the same time, the second report (and up) will be blocked. The blocking chain is the first report blocks the replication agent which blocks the second report and so on. This is probably acceptable but I want to make sure it is the best option. Therefore, I would like to look into using either read committed snapshot isolation (RCSI) or the snapshot isolation (SI).

1) Are RCSI and SI mutually exclusive options? From my testing, I could turn on one without turning on the other. However, I read a blog that said you can only turn on SI once RCSI has been turned on for the database. Is this true? I am assuming the blog was wrong.

2) If I only turn on SI and only ever use a "SET TRANSACTION ISOLATION LEVEL SNAPSHOT" statement in read only reports, the application (non-reports) should function the exact same correct? (Excluding the added tempdb space used). Obviously a huge dilemma with setting any of these snapshot levels is trying to prevent the changes to how the applicati

Random Occurance of 'The transaction active in this session has been committed or aborted by anothe


I am executing calls to 3 Stored procedure in TransactionScope

On a random basis i get the following error:

    'The transaction active in this session has been committed or aborted by another session.'

On Executing the SPs again with the same data i am not able to reproduce the error.

Any suggestions on What i should investigate.


Read Committed Snapshot vs Snapshot isolation


Hi all,

Can someone show me with an example what the difference betweent these two are?

please help me

central Admin: An update conflict has occurred, and you must re-try this action.


I started to get this message everytime I try to Quiesce Farm.



An unhandled exception occurred in the user interface.Exception Information: An update conflict has occurred, and you must re-try this action. The object SessionStateService Parent=SPFarm Name=SharePoint_Config is being updated by DOMAIN\username, in the w3wp process, on machine XXXXXX.  View the tracing log for more information about the conflict.


 Here is the error message from the trace log.


Updating SessionStateService ID=f7c77330-df6e-48ba-b47f-e7102206d8ee, Version=34038 

Updating SPPersistedObject SessionStateService Parent=SPFarm Name=SharePoint_Config. Version: 34038 Ensure: 0, HashCode: 66228199, Id: f7c77330-df6e-48ba-b47f-e7102206d8ee, Stack:    at Microsoft.SharePoint.Administration.SPPersistedObject.Update()     at Microsoft.SharePoint.Administration.SPService.Update()     at Microsoft.Office.Server.Administration.SessionStateService.Update()     at Microsoft.Office.Server.Internal.UI.QuiesceFarmPage.BtnStartQuiesce_Click(Object sender, EventArgs e)     at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     at System.Web.UI.WebC

The transaction has aborted for Custom workflow using VS 2005


I have a custom workflow created with Visual Studio 2005 Extension for Windows Workflow Foundation and Visual Studio 2005 extensions for .NET Framework 3.0 (WCF & WPF), November 2006 CTP. We have SharePoint Enterprise 2007 SP2. We have 2 web front end, one Search server and one SQL server 2005. The problem I have with the workflow is that I get this following error randomly for workflows that have been running and in progress and are waiting for an approval. This is the error.

Main Exception: Source: System.Workflow.Runtime
Message: The transaction has aborted.
Stack: at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation) at System.Workflow.Runtime.WorkflowExecutor.ProtectedPersist(Boolean unlock)
Inner Exception: Source: System.Transactions
Message: The transaction has aborted.
Stack: at System.Transactions.TransactionStateAborted.CreateAbortingClone(InternalTransaction tx) at System.Transactions.DependentTransaction..ctor(IsolationLevel isoLevel, In

An update conflict has occurred, and you must re-try this action.


We are running MOSS 2007 Enterprise and I just applied WSS and MOSS SP2 to our environment.  Both updates completed successfully but I am getting an error when running the SharePoint Configuration Wizard to complete the update:

An update conflict has occurred, and you must re-try this action. The object SPServer Name=ServerName Parent=SPFarm Name=PORTAL_CONFIG is being updated by Domain\Account, in the OWSTIMER process, on machine ServerName

What can I do??

SQL 2008:Peer 2 Peer Replication: Update-Update Conflict on the same node


My environment is comprising of 2 SQL servers setup with P2P replication in SQL 2008, 2 Web servers connect to only one SQL server at a time and make changes to the published tables and 2 Application servers which connects to both the SQL servers all the time but they only read data.

We chose P2P since my app servers are in different locations which read data from both the SQL servers and we use it as HA solution.

Since we are changing data at only one SQL server, thought we should never get update-update conflicts but we are now on the same node.

A conflict of type 'Update-Update' was detected at peer 3 between peer 1 (incoming), transaction id 0x0000000000725ca2 and peer 1 (on disk), transaction id 0x00000000007259e9 (Source: MSSQLServer, Error number: 22815)

We are making changes only at Server A and Server B is my backup server.

I made a varchar field updated in 1 row on a table in server A then it gets replicated to Server B
then I made the same field updated for 160 rows on the same table in Server A then it gets replicated to Server B
then I reverted back the change made to the field on all 160 rows on the same table in Server A then my replication failing with Update-Update conflict.

I'm not sure whats causing this because I'm not making any change

Isolation Level set to Read Committed Snapshot, Deadlock Graph shows Read Committed


I must misunderstand something here. I have altered the DB to allow READ_COMMITTED_SNAPSHOT and some deadlock situations have been solved. Nevertheless, in a very similar situation, I'm getting deadlocks and the deadlock graph (XML) shows me the following:

isolationlevel="read committed (2)"

What do I miss here?



snapshot replication when update records

i configure snapshot replication but it not update records automatically.what is the condition or job time to update records on replicate server. thanks in advance...

how to reproduce : "Distributed transaction aborted by MSDTC"


Hi all,

do you have any example to see how to get the error

Distributed transaction aborted by MSDTC” ?

If I execute two statement inside a TransactionScope, the timeout depends only from the TransactionScope timeout and not from the one set in MSDTC .


Best Regards

ASP.Net Gridview Edit Update Cancel Commands

In ASP.Net 2.0, GridView Control also provides the functionality to edit and update the data retrieved from the database using CommandField template. You can cancel the action using Cancel Command of the CommandField. GridView consists of events that can be used to perform the actions like edit, update and cancel upon the Data items displayed in the ASP.Net GridView Data Control.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Update Vs SystemUpdate

Many of you might noticed that share point ListItem has Update() method as well as SystemUpdate().

What is the difference between these two methods and why MOSS has two different APIs for updating an ListItem
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