Sql-server – Only one simultaneous connection per user

connectionssql serversql-server-2012

I'm currently experiencing some trouble, seemingly because my application refuses to connect to the database if there is already another connection open from the same user (but in a separate process).

Based on my observations, it doesn't seem to matter how many or few other users are connected, and @@MAX_CONNECTIONS is set to 0 (unlimited).

Is there any way such a connections-per-user limitation may have been defined on the database, and if so, how can I turn it off?

Here is my connection string:

[db]
sql=MS SQL
provider=SQLOLEDB.1
data source=foo\bar
connection=Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=foobar

As you might be able to discern from the above, we are connecting to the database using Microsoft OLE ADO. The application is an old VB6 legacy program.

By "refuses to connect" I mean that the method Open on the ADODB.Connection object fails.

Sadly, there is currently no log of the error output from this method in the production environment. I'm currently waiting for a patch to the application to be applied, to see if I can get extended information here.

Best Answer

Is there any way such a connections-per-user limitation may have been defined on the database, and if so, how can I turn it off?

You are using Microsoft SQL-Server. You can limit the Resources with the Resource Governor. Have a look at the Microsoft Documents. There you can see which options might be set and you should check. If there is a limitation, you may find it there.

Documentation: https://docs.microsoft.com/en-us/sql/relational-databases/resource-governor/resource-governor