今天开发人员说JDBC出现下列问题:
有时候连得上数据库,有时候又连不上.
可能是数据库上当前的连接数目已经超过了它能够处理的最大值.
SQL> select count(*) from v$process;--当前连接数
COUNT(*)
63
SQL> select value from v$parameter where name = 'processes' --数据库允许的最大连接数
VALUE
500
修改最大连接数:
SQL> alter system set processes = 2000 scope = spfile;
重启数据库:
SQL> shutdown immediate;
SQL> startup;
查看哪些用户在使用数据库
SELECT osuser, a.username,machine
from v$session a, v$sqlarea b
where a.sql_address =b.address;
还可以参考下列链接的内容和错误信息
http://blog.youkuaiyun.com/jackpk/archive/2010/04/12/5476911.aspx
http://www.itpub.net/thread-624935-1-1.html#