Created
December 20, 2016 22:52
-
-
Save JohnnyNiu/a797eeca7cccc08581ac65c0ff67756b to your computer and use it in GitHub Desktop.
Check sqlserver 2008 connections and filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT spid, | |
sp.[status], | |
loginame [Login], | |
hostname, | |
blocked BlkBy, | |
sd.name DBName, | |
cmd Command, | |
cpu CPUTime, | |
physical_io DiskIO, | |
last_batch LastBatch, | |
[program_name] ProgramName | |
FROM master.dbo.sysprocesses sp | |
JOIN master.dbo.sysdatabases sd ON sp.dbid = sd.dbid | |
Where sd.name='pdf_conversion_job_generator_ci' | |
ORDER BY spid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment