ORA-12519:TNS:no appropriate service handler found 的解决方法

基本 象:

Windows XP Oracle 10g 境下跑 Java 程序的 Junit 测试 用例 当跑到 120 几个 JunitTest 就会 如下 错误 ,中 似乎有个很短的停 刷新,然后又可以正常跑后面程序

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

 

调查 原因:

可能是数据 中当前的 接数目已 了它能 够处 理的最大

 

解决方案:

1 DB 当前 接数:

SQL> select count(*) from v$process;   -- 当前 接数

               COUNT(*)

               28

 

2 DB 的最大 接数:

SQL> select value from v$parameter where name = 'processes' ;   -- 数据 的最大 接数

               VALUE

              150

 

Oracle 安装 接数默 150 发现 DB 接数已 足程序 继续 往下 的需求了,所以会出 "Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found" 所以 里需要修改 DB 接数来确保 JunitTest 的正常运行

 

3 .修改最大 接数:

SQL> alter system setprocesses = 1000 scope = spfile ;   -- 修改最大 接数

 

4 .重启数据

SQL> shutdown immediate ;

SQL> startup;

 

---------------------------------------------------------------------->>>分割线<<<---------------------------------------------------------------------

 

-- 看当前有哪些用 正在使用数据

select osuser, a.username, cpu_time/executions/1000000 ||'s' , sql_fulltext, machine

from v$session a, v$sqlarea b

where a.sql_address = b.address

order by cpu_time/executions desc ;

 

 

猜你喜欢

转载自itping.iteye.com/blog/1554402