Solved

read_commited_snapshot and update transactions

Posted on 2010-11-15
5
579 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
[X]
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
  • 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

636 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