2

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?

1
  • 2
    What are you actually trying to accomplish? Mar 26 '14 at 2:16
2

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.

http://technet.microsoft.com/en-us/library/ms187030.aspx

0

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.

0

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, privacy policy and cookie policy

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