Main menu:

Site search

Categories

Archive

MSSQL Process ID

If you need to find the process ID (PID) of the current connection to MSSQL server then you can use the @@SPID variable. This only works for Microsoft SQL server (as far as I know). It might be useful for killing a certain process on the server. It might also be useless and just a fun fact to know in case you’re on a TV show and that’s the one-million dollar question.

Write a comment