RE: Profile limit concurrent sessions for a user not limiting as expected

  • From: Pierre Labrousse <Pierre.Labrousse@xxxxxxxxxx>
  • To: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>, "jack@xxxxxxxxxxxx" <jack@xxxxxxxxxxxx>
  • Date: Wed, 17 Jan 2024 08:22:31 +0000

Hi,
I make a little test, and it works as expected :
SQL> create profile proftest limit SESSIONS_PER_USER  2;
SQL> alter user pierre profile proftest;
SQL> alter system set resource_limit=true;

First session for PIERRE:  OK
Second session for PIERRE : OK
Third session for PIERRE :
[oracle@vmoel8 ~]$ sqlplus pierre

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 17 09:13:09 2024
Version 19.18.0.0.0
Copyright (c) 1982, 2022, Oracle.  All rights reserved.
Enter password:
ERROR:
ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit
Enter user-name: pierre
Enter password:
ERROR:
ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit
Enter user-name: pierre
Enter password:
ERROR:
ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

So, I'm not able to connect more than 2 sessions with username PIERRE.

Are you sure you have defined RESOURCE_LIMIT to TRUE into your database because 
if it is defined to FALSE profile limits are not checked ?

Best regards.
Pierre





________________________________
De : oracle-l-bounce@xxxxxxxxxxxxx <oracle-l-bounce@xxxxxxxxxxxxx> de la part 
de Jack van Zanen <jack@xxxxxxxxxxxx>
Envoyé : mercredi 17 janvier 2024 03:57
À : oracle-l@xxxxxxxxxxxxx <oracle-l@xxxxxxxxxxxxx>
Objet : Profile limit concurrent sessions for a user not limiting as expected

Hi


We have an application and want to limit the number of sessions a user can open 
so are experimenting with the profile and setting "Concurrent sessions(Per 
user)" set to 2

When I start the application I can see one session, so far so good. I can start 
another one and that works fine too..However on the third one is where things 
do not behave as I expected. I correctly get the pop up that the sessions have 
exceeded the value for concurrent max sessions. But when I click "ok" I get an 
application logon error popup. When I click that it starts a third session and 
logs into the application just fine and leaves me with 3 working sessions in 
the database for my username. I was hoping to get just the error popup and that 
would be it.

Can anyone explain under what conditions does oracle allow me to have 3 
sessions when my max is set to 3?

database 12.2

Regards


Jack van Zanen

[https://ci3.googleusercontent.com/mail-sig/AIorK4yQICOylHHzc9znAw-l34V95kgrENYu8qCD72S0-GLocohoUBlcqXEnQ_QA3RPOSexT9XCTf_X6UJM2RhNQSqi3MPHy5D-tc9oNkOZtZg]
-------------------------
This e-mail and any attachments may contain confidential material for the sole 
use of the intended recipient. If you are not the intended recipient, please be 
aware that any disclosure, copying, distribution or use of this e-mail or any 
attachment is prohibited. If you have received this e-mail in error, please 
contact the sender and delete all copies.
Thank you for your cooperation

Other related posts: