SQL Server Performance

Status "Sleeping" while the T-SQL batch is running

Discussion in 'General DBA Questions' started by alimmia, Jun 7, 2006.

  1. alimmia New Member

    While the SELECT ..... INTO batch was running, I executed the sp_who2 to see the status. I saw the status was "Sleeping" but the batch was running and DiskIO was changing. Any comments on this puzzle will be appreciated.

    Alim Mia
  2. alimmia New Member

    sp_who2 output

    61 sleeping WINafbd1 WM-PB-Hdddddd71 . MYDB DROP INDEX 11284 745238 06/07 14:18:33 SQL Query Analyzer 61

    Alim Mia
  3. satya Moderator

    IF you see the IO is changing then it means the process is running successfully and do not catchup with SLEEPING description on status column in that case. Ensure there are no other errors cropped up during this session.

    Internally, each process also has a separate lazywriter thread that scans through the buffer cache. The lazywriter process sleeps for an interval of time.

    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    This posting is provided �AS IS� with no rights for the sake of knowledge sharing.
  4. alimmia New Member

    Thanks Satya.

    Alim Mia

Share This Page