Nick O
Nick O

Reputation: 3826

Maximum number of connection to SQL Server database

What is the maximum number of connections to SQL Server 2005 for one user? I'm having a problem with C# code trying to make multiple connection to the database in different threads. After about five threads the connections in other threads start timing out. If i knew the exact number of connection for one user, even if it was one, would help with knowing how many threads I can have loading at one time.

Upvotes: 1

Views: 4821

Answers (3)

Philip Kelley
Philip Kelley

Reputation: 40309

A long shot, 5 connections sounds like you might have licensing issues. Is the SQL instance you're using limited to the number of concurrent connections? (This is not something I've ever had to deal with. I know there are CAL licensing plans, and that there may be limits if you are using SQL Server Express edition.)

Upvotes: 3

TheTXI
TheTXI

Reputation: 37885

More so than the number of connections allowed per user, it may do you better to make sure you are effectively closing your connections as soon as you are done with them to make sure that the connection pool does not get used up too quickly.

Upvotes: 0

Otávio Décio
Otávio Décio

Reputation: 74250

5 connections and you start to timeout? That smells like connections not being closed and/or concurrency issues (locks/deadlocks). I have services that spawn threads and generate upwards of 100 connections without any problems.

Upvotes: 4

Related Questions