Re: tracking SPID back to the user or client

Tech-Archive recommends: Fix windows errors by optimizing your registry



That is one of the major reasons that applications should not be using
CURSORs.

During the entire time that the cursor is active, it is setting locks on the
data. Those locks are what are causing the blocking behavior.

The solution is to revisit the code and create set operations instead of
using CURSORS.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


"Therat" <Therat@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E6183442-5BC3-47E3-8120-9F4EC8A42FB2@xxxxxxxxxxxxxxxx
I'f been there, tried to get what's wrong. The only thing i can see is
that
the user has a cursorfetch. So the next thing I could do is trying to ask
the
user what's he/she is doing. The application guy just tells my company
that
it is the server that does this. Problem is the believe it, strange. The
server has been configured that sql can only use 1 processor. just in
case.
The user must have something on its screen and I would like to know what.

If wred the articals you provided.


"Andrew J. Kelly" wrote:

I don't know how to trace it back to a specific user but I doubt that
will
solve your problem. If that user is running the same app as everyone else
the blocker will most likely change each time. It is the app that you
need
to address not the user. You can run trace to see what commands the user
has
issued to get you into that spot or maybe simply using DBCC
INPUTBUFFER(spid) to see what their last command was. Then look at the
app
or database code to see why it is blocking and fix the source.

http://www.support.microsoft.com/?id=224453 Blocking Problems
http://www.support.microsoft.com/?id=271509 How to monitor SQL 2000
Blocking

--
Andrew J. Kelly SQL MVP

"Therat" <Therat@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4B0BDD66-DA02-4AF5-9410-98E1F06E3581@xxxxxxxxxxxxxxxx
Here's a problem that I can't fix. I have an application that uses a
SQL
database. The connection is made through ODBC. Also this application
uses
the
same username for all the connections; yes it's one of those.
Now this application generates a blocking in witch one spid is in the
head
of the chain.
Looking in the Enterprise manager --> current Activity --> lock /
process
ID
I see the blocking process.
Looking in the Process Info at this spid I only see the default name
(the
same for every user). The hostname is empty and the network address is
the
mac address of the router. So left with nothing to trace it back to the
real
user.
I scanned through the system tables for a clue who's responsible for
this
block

With netstat I see pc's connected to the database server.

Mssql knows were the data has to go but why can't I find out what pc is
connected to a spid????? To trace the blocking spid back to the real
user.

Who can make my happy again






.



Relevant Pages

  • Re: Fujitsu cobol and SQLServer
    ... "Steve Rainbird" wrote in ... Server side cursors with SQL Server are not a good idea and are best avoided. ... Fujitsu assumes last connection until/unless you use SET CONNECTION. ... With microfocus cobol I never had this problem (true it is 4 or 5 yesrs since I used Mf and SQL server I tend to use Oracle). ...
    (comp.lang.cobol)
  • Re: error C00D11B3
    ... NIS was blocking the connection. ... LiveUpdates somehow changes these settings? ...
    (microsoft.public.windowsmedia.player)
  • Re: Bicycle riders will get more respect once they start obeying the laws that govern them.
    ... They are blocking in connection with the protest now, ... drain giants later. ...
    (rec.music.christian)
  • pg/python release
    ... Detect errno.ECONNRESET and properly mark the connection as 'LOST' ... The programmer's client providing both DB-API 2.0 and GreenTrunk ... Protocol level cursors (You can even open cursors created on the ...
    (comp.lang.python.announce)
  • RE: Non-Blocking UDP in VB.NET for beginners?
    ... I believe I have worked out for myself how to get around the blocking ... But to test the connection I attempt to get the ... Dim ReceivedEx As String ...
    (microsoft.public.dotnet.languages.vb)