Add User restrictions in Oracle

Source: Internet
Author: User

During project development today, we found that there are too many database connections and many timeout connections exist in Oracle. As a result, the new client cannot connect to the database. Therefore, the oracle connection attribute is forcibly released.

The settings are described as follows:

Sqlplus/nolog
Open sqlplus
Connect system/bianqiwei @ orcltns as sysdba
Use a user with dba permission to log on to oracle
Show parameter resource_limit
Whether the resource limit is enabled. If the value is true, it is enabled. If the value is false, it is disabled.
Alter system set resource_limit = true
If not, use this command to enable the resource restriction function.
Create profile profileName limit connect_time 60 idle_time 30
Create a profile file with any profileName. _time sets the number of minutes after the connection is exceeded, and idle_time sets the number of minutes after the continuous inactive sessions are forcibly released.
Alter user oracleUser profile profileName
Apply the profile file to the specified user [LINUX community www.LinuxIDC.com]

The actual operations in the database are as follows:

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit Production
With the Partitioning, OLAP and Data Mining options
[Oracle @ nsn-db-server ~] $ Sqlplus "/as sysdba"

SQL * Plus: Release 10.2.0.1.0-Production on Tue Dec 22 16:14:11 2009

Copyright (c) 1982,200 5, Oracle. All rights reserved.


Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> show parameter resource

NAME TYPE
---------------------------------------------------------------------
VALUE
------------------------------
Resource_limit boolean
FALSE
Resource_manager_plan string

SQL> alter system set resource_limit = true;

System altered.

SQL> create profile sbaplimit20091222 limit connect_time 60 idle_time 30
2
SQL> create profile sbaplimit20091222 limit connect_time 60 idle_time 30
2
SQL>
SQL> create profile sbaplimit20091222 limit connect_time 60 idle_time 30;

Profile created.

SQL> alter user sbsbp profile sbaplimit20091222 _;

User altered.

SQL> exit

Related Article

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.