Find SPID of Linked Server Call

  • Hi SCC,

    I have a stored procedure on server A that makes a linked server call to server B.... on server A I see the wait type is OLEDB so I want to look at the SPID on server B... is there a way to identify the remote SPID other than connecting to the server and doing an sp_who2 and looking for the client who made the connection and then username of the linked server?

    Thanks!

  • If you want to identify the SPID on the remote Server you need to connect to the Remote Server.

    I often use sp_who3 and sp_WhoIsActive. They will only show active SPIDS.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • I actually found that you can find the SPID of the of a linked server call using master..sysprocesses on the local server under the waitresource field, INVENTORY is the alias to the linked server in this case and SPID 139 is remote SPID:

    spidkpidblockedwaittypewaittimelastwaittypewaitresource

    53842800x006D78 OLEDB INVENTORY (SPID=139)

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

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