2017-03-07 27 views

回答

4

是的,这是可能的。您可以通过拨打xp_cmdshell命令TASKLIST

exec master..xp_cmdshell 'TASKLIST' 

输出:

Image Name      PID Session Name  Session# Mem Usage 
========================= ======== ================ =========== ============ 
System Idle Process    0       0   4 K 
System       4       0  140 K 
smss.exe      212       0  956 K 
csrss.exe      332       0  5,560 K 
..... 
sqlservr.exe     1492       0  92,012 K 
sqlservr.exe     1532       0  95,928 K 
..... 

注意:你应该有正确的权限和服务器配置选项来运行xp_cmdshell。阅读MSDN中的备注部分,了解如何启用xp_cmdshell

+0

一切都很好cha.But没有显示任何SQL Server进程正在运行 – SujithTee

+0

SQL Server进程被称为'sqlservr.exe' – cha

+1

如果这没有启用,你可以用下面的方法打开它:sp_configure xp_cmdshell,1 reconfigure – JosephStyons

相关问题