Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can your resolve deadlocks?

Answer Posted / ilgian

Deadlocks occour when two or more processes place a lock on
the same resources and each process waits for the others to
release the lock.
The options to avoid deadlocks are basically the following:
1) always update data in the same order: if process A
updates table t1 and then table t2 and process B updates
table t2 and then table t1 deadlocks can occour. Choose an
order and use it everywhere in your code.
2) issue the commands again when you catch the deadlock
3) always update data before data selection: no other
process will place a lock on the modified records
4) identify the processes that can run with lower deadlock
priority and issue SET DEADLOCK_PRIORITY LOW before these
statements: this will tell SQLServer that the process is a
good candidate for killing in case of deadlock, having
the "important" processes free to run without kills

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the properties of primary key?

1015


what is spatial nonclustered index

1037


Explain what are the database objects? : SQL Server Architecture

1144


How to execute a stored procedure in ms sql server?

1252


System requirements for sql server 2005 express edition?

1070


What is a with(nolock)?

1025


What happens if the update subquery returns multiple rows in ms sql server?

1171


What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?

1022


Different types of keys in SQL?

1141


Explain boyce and codd normal form(bcnf)?

1015


How to find related tables in sql server?

1001


Explain what is the purpose of sql profiler in sql server?

1131


What is difference between table aliases and column aliases? Do they affect performance?

1021


What is data source document?

1089


Can You Use Data Mining Models In Ssrs?

152