Watching connections...

  • Hey Gang! I stumbled across a query last week which allows me to monitor database connections. (See sample below.)

    The problem I'm wondering about is that about half of the time when I run this query, I see one result which contains no value in the "loginame' column even though it has the most number of connections.

    SELECT [loginame], COUNT([spid]) AS COUNT

    FROM [master].[sys].[sysprocesses]

    WHERE [status] <> 'background'

    GROUP BY [loginame]

    ORDER BY COUNT([spid])

    Results:

    loginame COUNT

    vmehta1 2

    TECHRADIUMVM\jgarnett 3

    TECHRADIUMVM\adc 6

    TECHRADIUMVM\djohn 8

    TECHRADIUMVM\lkruse 8

    sa 34

    58

    Does anyone know why there is one entry with the most connections but no login name?

    Thanks!

    Larry

  • most likely system users

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • could it be users from the domain that are not explicitly added as logins? so if the domain group myDomain\Dev was added, people get in with no login?

    so you'd have to check the ntusername instead?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply