Skip to content
 

SQL Server SPID – What is it?

You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “SQL Server SPID – What is it?”.

7 Comments

  1. Mahendra says:

    Going by the line “Temp tables that are created within a SPID are accessible from any proceeding execution in that SPID”,
    1. Create a stored procedure that creates a #temp table.
    2. Open a new Query Window in SSMS.
    3. Execute the stored procedure and then from outside the stored procedure try to excute the following statement “Select * From #temp” it will not get executed.

    My question is when the @@SPID is same why the temp table created in a stored procedure is not accessible outside the stored procedure.

  2. Merete Wrangell says:

    Have problems with spid -2 in sqlserver 2005. How do I kill these processes?

  3. Tanuj Bhargava says:

    Thanks a lot for the accurate information.

post a comment OR Post Your Question on our ASK! Community!