Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
viperbyte
Posting Yak Master
132 Posts |
Posted - 2012-12-10 : 16:46:52
|
When I run the following script I get a session count of 85 for a particular login name. And that login name is the name of our inhouse application. We have about 15 to 20 users on that app, max. Shouldn't the session count be between 15 and 20? Shouldn't it be like one session ID for each instance of the running appication, or not necessarily?SELECT login_name, COUNT(session_id) AS [session_count] FROM sys.dm_exec_sessions WITH (NOLOCK)GROUP BY login_nameORDER BY COUNT(session_id) DESC; |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-12-10 : 17:12:21
|
Depending on your connection pooling and how your app calls the database, you could end up with multiple sessions for the same user. 85 is not a large number of connections for a single login, and unless you have hundreds or thousands of connections/sessions that you need to reduce it's not worth worrying about. |
|
|
viperbyte
Posting Yak Master
132 Posts |
Posted - 2012-12-10 : 17:24:30
|
Thanks. |
|
|
|
|
|