Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Auto Logoff / Limit User Connections ????

Re: Auto Logoff / Limit User Connections ????

From: Howard J. Rogers <howardjr_at_www.com>
Date: 2000/08/06
Message-ID: <398ce3d2@news.iprimus.com.au>#1/1

Hi Chuck,

Sounds like you need to create a profile.

Or, perhaps, given that you sound like you haven't used these before, and therefore all your Users will be sitting there in possession of the Default Profile, it's time to edit the Default Profile.

Two profile settings will do what you are after. SESSIONS_PER_USER will (hopefully obviously!) prevent any User who has been given the relevant profile from connecting more than the specified number of times to the same Instance. And CONNECT_TIME governs how long a session may be connected before it is terminated (and is measured in minutes -so if you want to allow a generous 10 hours of connection time, you'd set CONNECT_TIME to 600 minutes).

So, you can either create anew profile thus: CREATE PROFILE NEWONE LIMIT
SESSIONS_PER_USER 1
CONNECT_TIME 600; Then you have to do this: ALTER USER MARY PROFILE NEWONE; (and so on for all your Users.

Or, if you don't think you've used profiles before, then all your Users will probably be sitting there with the Default Profile. So instead of creating a new profile, just edit the default, like this:

ALTER PROFILE DEFAULT LIMIT
SESSIONS_PER_USER 1
CONNECT_TIME 600; In either case, note that profiles are totally unenforced until you specifically 'switch them on'. The quick fix is to issue the command "Alter system set resource_limit=TRUE;", but that only enables them for the lifetime of the Instance. So to ensure that profiles are enforced every time you bounce your Instance, you need to add the line "RESOURCE_LIMIT=TRUE" to your init.ora.
.
Just watch out when limiting things like Connect Time -the User's session will be terminated when s/he hits the specified number of minutes, whether or not s/he is in the middle of some important update or other -and hence, you risk their pending transactions being rolled back, which might not make you the most popular DBA of their acquaintence!

For that reason, I sometimes suggest setting (either as well as or instead of!) IDLE_TIME in the profile. That is measured in minutes, and will terminate a session if the User's Server Process has been sitting there idle for the relevant amount of time. A common setting I've used a fair bit is IDLE_TIME=120 (ie, two hours). Given that an idle server process is genuinely sitting there doing nothing, it suggest that the User isn't really doing anything terribly important either, so in some ways it is perhaps a little 'safer' to set than plain old CONNECT_TIME. On the other hand, if a User starts a transaction, then leaves for lunch with the thing uncommitted, it is again possible to discover upon return from lunch that the session has been terminated -because the server process was sitting there doing nothing during lunch too!

Incidentally, DBA_USERS will tell you what profiles are attached to each User of your system.

Hope that is of some use,
HJR "Chuck Rizzio" <carizzio_at_snet.net> wrote in message news:fMBi5.1664$xH6.424824_at_typhoon.snet.net...
> I have two questions...
>
> We are running Oracle Applications version 10.7 Smart Client. Datavase
> version - 7.3.4.5.
>
> First, we have users who constantly leave at the end of the day without
> loggin out of Oracle Apps. Frequently, they leave records on their
 screens
> causing locks which prevent other processes from accessing the data. Is
> there any way to institute automatic logoff where we can set some time
 limit
> (i.e. 30 minutes) of inactivity to terminate the connection?
>
> Second, we have users that insist on running more than once "instance" of
> the client. They claim that need to in order to do their jobs. They need
> access to data in different areas (i.e. customer data and purchasing data)
> and say that having to use one session and go from one are to another
 takes
> too long. Is there a way to limit a user to only one connection frome
> either the same machine or for the user logon?
>
> Please reply to my email address (carizzio_at_hotmail.com) as well as the
> newsgroup as I don't get here very often. Thanks.
>
> Chuck
>
>
Received on Sun Aug 06 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US