Question about how new SPIDs spawn

  • Hey guys,

    (I'm talking SQL2000 here)

    Take a look in EM under Management/Current Activity/Process Info. See all those SPID's with blank hosts? I never wondered about them before as I just assumed that they were system-level processed that were running locally under sysadmin account.

    But I'm seeing end-user logins running SPID's with blank hosts. This is new (to me). These users don't have any ability to log into the server to run queries locally. So the question then becomes; where are they coming from?

    I've got a theory but I don't know enough about how SQL creates SPID's. Under what conditions would a SQL script spawn another SPID? I'm not talking threads/fibers here, just SPID's. Here are some specific examples and my guesses:

    a SQL script with a complex query (no new SPID)

    a SQL script that calls sp_OACreate to create a SQL-DMO object (new SPID)

    So, if SQL spawns a new SPID to help run a script, does the new SPID have a blank host?

     

    Any help is appreciated,

    -Trav

  • I don't know about spawning SPIDs via sp_OAcreate. But the "Host" and "Application" columns in the process info view (which are simply read from the table master.dbo.sysprocesses) are filled in by the client application on connection to SQL server. If you have an application which connects using vanilla ODBC, for example, these columns will both be blank.

    FWIW you can determine the MAC address of the host computer from the "Network Address" column.

  • Every connection to SQL Server, either through a script or just a login into SQL Server would spawn an SPID. I have observed SPID's spawned due to connection to SQL Server from most internet applications giving blank Hostnames.


    Kindest Regards,

    M Suresh Kumar

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

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