Solved

Database connections; Killing & Limiting

Posted on 2004-03-26
2
1,651 Views
Last Modified: 2008-02-01
Two questions: (I will split the points between both answers)

In reference to Sybase 11

1. (How) Can I limit the number of connections a single user can have at one time?

2. (How)  Can I auto kill an inactive connection after X minutes?

0
Comment
Question by:htarlow
2 Comments
 
LVL 3

Accepted Solution

by:
ahoor earned 500 total points
ID: 10691930
About question 1.... you can do this only in an application. If your application checks whether the user is connected the end with an errormessage. Or you should run a procedure every given time to check for double user id's logged in and kill one, but then you don't know which to kill and there is a limited time a user can have 2 connections.

Question 2.... again something for your application, fill a logtable with user id and login time, and delete this row after diconnecting. Then run a procedure every given time to kill any process present in the logtable and active for a longer time then allowed.

I wonder why you would want to do any of this... well the first maybe, but that's easy to build in any application.

You have to ensure unique login-name for every user though to find them in the sysprocesses table.

Arjan
0
 
LVL 10

Expert Comment

by:bret
ID: 10705101
Another thing you can do is upgrade to ASE 12.5.x.   Then you can take advantage of login triggers (to control the number of connections any one login has) and use the sp_idlereaper stored procedure (based on the MDA tables) to handle idle processes.
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Adding Computers to AD groups through an SCCM Task Sequence
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question