SQL 服务器日志 - 来源 (SPID)

SQL Server Log - Souce (SPID)

在检查日志文件查看器以查找值得注意的事件时,我发现了一个我想调查的日志。

假设日志将源记录为 SPID1234

我的问题: 此 SPID 是与生成日志的实际连接相关联,还是与将其写入日志的进程相关联?

事务日志中的 SPID - 是发起事务的进程的 ID,它被写入事务日志

在您的场景中,SPID1234,这意味着 运行 此命令的会话 ID 为 1234。

来自 here

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.