Deadlock is a process where one user performs some operations on a single object and other user also want to perform the same operation on the same particular object, is called a Deadlock.
We have to enable the Trace on the SQL Server by the below Command.
DBCC TRACEON (1204, -1)
Now check on the Error Logs we will be seeing the Deadlock that has been occured on the objects on the server.
- Adding & Dropping of Indexes.
- Adding Index hints.
- Modify the application to access resources in a similar pattern.
- Removing the activity transactions like triggers. By default triggers are transactional.
- Keeping transaction as short a possible.
- Intent shared Locks.