|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
deadlocked on lock
What can I do to prevent this type of error messages occuring? Theese errros
are coming basicly from readonly database transaction. One part of our massageboard on IIS. What causes this erros to occur? There is quite a lot of insertrs and updates happening at the same time users are reading thos message board pages.... But this page is read only. Transaction (Process ID 125) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. TLehtinen wrote:
> What can I do to prevent this type of error messages occuring? Theese - Minimize yout transaction duration - do not leave any transactions > errros are coming basicly from readonly database transaction. One > part of our massageboard on IIS. What causes this erros to occur? > There is quite a lot of insertrs and updates happening at the same > time users are reading thos message board pages.... But this page is > read only. > Transaction (Process ID 125) was deadlocked on lock resources with > another process and has been chosen as the deadlock victim. Rerun the > transaction. open on a client - BEGIN TRAN... Exec T-SQL... COMMIT TRAN as quickly as possible - When you delete, insert or update from tables make sure to access tables in the same order in all procedures - Use Profiler to help determine your long running SQL statements - add indexes where needed to address performance concerns - If all else fails, consider using a NOLOCK hint on your SELECT statements, assuming your application can deal with the possibility of dirty reads Here's more information: http://www.sql-server-performance.com/deadlocks.asp -- David Gugick - SQL Server MVP Quest Software
Other interesting topics
expectations for SUM query on 50+ million rows
Deadlocks "again" How to "Grant" a Trigger ??? IN clause with comma seperated values in select query Internal SQL Server error Management Studio Question.... what kind of index to use in this situation. Page coruption Stored procedures in master database SQL Server 200/2005 Add User to Log-Shipped Database |
|||||||||||||||||||||||