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