The use of sessions_per_user when creating a profile:
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.
@ >