• ORA-12519, TNS:no appropriate service handler found


    OERR: ORA-12519 TNS:no appropriate service handler found

    客户端连接间歇性失败,报错ORA-12519

    Cause: the listener could not find any available service handlers that are 
           appropriate for the client connection.

    Action:  检查lsnrctl service ,instance已经注册,状态显示ready时,可以连接。

    When the listener believes the current number of connections has reached maximum load, 
    it may set the state of the service handler for an instance to "blocked" and begin refusing 
    incoming client connections with either of the following errors: ora-12519 or ora-12516

    采用服务动态注册的方式,由PMON 通过SERVICE_UPDATE 来得到目前连接情况,但SERVICE_UPDATE 有时间间隔,
    所以,listener显示的连接数和当前实际的连接数可能不同。

    查询解决方法:

    查看一下数据库现有的进程数,是否已经达到参数processes的大小。

       1.select count(*) from v$process;                         取得数据库目前的进程数。
    2.select value from v$parameter where name = 'processes'; 取得进程数的上限。
    3.如已达到上限,修改initSID.ora中的processes的大小。
    4.重新启动数据库到nomount状态下,执行create spfile from pfile; 并startup open。

    查询数据库自启动以来最大的并发数量

    select * from v$license

    =====================================================================================

    在压力测试的时候,JDBC连接出现了ORA-12519错误。

    连接是报错如下:

    <2008-8-23 上午01时34分38秒 CST> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for pool "rac11g1": Listener refused the connection with the following error:

    ORA-12519, TNS:no appropriate service handler found

    The Connection descriptor used by the client was:

    172.0.2.58:1521:rac11g1

    检查了半天metalink,最终发现是由于Oracle初始化参数的设置问题导致了bug。

    SQL> SHOW PARAMETER SESSION

    NAME TYPE VALUE

    ------------------------------------ ----------- ------------------------------

    java_max_sessionspace_size integer 0

    java_soft_sessionspace_limit integer 0

    license_max_sessions integer 0

    license_sessions_warning integer 0

    session_cached_cursors integer 50

    session_max_open_files integer 10

    sessions integer 600

    shared_server_sessions integer

    SQL> SHOW PARAMETER PROCESS

    NAME TYPE VALUE

    ------------------------------------ ----------- ------------------------------

    aq_tm_processes integer 0

    db_writer_processes integer 2

    gcs_server_processes integer 2

    global_txn_processes integer 1

    job_queue_processes integer 1000

    log_archive_max_processes integer 4

    processes integer 150

    根据Oracle文档,SESSIONS和TRANSACTIONS的初始化参数应该源于PROCESSES参数,根据默认设置SESSIONS = PROCESSES * 1.1 + 5。

    但是目前SESSIONS的设置达到了600,而PROCESSES的设置没有改变,仍然为150,导致了过多的用户会话连接到Oracle上时,Oracle没有足够的后台进程来支持这些会话。

    详细的问题描述可以参考metalink的文档:Doc ID: Note:240710.1。

    解决方法很简单,直接设置合适的PROCESSES产生就可以了。

    =====================================================================================

    修改process的值的方法二(针对LINUX系统):

    先到ORACLE_BASE/admin/你的实例名/profile/目录下找到一个init.ora的文件,然后修改里面的process的值,然后将该文件拷贝到ORACLE_HOME/dbs目录下,并将文件重命名为initorcl.ora(其中的orcl为你的数据库实例名,我的数据库实例为orcl所以命名为 initorcl.ora)

    用sys用户同时以sysoper身份登录sqlplus

    即 sqlplus sys/sa as sysoper;

    进入SQLPLUS后,先把数据库关闭,可以使用shutdown abort命令,也可以使用shutdown immediate命令,推荐使用shutdown abort命令。然后使用命令startup force即可,说白了就是重启数据库。

  • 相关阅读:
    Symbol
    对象的附加属性
    怪异盒模型
    javascript的三大组成部分
    让目标对象滚动到视口位置
    隐藏单个盒子的滚动条
    uni-app判断有没有安装这个app,如果有的话直接打开,没有的话跳转到下载页面
    js 读取json文件
    openlays 使用 svg标注,动态修改svg颜色
    iview table组件内容过多用“...”代替,鼠标悬停显示全部内容
  • 原文地址:https://www.cnblogs.com/andyboy/p/3191573.html
Copyright © 2020-2023  润新知