Reputation: 2800
There is a code
SELECT S.session_id, S.login_name, S.status
FROM sys.dm_exec_sessions AS S
Why the result shows so many rows? It sounds like I don't know how to right close management studio...
MSDN says:
Running - Currently running one or more requests
Sleeping - Currently running no requests
how the same user can have sleeping and running status?
Ok ok, I know that this represents standalone seesions, but when new session starts, and when the session ends? Is this all about dissconnect from server?
My first reaction when I saw the output was like "SAY WHAAAT?!"
also the column:
last_successful_logon
returns null for every sessionid
Upvotes: 1
Views: 147
Reputation: 2522
More than likely connection pool in action. If you do search on connection pooling, you can set it to "keep" lots of connections around for you. I think the default is 50. After a few minutes, provided you call con.close if will eventually release them.
Upvotes: 1