Oracle数据库修改最大连接数
1.切换Oracle用户
sh-4.2# su - oracle
Last login: Tue Jun 14 15:42:47 UTC 2022 on pts/0
[oracle@af47d363d2a2 ~]$
2.以system用户身份登录数据库
[oracle@af47d363d2a2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 14 15:58:52 2022
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
或:
[oracle@af47d363d2a2 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 14 16:11:00 2022
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL>
3.查询数据库允许的最大连接数
SQL> select value from v$parameter where name = 'processes';
VALUE
--------------------------------------------------------------------------------
150
SQL>
4.修改数据库允许的最大连接数
(注:修改最大连接数之后,需要重启Oracle)
SQL> alter system set processes=2000 scope=spfile;
System altered.
SQL>
5.关闭Oracle服务
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
6.开启Oracle服务
SQL> startup
ORACLE instance started.
Total System Global Area 521936896 bytes
Fixed Size 2214936 bytes
Variable Size 364905448 bytes
Database Buffers 146800640 bytes
Redo Buffers 8015872 bytes
Database mounted.
Database opened.
SQL>
7.查询数据库允许的最大连接数是否生效
SQL> select value from v$parameter where name = 'processes';
VALUE
--------------------------------------------------------------------------------
2000
8.退出Oracle数据库
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@af47d363d2a2 ~]$