A SPID in SQL Server is a Server Process ID. These process ID’s are essentially sessions in SQL Server. Everytime an application connects to SQL Server, a new connection (or SPID) is created. This connection has a defined scope and memory space and cannot interact with other SPIDs. The term SPID is synonymous with Connection, or Session
In order to view all the connections in SQL Server execute the following query.
To know which sessions are running currently, run the following command:
In our case, we got SPID 105, which means the session that is running this command has ID of 105.
Let us run a simple SELECT statement in session with SPID 105 run the following command.