zoukankan      html  css  js  c++  java
  • ORA12518 TNS:监听程序无法分发客户机连接的解决办法

    环境:windows XP +Oracle 10g R2

    一、listener文件中的GLOBAL_DBNAME ,SID_NAME可能与实例名称不符,修改后,重启listener.

    二、专有服务器模式下processes值设的过小。

      可通过以下方法解决:

    1.cmd
    2.sqlplus
    3.connect sys/test as sysdba
    4.查看会话数、processes、sessions
    

      

    SQL> select count(*) from v$session;
             COUNT(*)
     
            ----------
               45

      

    SQL> show parameter processes
        NAME                                 TYPE        VALUE
        db_writer_processes                  integer     1
        gcs_server_processes                 integer     0
        job_queue_processes                  integer     10
        log_archive_max_processes            integer     2
        processes                            integer     50
    SQL> show parameter sessions
        NAME                                 TYPE        VALUE
        java_soft_sessionspace_limit         integer     0l
        icense_max_sessions                 integer     0
        license_sessions_warning             integer     0
        logmnr_max_persistent_sessions       integer     1
        sessions                             integer     60
        shared_server_sessions               integer
    

      5.修改processes和sessions值:sessions=(1.1*process+5)

        SQL> alter system set processes=300 scope=spfile;
       系统已更改。
      SQL> alter system set sessions=335 scope=spfile;
         系统已更改。
    

      6.重启数据库,使更改生效

      (不过我没有重启)

    三、共享模式下

    1.show parameters dispatchers;

    show parameters dispatchers;
    NAME TYPE VALUE
    dispatchers string (protocol=tcp)(service=oracle10xdb)
    max_dispatchers integer
    

    2.确定是否有足够的dispatchers

    SQL> select name, (busy/(busy + idle)) "dispatcher busy rate" from v$dispatcher ; 
    NAME dispatcher busy rate
    ---- --------------------
    D000 .000121704
    D001 .000042597
    D002 .004935402 
    如果超过50%,则需要考虑增加更多的dispatchers;
    

    3.改变dispathchers:

    SQL>alter system set dispatchers = '(protocol=tcp)(dispatchers=3)(service=oracle10xdb)';
    system altered
    

    四、PGA内存设置太小

    注:该方法没试过。

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

    按照如上我的解决方案:

    cmd调出命令行窗口

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\Administrator>sqlplus /nolog

    SQL*Plus: Release 10.2.0.1.0 - Production on 月 2月 20 13:45:30 2012

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    SQL> connect sys/test as sysdba
    Was connected to an idle instance.
    
    SQL> show parameters dispatchers;
    ORA-01034: ORACLE not available
    
    SQL> connect SYS/SYSADMIN as sysdba
    Was connected to an idle instance.
    
    SQL> select count(*) from v$session;
    
    SQL> show parameter processes
    
    SQL> alter system set processes=1000 scope=spfile;
    
    SQL> alter system set sessions=1100 scope=spfile;
    
    SQL> select  name, (busy/(busy + idle)) "dispatcher busy rate" from v$dispatcher ;
    

      重新登录就可以了

     

     

  • 相关阅读:
    余弦定理和新闻的分类
    关于复旦大学自然语言处理实验室的基准语料
    Where name like “MySQL%” ===> Where name>=”MySQL”and name<”MySQM”
    xcode4.2 IOS5 编译低于sdk4.3的程序的办法(转)
    CGContextRef相关的操作
    IOS5修改UIToolBar 和UINavigationBar 的背景颜色
    LLVM是个什么东东
    oneway在Xcode4的使用
    XCode4 App Store提交小结(转)
    怎么样才能方便的隐藏键盘
  • 原文地址:https://www.cnblogs.com/javadu/p/2359556.html
Copyright © 2011-2022 走看看