I have a database on SQL Server. My web application contacts this database. Is there a way in which I can restrict the number of connections to this database through some settings on the SQL Server?

  • 2
    What are you actually trying to accomplish? Commented Mar 26, 2014 at 2:16

3 Answers 3


Seems like we can do it :

To configure the user connections option

  • In Object Explorer, right-click a server and click Properties.
  • Click the Connections node.
  • Under Connections, in the Max number of concurrent connections box, type or select a value from 0 through 32767 to set the maximum number of users that are allowed to connect simultaneously to the instance of SQL Server.
  • Restart SQL Server.



I don't know such setting on the server level, but you can write the server-level trigger on connect action which will check the connections' count to the needed DB (bazed on DMVs) an, in case of over limit, will restrict the connection.


Also if you want to restrict number of concurrent connections then Resource Governor comes in handy. Can even tailor it to specific logins only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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