Get the App
SLTechnology News&Howtos  ›  Database  › 

The use of sessions_per_user when creating a profile:

Shulou Source: shulou.com Published: 2022-06-01 19:28:22 10月03日 Update

For example:

Create a profile for xiaoming while allowing two users to connect

SYS@ odb > create profile prof_xiaoming limit sessions_per_user 2

Profile created.

/ / the user is bound to profile

SYS@ odb > alter user xiaoming profile prof_xiaoming

User altered.

/ / Grant permission to create a session

SYS@ odb > grant create session to xiaoming

Then use this user to log in to several clients without reporting an error; question: here limit the number of login session to 2 why it is possible for the terminal to log in 3 or 4, and no error report is prompted.

It turns out that resource restrictions are not enabled.

SYS@ odb > alter system set resource_limit=true

System altered.

When you log in as xiaoming user again, you will be prompted to exceed the limit and cannot log in.

SYS@ odb > conn xiaoming/xiaoming

ERROR:

ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit

Warning: You are no longer connected to ORACLE.

@ >

Tags: Login user limit prompt two at the same time customer client quantity permission question terminal resource or Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Xiaomi MySQL Microsoft Docker