今天在切换程序时,oracle报如下错误
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
查看一下错误信息
[oracle@localhost ~]$ oerr ora 12519
12519, 00000, "TNS:no appropriate service handler found"
// *Cause: The listener could not find any available service handlers that
// are appropriate for the client connection.
// *Action: Run "lsnrctl services" to ensure that the instance(s) have
// registered with the listener, and are accepting connections.
从上面的错误信息可以看出,是由于用户请求时没有可用的连接了。这时才想起程序大概有500个线程同时向数据库插入数据,而建库时默认为300,显然不够用,把连接数设置为800,错误就不存在了。
处理过程:
-
以DBA身份登录数据库,select count(*) from v$session;查看当前所有连接数,show prameter processes;查看最大连接数
-
修改processes参数为800,alter system set processes=800 scope=spfile;
-
重起数据库
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26543945/viewspace-748246/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26543945/viewspace-748246/