ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-12518: TNS: 监听程序无法分发客户机连接

ORA-12518: TNS: 监听程序无法分发客户机连接

原创 Linux操作系统 作者:wujianbo702 时间:2009-09-20 16:07:52 0 删除 编辑
ORA-12518: TNS: 监听程序无法分发客户机连接
今天在自己的T61上装了ORACLE10G,成功装好后,连数据库报如下错误:
SQL> conn sys/sys@my10g as sysdba
ERROR:
ORA-12518: TNS: 监听程序无法分发客户机连接
 
SQL> conn sjh/sjh@my10g
ERROR:
ORA-12518: TNS: 监听程序无法分发客户机连接
 
C:\Documents and Settings\is_sjh>tnsping my10g
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 12-3月 -
2008 19:59:46
Copyright (c) 1997, 2005, Oracle.  All rights reserved.
已使用的参数文件:
c:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora

已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = oracsjh)))
OK (20 毫秒)
 
TNSNAMES.ORA的内容如下:
MY10G =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = oracsjh)
    )
  )
 
listner.ora的内容如下:
# listener.ora Network Configuration File: c:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = c:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = oracsjh)
      (ORACLE_HOME = c:\oracle\product\10.2.0\db_1)
      (SID_NAME = oracsjh)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = WWW-D413A159A8B.nj.chervon.com)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )
 
一再检查没发现什么问题啊,后来用OS认证的方式连到DB上一看才知道自己犯了一个很低级的错误。INSTANCE NAME跟两个配置文件的配置不一样。将oracsjh改为跟数据库INSTANCE名一样:sjhorac
问题解决。为了证实自己的想法,我又让问题重现:
 
TNSNAMES.ORA的内容如下:
MY10G =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ABC)
    )
  )
 
listner.ora的内容如下:
# listener.ora Network Configuration File: c:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = c:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = ABC)
      (ORACLE_HOME = c:\oracle\product\10.2.0\db_1)
      (SID_NAME = ABC)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = WWW-D413A159A8B.nj.chervon.com)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )
 
将SERVICE_NAME ,GLOBAL_DBNAME ,SID_NAME 改为ABC。重起LISTENER。
TNSPING依然是可以的。
C:\Documents and Settings\is_sjh>tnsping my10g
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 12-3月 -
2008 20:47:52
Copyright (c) 1997, 2005, Oracle.  All rights reserved.
已使用的参数文件:
c:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora

已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = ORAC)))
OK (10 毫秒)
 
--问题重现:
SQL> conn sjh/sjh@my10g
ERROR:
ORA-12518: TNS: 监听程序无法分发客户机连接

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/165278/viewspace-615106/,如需转载,请注明出处,否则将追究法律责任。

上一篇: GROUPING SETS学习
下一篇: OpenSSL安装
请登录后发表评论 登录
全部评论

注册时间:2008-01-11

  • 博文量
    46
  • 访问量
    86947