Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deadlock revisited
Message
 
 
À
16/02/2009 16:14:34
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Application:
Web
Divers
Thread ID:
01381607
Message ID:
01382236
Vues:
21
>>It's not a simple tasks to avoid deadlocks sometimes. You should read more on deadlocks, what causes them and how to avoid them.
>>In general, the most common cause of deadlock is when statement 1 locks table A and than B and Statement 2 locks table B and Then A. It's simplified example but may give you an idea where to look.
>
>But, as those situations can happen, having a retry mechanism would help.Basically, I can detect this error and retry. This only occurs at the SQL Exec command. So, as a safety measure, this is something I can do at first. Then, I can take a look at where exactly this is caused.

If you're using SP, you can also probably try to use TRY/CATCH within SQL Server itself. I need to read up if deadlock situations are caught by TRY/CATCH, I don't remember of hand.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform