Sql-server – Identifying “Lock Timeout” errors on SQL Server 2000

debuggingsql server

Our ERP software uses a SQL Server 2000 database. When we run a specific task on the software that used to take few seconds, a 300 seconds delay happens and SQL Server returns the error "Lock Timeout. SQL Server connection timeout".

I tried to identify the problem using SQL Server Profiler, and I could see some ROLLBACK's there, but I had no conclusions.

Is there a better way to identify what query is locking what resource and what query timeouts?

Best Answer

You can query the master.dbo.sysprocesses and master.dbo.syslocks tables to see what's actually running on the system, and what locks they are taking. This along with sp_who2 can help you figure out what's locking the records, or what blocks are happening.

Are you performing any sort of regular database maintenance on the SQL database? If not, this lack of maintenance can lead to all sorts of performance problems.

Related Topic