ORA-12519, TNS:no appropriate service handler found

利用java连接数据库进行大量数据的读写时(每次读写时都重新连接数据库--相当于有多个客户端同时要连接数据库),有时候正常,有时候会出现如下异常:

java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
The Connection descriptor used by the client was:
192.168.95.86:1521:orcl


at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)GpsDaoProxy.doCreate()

原因:可能是数据库上当前的连接数目已经超过了它能够处理的最大值.

(1)select count(*) from v$process   --查看数据库当前的连接数

ORA-12519, TNS:no appropriate service handler found_第1张图片
(2)select value from v$parameter where name = 'processes'   --数据库允许的最大连接数

ORA-12519, TNS:no appropriate service handler found_第2张图片

你可能感兴趣的:(ORA-12519, TNS:no appropriate service handler found)