Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Experts,
I need your valuable Suggetions/guidance about sql server connection.

Actually i am creating online test application in c# windows forms and there will be maximum of 200 pcs and in every pc i will install this application.
my connection string for every pc is same:
C#
Data Source = xxxxxxx; Initial Catalog = xxx; Integrated Security = False; User ID = 123; Password = 123@123

I open connection at login time and dispose it when application exit(never close in between them)

For backup purpose:
When user start test, i save student answer for the selected questions into database if user select an option. on other hand application update test time left in every seconds to database again.

My question is:
will there be any problem(deadlock/blocking/any other) occured if 200 pc using same connection string to open connection?

What I have tried:

I am not sure about if problem will occured or not.
Posted
Updated 14-Dec-16 20:57pm

1 solution

Depends on the SQL configuration - there is an option to restrict the max simultaneous connections: Configure the user connections Server Configuration Option[^]
But, the max you can have is theoretically 32,767 so 200 shouldn't be a problem, provided the hardware and bandwidth is up to it. In practice, you won't have nearly as many as 200 connections busy at the same time - you can't coordinate the PC's to talk at the exact same time anyway, because Windows is a preemptive multitasking OS, so you have no control over what threads are running across the machine at any specific time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900