Frage

I can't seem to find the way to avoid ORA-2391 "exceeded simultaneous SESSIONS_PER_USER limit" when working with DBeaver 4.3.3.1. Everytime my session goes idle and I need to recconect I'm getting this error. I'm not sure if this is a DBeaver issue or I am missing something in my Oracle connection configuration.

I already talked with DBA and he showed me that whenever I connect to my database DBeaver creates two sessions (two rows in table v$session) and when he tries to kill them, they hang out for a while until they finally go away and I can connect again.

I am sure I don't have any other session opened with any other tool.

My goal is to keep working with DBeaver since this tool has some amazing features, but without having to bother my DBA everytime I can't connect due to simultaneous sessions.

If there could be any way to stop DBeaver from creating more than one session for just one connection, I will appreciate any help.

PS:(I hope I'm clear with my question, English is not my native language)

War es hilfreich?

Lösung 2

I found the solution thanks to Balazs. There are a couple of options in the Preferences window that could generate multiple sessions.

  • The first one is at Preferences > General > Editors > SQL Editor, Connections group and "Open separate connection for each editor" option.
  • The other one is at Preferences > Database > Metadata, Metadata group and "Open separate connection for metadata read" option.

Both options must be unchecked in order to avoid creation of multiple sessions for same connection, therefore to avoid ORA-02391 error.

Andere Tipps

ORA-02391 is caused by the SESSIONS_PER_USER limit in the profile your user belongs to.

create profile p1 limit SESSIONS_PER_USER 1;
create user u1 identified by u1 profile p1;
grant create session to u1;

SQL> connect u1/u1
Connected.

Now try logging in another session:

$ sqlplus /nolog

SQL> connect u1/u1
ERROR:
ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit

SQL>

I do not know DBeaver but I found this:

enter image description here

Or you could just have the limit increased for your user by the DBA:

SQL> select profile from dba_users where username = 'U1';

PROFILE
-------
P1

SQL> select limit from dba_profiles where profile = 'P1' and resource_name = 'SESSIONS_PER_USER';

LIMIT
-----
1

SQL> alter profile p1 limit SESSIONS_PER_USER 5;

Profile altered.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit dba.stackexchange
scroll top