近日构建的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 sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期三 9月 28 11:57:26 2016 Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: 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> show parameter processes; NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ aq_tm_processes integer 0 db_writer_processes integer 1 gcs_server_processes integer 0 global_txn_processes integer 1 job_queue_processes integer NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ 1000 log_archive_max_processes integer 4 processes integer 150 SQL> show parameter session; NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ java_max_sessionspace_size integer 0 java_soft_sessionspace_limit integer 0 license_max_sessions integer 0 license_sessions_warning integer 0 session_cached_cursors integer NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ 50 session_max_open_files integer 10 sessions integer 248 shared_server_sessions integer SQL> alter system set processes=600 scope=spfile; 系统已更改。
操作结果:
SQL> show parameter session; NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ java_max_sessionspace_size integer 0 java_soft_sessionspace_limit integer 0 license_max_sessions integer 0 license_sessions_warning integer 0 session_cached_cursors integer NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ 50 session_max_open_files integer 10 sessions integer 924 shared_server_sessions integer SQL> show parameter processes; NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ aq_tm_processes integer 0 db_writer_processes integer 1 gcs_server_processes integer 0 global_txn_processes integer 1 job_queue_processes integer NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ 1000 log_archive_max_processes integer 4 processes integer 600 SQL>