Limit the number of sessions in Oracle)

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.