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?

Answers were Sorted based on User's Feedback



How can your resolve deadlocks?..

Answer / 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

How can your resolve deadlocks?..

Answer / xavier rajan, photon infotech

A deadlock occurs when two or more
processes try to access a resource that another process has
a lock on. Microsoft SQL Server automatically
detects these deadlocks, terminates one of the processes,
and rolls back any changes made by that process.
The process chosen for termination will be the one with the
least amount of active time on the server. In
most cases, you can simply reissue the statements that were
rolled back and should have no problems.

Is This Answer Correct ?    6 Yes 1 No

How can your resolve deadlocks?..

Answer / darshan

Hi
1)
First find out which process block the other process from
activity monitor or sp_who2. Then kill that process.
2)
If update locks are more then it will make deadlock. So
reduce that.

Is This Answer Correct ?    7 Yes 2 No

How can your resolve deadlocks?..

Answer / sasikala

one way to kill the process which is responsible for dead lock. after this the process can proceed without any problem. after a process completed , the killed process should be created and executed as if nothing has happened. but the killed process might have changed in an data base or some records. it must have changed as before to maintain the consistency.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

what's new in sql server 2016?

0 Answers  


Explain user defined functions?

0 Answers  


How does normalization work?

0 Answers  


Can a trigger be created on a view?

0 Answers  


What happens if date-only values are provided as date and time literals?

0 Answers  


What do you mean by sql server 2005 express management tools?

0 Answers  


Define candidate key, alternate key, composite key.

13 Answers   Infosys, Software India,


What is the full meaning of dml?

0 Answers  


Explain primary key in sql server?

0 Answers  


Explain what are the authentication modes in sql server?

0 Answers  


What are subqueries in sql server?

0 Answers  


How data can be copied from one table to another table?

0 Answers  


Categories