问题场景描述:程序部署上线之后发现程序报错,tomcat的console里面如图:
ora错误初步判断为数据库连接数过小引起的。尝试解决方法:
一、通过sql查询数据库目前的processes的大小。
1. select count(*) from v$process; //取得数据库目前的进程数。
2. select value from v$parameter where name = 'processes'; //取得进程数的上限。
2. select value from v$parameter where name = 'processes'; //取得进程数的上限。
二、 查看当前会话数、processes和sessions值。
cmd:sqlpuls / as sysdba
三、 修改processes和sessions值。
SQL> alter system set processes=300 scope=spfile;
系统已更改。
SQL> alter system set sessions=335 scope=spfile;
系统已更改。
系统已更改。
SQL> alter system set sessions=335 scope=spfile;
系统已更改。
四、 重启数据库。
shutdown normal//正常情况下关闭数据库 immediate abort
startup//启动数据库