Re: How to Restrict SQL Sessions by Time...?

From: Dave <jazmanius_at_my-deja.com>
Date: Tue, 30 Nov 1999 11:30:27 GMT
Message-ID: <820cgk$86b$1_at_nnrp1.deja.com>


You could restrict logins to a particular OS account to 1000-1400, then when the users want sql+ they simply "su -" to the restricted account which can (a) fail outside the allotted hours and (b) be easily killable by cron at 1400.

Alternatively you could get cron looking at processes every 5 minutes or so killing off sql+ sessions outside the permitted hours, although that's not very nice (and allows on average 150 seconds of unauthorised use). Perhaps sql+ could be made available only through a script which itself can check the time. sql+ could be only runnable by members of a particular group, i.e. -r-xr-x--- and that script could add the user to the appropriate group and remove them at the end.

You've also got to think about what you want to happen at 1400. What if someone's in the middle of a big transaction? You wouldn't want them unceremoniously dumped by the OS at least until they'd finished that transaction. Or do you just want them unable to login after 1400 but thereafter they can hang around as long as they like?

In article <80rhrt$qcb$1_at_nnrp1.deja.com>,   masyedkasim_at_hotmail.com wrote:
> Hi,
>
> Is it possible to restrict sql sessions by time period...?
> For example, users can connect to their sessions only between
> 10 AM and 2 PM. I would be very much thankful to you if any one
> of you give me an answer.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Nov 30 1999 - 12:30:27 CET

Original text of this message