SPID in eventinfo

  • Question.

    How does SPID got assign to the process. ?

    Let's say I started a process and captures SPID in a table and next time I run the same process, will the same SPID assigned to the same process.

    If not then how to capture eventinfo using DBCC INPUTBUFER(SPID) into a table.

  • is this what you need:

    select st.text, * from master..sysprocesses

    cross apply sys.dm_exec_sql_text(sql_handle) st

    OR select st.text,ec.* from sys.dm_exec_connections ec

    cross apply sys.dm_exec_sql_text(most_recent_sql_handle) st

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

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