반응형
  1. /**********************************************************************************************
    -- Title : [2k] 대기(waiting)중인 프로세스 확인 쿼리
    -- Reference : dbguide.net
    -- Key word : sysprocesses waittime 대기 waiting
    **********************************************************************************************/
    select spid
                 , waittime/1000.0 as [wait_min]
                 , lastwaittype, waitresource
    from master.dbo.sysprocesses
    where spid > 50
    and ((waittype between 1 and 32) and waittime > 10000) -- 잠금 > 10초
    or ((waittype between 1056 and 1061) and waittime > 1000) -- 데이터페이지 I/O 대기 > 1초
    or (waittype = 2048 and waittime > 10000) -- Network I/O 블록킹 > 10초
    or (waittype = 129 and waittime > 500) -- Log I/O > 0.5초

반응형

+ Recent posts