Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
テーブルへの挿入を行っている現在の接続を表示する方法はありますか?
については知ってsp_who2いますが、現在の接続をデータベースの挿入または更新に関連付けることができるものはありますか?
sp_who2
これを試してください(十分な権限が必要です):
DECLARE @sqltext VARBINARY(128) SELECT @sqltext = sql_handle FROM sys.sysprocesses WHERE spid = 61 -- Specify your SPID here SELECT TEXT FROM sys.dm_exec_sql_text(@sqltext)