• Maqsood from:

    From: http://blogs.msdn.com/psssql/archive/2008/04/21/how-it-works-what-is-a-sleeping-awaiting-command-session.aspx%5B/url%5D

    This issue is as old as SQL Server. In fact, it goes back to Sybase days but continues to fool and puzzle administrators.

    A session with that status of sleeping / awaiting command is simply a client connection with no active query to the SQL Server.

    The table below shows the transitions from running to sleeping states for a session.

    Connect Running

    Connect Completed Sleeping / Awaiting Command

    select @@VERSION Running

    select completed Sleeping / Awaiting Command

    The question usually arises around a session that is holding locks and its state is sleeping / awaiting command.

    If the client has an open transaction and the client did not submit a commit or rollback command the state is

    sleeping / awaiting command.

    The situation can be caused by many other variations but it is always a situation where the SQL Server is

    waiting for the next command from the client.

    Outside a physical connection problem these are always application design issues.

    Hope this helps your understanding of what you have observed.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]