首页 > 代码库 > Oracle11gR2设置连接数process与会话session值

Oracle11gR2设置连接数process与会话session值

近日构建的Web应用用户数量有所上升,后台总是打印无法打开数据库连接的错误信息;

000000a3 SystemOut     O 2016 9月 28 08:59:24,486 ERROR  -  msg:打开数据库出错.

经查询发现需要更改数据库的连接进程数,修改方法如下:

1、以管理员身份登录sqlplus

win+R,输入cmd,然后回车。

在命令行中输入:sqlplus / as sysdba

2、查看连接进程数量设置值

命令:show parameter processes;

3、查看会话数量设置值

命令:show parameter sessions;

4、修改连接进程数量设置值

命令:alter system set processes=5000 scope=spfile;

 

操作记录:

C:\Users\Administrator>sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on 星期三 9月 28 11:57:26 2016Copyright (c) 1982, 2010, Oracle.  All rights reserved.连接到:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> show parameter processes;NAME                                 TYPE------------------------------------ ----------------------VALUE------------------------------aq_tm_processes                      integer0db_writer_processes                  integer1gcs_server_processes                 integer0global_txn_processes                 integer1job_queue_processes                  integerNAME                                 TYPE------------------------------------ ----------------------VALUE------------------------------1000log_archive_max_processes            integer4processes                            integer150SQL> show parameter session;NAME                                 TYPE------------------------------------ ----------------------VALUE------------------------------java_max_sessionspace_size           integer0java_soft_sessionspace_limit         integer0license_max_sessions                 integer0license_sessions_warning             integer0session_cached_cursors               integerNAME                                 TYPE------------------------------------ ----------------------VALUE------------------------------50session_max_open_files               integer10sessions                             integer248shared_server_sessions               integerSQL> alter system set processes=600 scope=spfile;系统已更改。

 

操作结果:

SQL> show parameter session;NAME                                 TYPE------------------------------------ ----------------------VALUE------------------------------java_max_sessionspace_size           integer0java_soft_sessionspace_limit         integer0license_max_sessions                 integer0license_sessions_warning             integer0session_cached_cursors               integerNAME                                 TYPE------------------------------------ ----------------------VALUE------------------------------50session_max_open_files               integer10sessions                             integer924shared_server_sessions               integerSQL> show parameter processes;NAME                                 TYPE------------------------------------ ----------------------VALUE------------------------------aq_tm_processes                      integer0db_writer_processes                  integer1gcs_server_processes                 integer0global_txn_processes                 integer1job_queue_processes                  integerNAME                                 TYPE------------------------------------ ----------------------VALUE------------------------------1000log_archive_max_processes            integer4processes                            integer600SQL>

Oracle11gR2设置连接数process与会话session值