Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Troubleshooting Locking

Author  Topic 

Pace
Constraint Violating Yak Guru

264 Posts

Posted - 2007-12-11 : 10:42:32
Hi,

I am looking for information, sample code to help me debug some record locking issues I am getting with a particular table. Any links/advice greatly appreciated.

pace

"Impossible is Nothing"

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-12-11 : 11:00:32
Use SQL Profiler to find what procedures/code is causing the locks in the first place. If you can (depending on your data), use nolocks or read uncommited trasaction levels.
Go to Top of Page

Pace
Constraint Violating Yak Guru

264 Posts

Posted - 2007-12-11 : 11:21:18
Hi yeah ive been looking at profiler, but I only want to record locks... when im trying to set up a trace, its recording all actions, which is a lot to sift through to find when the lock was. I was hoping someone maybe had a template? or a link to where I could read up and obtain some code about viewing only these locking events. Its something I would really like to solve, plus im hoping it will help me with my mcts course. Any ideas?

"Impossible is Nothing"
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-12-11 : 11:37:43
You have lock events in SQL 2000 Profiler, use these to find out the SPIDs that are locking.

Also try something like:

http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlops5.mspx
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-12-11 : 11:44:35
what kind of locking?
deadlocks, blocking to to escalation, conversion locking blocking, ...?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out
Go to Top of Page

Pace
Constraint Violating Yak Guru

264 Posts

Posted - 2007-12-11 : 11:46:57
blimey, thats a printer job me thinks. Some serious reading there. Skimmed through, looks like it could be just what im looking for, thanks RickD, anyone else feel free to add if you can. cheers

"Impossible is Nothing"
Go to Top of Page

Pace
Constraint Violating Yak Guru

264 Posts

Posted - 2007-12-11 : 11:53:41
sorry, deadlocking is my issue. I wasnt aware of the others :S lots to learn

"Impossible is Nothing"
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-12-11 : 12:02:11
well enable 1204 trace flag and it will give you the info about the deadlocks when they happen:
http://msdn2.microsoft.com/en-us/library/ms178104.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out
Go to Top of Page
   

- Advertisement -