November 19, 2001 at 3:54 am
Can someone help me with the following problem:
I like to limit the number of users working together on a specified Database.
I like to do it with a job that runs every minute.
I have several servers shared by different applications. I know I can limit the number of connections on server level but I need this on Db level too. I'm only a DBA not an application developer. Dba resources are bought based on disk space and number of users by the application groups.
Can someone help me?
Edited by - Ludo Bernaerts on 11/19/2001 04:30:49 AM
Edited by - Ludo Bernaerts on 11/19/2001 04:31:56 AM
November 19, 2001 at 4:20 am
Don't know if it will be suitable for your case, but there is a simple way of doing this. You could login users of your application using an sp. This sp queries the sysprocesses table and looks at columns such as dbid, uid, loginname to find out the current number of connections in the database. Using these totals, the sp decides whether to allow login. This also avoids the use of a job - which would potentially be an unnecessary use of resources.
Paul Ibison
Paul Ibison
Paul.Ibison@replicationanswers.com
November 19, 2001 at 9:56 am
I'd agree with Paul, though I'd recommend building a table (can be temp) and dropping the results of sp_who2 into it. Then you can get a list of users.
You could even run this when a user connects and the app could disconnect if "too amny" users are already connected.
Steve Jones
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply