1. Create a configuration that allows only one session for each user
SQL> Create profile one_session limit sessions_per_user 1;
The configuration file has been created.
Used time: 00: 00: 00.03
2. Specify the user to be restricted.
SQL> alter user Scott profile one_session;
The user has changed.
Used time: 00: 00: 00.01
3. Enable system resource restrictions
SQL> alter system set resource_limit = true;
The system has been changed.
Used time: 00: 00: 00.14
4. Test the First Login
SQL> connect Scott/Tiger
Connected.
5. Log On again
SQL> host sqlplus Scott/Tiger
SQL * Plus: Release 10.2.0.1.0-production on Sunday January 4 17:37:05 2009
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Error:
ORA-02391: exceeded simultaneous sessions_per_user limit
Enter the User Name:
Error:
ORA-01017: invalid username/password; login denied
Enter the User Name:
Error:
ORA-01017: invalid username/password; login denied
SP2-0157: Unable to connect to Oracle after 3 attempts, exit SQL * Plus
SQL>
SQL>
Test result successful