Solved

Database connections; Killing & Limiting

Posted on 2004-03-26
2
1,657 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Facebook has became the #1 social media platform. People share many funny videos there, yet you don't know how to download them? Now you can download Videos from Facebook in just 3 simple steps.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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