Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Database connections; Killing & Limiting

Posted on 2004-03-26
2
Medium Priority
?
1,663 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 1500 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

An overview of cyber security, cyber crime, and personal protection against hackers. Includes a brief summary of the Equifax breach and why everyone should be aware of it. Other subjects include: how cyber security has failed to advance with technol…
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

618 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