Sql-server – Deadlock Error from SQL Server 2000 to SQL Server 2008

deadlocksql-server-2008transactiontrigger

After migrating data from SQL Server 2000 to SQL Server 2008, when I am doing any a transaction in the table which find out more row on the database, that's gives me error.

 Transaction (Process ID 59) was deadlocked on lock resources with
 another process and has been chosen as the deadlock victim. 
 Rerun the transaction.

There are 3 triggers on the table (Insert,Update,Delete). How can I solve this problem?

Best Answer

After upgrading to SQL Server 2008, did you run the below?

  1. DBCC UPDATEUSGAE
  2. UPDATE STATS WITH FULLSCAN
  3. REBUILD ALL INDEXES

The statistics blob is changed significantly from 2000 to SQL Server 2008 and the above steps are very important after the upgrade. I have seen many ppl run into performance problems but not deadlocks. I would try doing all of the above if you haven't so far and try to reproduce the problem afterwards.

That said, what is the results of SELECT @@VERSION on the 2008 box? Are you updating one row or several rows?