Solved

Database connections; Killing & Limiting

Posted on 2004-03-26
2
1,659 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

695 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