Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO RESTRICT NUMBER OF USERS TO APPLICATION

Status
Not open for further replies.

vassoft

Programmer
Jun 12, 2002
18
MY
hai

For my VB Project we are using SQL SERVER as Backend.
I need to find out the no of users who are accessing the database.

i need to restrict my application to 5 users can make use the at a time. If no.of users are more than five my application sholud not allow the next user.

I am trying for this from past 2 days.
THANKS IN ADVANCE>

VASU


 

If you have query analyzer on your system...open it up and type in

[tt]SP_WHO[/tt]


 
Problem is that would take a licence up thus limiting his app to 4.

I take it you are using MSDE which is free and has suggested 5 user limit?

If this is the case then do this. Have your app execute a SP_WHO and if it has more than 5 rows give a message and exit.

This is because MSDE has a recomended limit of 5 connections but does not stop you hfrom having 500....just performance stinks because it has been "Tuned for 5 connectiohns.

If you are using a full blown SQL server and only have 5 licences then all you can do is try to connect and if you have a time out then inform the user.
 

SemperFiDownUnda,

SP_WHO will also always return more than 5 records since it even reports the log writer, signal handler, lock monitor, lazy writer, task manager (>10), checkpoint sleep, and users (usually have more than one record in SP_WHO). The reason to use query analyzer is vassoft could see the results and figure out how to use it to their advantage.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top