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 different authentication modes in sql server? How can it be changed?

1090


Explain trigger and its types?

1067


How do we know if any query is retrieving a large amount of data or very little data?

976


What is the downside of using udf?

1109


explain declarative management framework (dmf) in sql server 2008?

995


What is 4nf in normalization form?

1026


Does transparent data encryption provide encryption when transmitting data across the network?

1047


How connect excel to sql server?

997


what is a major difference between sql server 6.5 and 7.0 platform wise? : Sql server database administration

908


How to find related tables in sql server?

947


Explain sql server authentication modes?

1134


What is the difference between a check constraint and a rule?

1253


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8156


How to create function without parameter in sql server?

1059


Why is there a performance difference between two similar queries where one uses union and the other uses union all?

1033