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 a rule be bound to any column of any data type?

910


How to delete all rows with truncate table statement in ms sql server?

929


How to use order by with union operators in ms sql server?

967


how to determine the service pack currently installed on sql server? : Sql server database administration

906


Why do we use non clustered index?

1008


What are the disadvantages of primary key and foreign key in SQL?

1047


What is ddl and dml commands?

848


How to list all stored procedures in the current database using ms sql server?

1054


John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?

884


Explain about Views?

1007


Explain cross join or cartesian product in sql?

840


How to set database to be read_only in ms sql server?

954


What action plan is preferred if sql server is not responding?

1034


What are various aggregate functions that are available?

913


What is difference between temp table and cte?

960