Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

we have an IIS web farm (two servers at the moment) set up to use SQL ASP State for the Session info. When I query the ASP State database table I can see the number of sessions being managed by the database.

Is there an associated Performance monitor that I can use to get the same information or is the best way to do it via a SQL Query?

I've tried setting up perfmon on the Web servers and the SQL Server and monitored everything that even sounds like Session, including:

\\WebServerA\ASP.NET Apps v2.0.50727(__Total__)\Session SQL Server connections total
\\WebServerA\ASP.NET Apps v2.0.50727(__Total__)\Sessions Active
\\WebServerB\ASP.NET Apps v2.0.50727(__Total__)\Session SQL Server connections total
\\WebServerB\ASP.NET Apps v2.0.50727(__Total__)\Sessions Active
\\WebServerB\ASP.NET State Service\State Server Sessions Active
\\WebServerB\ASP.NET v2.0.50727\State Server Sessions Active
\\SQLServer\ASP.NET Apps v2.0.50727(__Total__)\Session SQL Server connections total
\\SQLServer\ASP.NET Apps v2.0.50727(__Total__)\Sessions Active
\\SQLServer\ASP.NET State Service\State Server Sessions Active

All counters remain on 0 while running a performance test simulating 50 users, while at the same time I can see 50 sessions being created by querying the SQL session table.

Edit: The "Session SQL Server connections total" counters on the Web Servers do go up when the test is running, but it doesn't actually track the number of users (obviously, I know, but I was hoping for something)

share|improve this question
add comment

2 Answers

Your best bet will be to query the SQL Server as this will be the most reliable information as the database is the authoritative source of this information at this point.

share|improve this answer
1  
Will that not affect the performance of the ASP State Database? Since this is the central state store for all servers in the farm, it obvioulsy needs to be fast. Are you telling me that there simply is no performance counter for this or were you just giving your opinion? –  Gineer Aug 14 '09 at 11:26
    
SQL Won't provide a counter, and that would be the only server that has all the information about all the web servers in the farm. It shouldn't slow down the database as the ASPState database is very small, and it should all be sitting in the SQL Server Buffer Cache. –  mrdenny Aug 14 '09 at 22:26
add comment
up vote 0 down vote accepted

I've done a simlar search on http://msdn.microsoft.com/newsgroups and found the same answer there: How to count the active ASP.NET Sessions (SQL Server)?

It Seems that querying SQL is the only way to get this information. I suppose the only other way to do this would be to create a custom performance counter. I figure if that was a good idea, Microsoft would have simply created the counter?!? No?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.