Number of open connections SQL server
Normally, when you’re coding on a website or a system you’re probably using connection to an SQL server database.
When you are the coder or you are a consultant coming to a company to check the code or the server or anything else for that matter, you sometimes need to check the number of connections that are open right now.
This can be done to check the quality of the code regarding connections. If the code does not close the connections, eventually the server will close the pool and the website will no longer work. I have seen people solving that by upping the number of allowed open connections. That of course is not the solution (not the best solution).
OK, so if you are like me and you are running 1-9 servers that are dedicated to you, each running dozens or hundreds of DB’s, this is an absolutely great method to catch a glimpse on whats going on with your connections.
Run this code on your server and see what happens:
REXML could not parse this XML/HTML: