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

Can sub report data source be different from that of the parent report?

139


Give a example to search fr a string in all stored procedure in sql server.

928


What are various aggregate functions that are available?

933


How to find tables without indexes?

1048


How to connect a database with sql express.?

1025


What are four major operators that can be used to combine conditions on a where clause?

1000


How do I start sql server 2016?

870


Tell me time data type, datetime2, datetimeoffset data type in sql server 2008?

928


How to store and query spatial data?

953


What is the user of Primary key?

937


What is difference between order by and group by?

970


How use inner join in sql server?

1076


what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?

1923


What is the sql case statement used for? Explain with an example?

952


How to connect sql server management studio express to sql server 2005 express?

985