当前位置: 代码迷 >> SQL >> MSSQL展示进程执行的脚本
  详细解决方案

MSSQL展示进程执行的脚本

热度:77   发布时间:2016-05-05 13:36:54.0
MSSQL显示进程执行的脚本

经常检查哪个进程运行什么脚本

所以以下脚本比较实用

--显示进程执行的脚本use masterdeclare @spid int;declare @sql_handle binary(20);set @spid = 112SELECT @sql_handle = sql_handleFROM sysprocesses As A with (nolock)where spid = @spidselect textfrom ::fn_get_sql(@sql_handle)


 

  相关解决方案