Solved

read_commited_snapshot and update transactions

Posted on 2010-11-15
5
577 Views
Last Modified: 2012-05-10
Hello,

Can the option read_commited_snapshot allow two transactions  to make an update on the same table but on the different lines?

Thanks regards

Bibi
0
Comment
Question by:bibi92
  • 3
5 Comments
 
LVL 1

Accepted Solution

by:
Bogdan_X earned 500 total points
ID: 34143202
Yes it can, but you can still get deadlocks - you should also check the clustered key for that table, so you don't update the same key / page.
0
 

Author Comment

by:bibi92
ID: 34143661
Exactly, I still get deadlocks, how can I resolve them? Can you explain me check the clustered key for that table, so you don't update the same key / page.
Thanks

bibi
0
 

Author Comment

by:bibi92
ID: 34143680
herewith the query :
Update TEST_ENV_ENT.TEST_ENV_ENT.ENT_LIGNE_FACT
Set  LDV_TECH_DATE_SUPP=CURRENT_TIMESTAMP
Where Not Exists (Select 'X'
From TEST_ENV_ENT.dbo.I$_ENT_LIGNE_FACT_REG_650 S
Where TEST_ENV_ENT.TEST_ENV_ENT.ENT_LIGNE_FACT.AGE_CODE = S.AGE_CODE
And TEST_ENV_ENT.TEST_ENV_ENT.ENT_LIGNE_FACT.DEV_CODE = S.DEV_CODE
And TEST_ENV_ENT.TEST_ENV_ENT.ENT_LIGNE_FACT.LDV_NUM_INTERNE = S.LDV_NUM_INTERNE
)
And  LDV_TECH_DATE_SUPP Is Null
And  REG_CODE = SubString('REG_650', 5, 3)
 
Error :
1205 : 40001 : com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 86) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Thanks
bibi
0
 

Author Closing Comment

by:bibi92
ID: 34148644
Thanks bibi
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how the fundamental information of how to create a table.

685 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