Solved

Database connections; Killing & Limiting

Posted on 2004-03-26
2
1,646 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now