Skip to Content.
Sympa Menu

freetds - Re: Locking & SQL Server 7.0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: James Cameron <cameron AT stl.dec.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Locking & SQL Server 7.0
  • Date: Thu, 25 Oct 2001 09:08:29 +1000


I can confirm that adding 'WITH (NOLOCK)' to apparently read-only PHP
applications using FreeTDS does indeed reduce the locking delays
experienced by updating stored procedures used by other users.

It's nothing to do with FreeTDS or PHP, it's just the way the server
works.

Brian Bruns wrote:
> If you do an exec sp_who while this blocking is happenning you'll see a
> number in the "blk" column. Which will be the spid number of the
> blocking process (PHP). Take that number and run an exec sp_lock <spid>
> and you'll see the lock that is causing the problem. you can then take
> the object_id and run 'select object_name(<objid>)' to see the table,
> but you probably know this already.

I didn't know! I guess many of us have entered the SQL arena with
insufficient knowledge.

Has anyone taken the sequence above and made a generalised PHP script
for it? contention.php

--
James Cameron (cameron AT stl.dec.com)

http://www.opensource.org/ http://vanilla.us.netrek.org/ http://lwn.net/




Archive powered by MHonArc 2.6.24.

Top of Page