Server side checks (not platform specific):

1)  Check the result on the server using tnsping to the listener address:

tnsping "(address=(protocol=TCP)(host=insert host or ip address here)(port=insert listener port here))"

Should yield 'ok'.

2)  Launch lsnrctl and test both status and services:

LSNRCTL>set current_listener <listener name>

LSNRCTL>status

LSNRCTL>services

3)  If the instance is running in SHARED SERVER mode, the dispatchers might be getting
spawned on random ports.  If a shared client connection fails, test the same client using
a DEDICATED connection:

Example of SERVER=DEDICATED usage in a TNS connect descriptor:

ORACLE_DB=    
   (DESCRIPTION=
        (ADDRESS=(protocol=TCP)(host=insert host or ip address here)(port=insert listener port here))
     (CONNECT_DATA=(SERVICE_NAME=insert service name here)(SERVER=DEDICATED))
   )

After including the (SERVER=DEDICATED) setting in the connect string, try again to connect using:

sqlplus myuser@ORACLE_DB

If this succeeds using a DEDICATED server and fails with a SHARED server, it is likely the firewall is blocking 
the connection to the DISPATCHER port.   It is possible to run dispatchers on pre-defined ports for shared
server usage in environments with firewalls.

Here's an example of the DISPATCHERS spfile parameter configured to spawn on ports 5000,5001 & 5002):

dispatchers="(address=(partial=true)(protocol=tcp)(host=your host)(port=5000))(dispatchers=1)"

dispatchers="(address=(partial=true)(protocol=tcp)(host=your host)(port=5002))(dispatchers=1)"

dispatchers="(address=(partial=true)(protocol=tcp)(host=your host)(port=5003))(dispatchers=1)"

Note that the client would require that these ports are open as well as the listener port in 
order for a SHARED connection to be successful.

UNIX:

1)  Grep for tns listener process.

ps -ef | grep tns

Confirm the listener process is present.

Confirm the listener is running under:

A)  The correct name (LISTENER, LISTENER_SCANx, etc)

B)  The correct $ORACLE_HOME/bin (GRID, RDBMS_HOME)

2)  Check netstat output and confirm the port/address:

netstat -an | grep <listener port here>

See LISTEN process:

Example.

netstat -an | grep 1521 | grep LISTEN

LISTEN process on wildcard address using port 1521:

tcp        0      0 0.0.0.0:1521               0.0.0.0:*                   LISTEN

Windows:

1)  Check netstat at command line:

Example:

netstat -an |find /i "LISTEN"

Confirm LISTEN process in output for IP and listener port:

TCP    0.0.0.0:1521           0.0.0.0:0              LISTENING

netstat -an | find "1521"   (Replace 1521 with your actual listener port)

2)  Check Control Panel Services for TNS Listener service.  Confirm that it's
started and that the listener name matches listener used in LSNRCTL commands
above.

 

Client side checks:

1) tnsping "(address=(protocol=TCP)(host=server hostname here)(port=listener port here))"

2) Telnet host port  Where host is the server where the listener is running and port is the listener's port:

Example of a failure:

C:\Users\Oracle>telnet myhost 1521
Connecting To myhost...Could not open connection to the host, on port 1521: Connect failed

SCAN & RAC Specific:

1)Confirm that remote clients are able to connect to BOTH SCAN listener endpoints (all 3)
and all VIP listener endpoints by using tnsping.  Follow this example to test route to ALL
VIP and SCAN listener endpoints.

tnsping "(address=(protocol=TCP)(host=SCAN ip address 1 here)(port=SCAN port here))"

tnsping "(address=(protocol=TCP)(host=SCAN ip address 2 here)(port=SCAN port here))"

tnsping "(address=(protocol=TCP)(host=SCAN ip address 3 here)(port=SCAN port here))"

tnsping "(address=(protocol=TCP)(host=VIP ip address 1 here)(port=VIP listener port here))"

tnsping "(address=(protocol=TCP)(host=VIP ip address 2 here)(port=VIP listener port here))"

Each tnsping should yield an 'OK'

The following document contains a high level diagram of SCAN to VIP listener "redirection".  
It is clear that the client MUST have a route via TCP to ALL listener endpoints (except physical) in 
the cluster.

http://www.oracle.com/technetwork/database/clustering/overview/scan-129069.pdf

2) Check the LOCAL_LISTENER and REMOTE_LISTENER settings for the instances and confirm that
they are correctly set and all addresses to which they point are reachable from the remote client
hosts:

SQL>show parameter LOCAL_LISTENER;

SQL>show parameter REMOTE_LISTENER;

Finally, if the Client gets a "no listener" yet the Listener is running on the above address (and a tnsping against the same
connection when local on the DB server is successful) then check for any Network "blocks".
For example, a Firewall may be blocking the TCP communication which the System Admin would need to correct.

__________________________________________________

If Oracle support is needed to continue to troubleshoot this problem:

Generate an Oracle Net level 16 (support) client trace using the following instructions:

Add these parameters to the sqlnet.ora file that would be referenced by the client in this case:

TRACE_LEVEL_CLIENT=16
TRACE_DIRECTORY_CLIENT=<dir location>
TRACE_TIMESTAMP_CLIENT=TRUE
DIAG_ADR_ENABLED=off

Reproduce the problem and provide the client traces to support for further
investigation.

Turn client tracing OFF when finished.

Troubleshooting Guide for ORA-12541 TNS: No Listener的更多相关文章

  1. PLSQL Developer概念学习系列之登录连接Oracle时出现(没有登录) -PL / SQL Developer:ORA - 12541: TNS :无建听程序的错误解决办法(图文详解)

    不多说,直接上干货! 前期博客 PLSQL Developer概念学习系列之如何正确登录连接上Oracle(图文详解)   如用scott.scott_password进行登录,orcl是全局数据库 ...

  2. 【TNS】listener.ora模板;tnsnames.ora模板

    好多人使用监听的时候误操作,将监听弄的不好使了,这次这个模板,不光是针对大家出现的这种问题,也是给我自己留一个记录,方便他人,方便自己. listener.ora模板样例 -------------- ...

  3. TNS-12541: TNS:no listener TNS-12560 TNS-00511: No listener

        为了测试需要,系统管理员帮忙将一台ORACLE数据库服务器克隆到虚拟机上,我上去删除了root.oracle.tomcat账号下的crontab定时作业,然后启动了ORACLE数据库实例,删除 ...

  4. oracle ORA-12514: TNS: no listener 解决方案

    服务端:oracle 11g 客户端: pl/sql 问题描述: 用客户端 pl/sql 连接登录的时候,提示 "ORA-12514: TNS: no listener". 在服务 ...

  5. TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error:

    今天是2014-06-17.遇到一个很奇怪的问题,可能之前測试改动监听的原因,导致监听启动后自己主动关闭,特此记录一下整个处理过程, 监听配置文件信息例如以下: [oracle@dg1 admin]$ ...

  6. TNS:no listener error in Oracle XE after changing computer name

    This morning at work when trying to log on to my computer I noticed not my username on login screen ...

  7. Oracle ORA-12541:TNS:no listener错误解决方法 (转)

    前天装好的Oracle,昨天突然不好用了,从Oracle的错误提示来看,是说TNS:no listener ,估计是某种服务没有启动,打开windows管理工具->服务,一看,有一个Oracle ...

  8. TNS-12541: TNS:no listener , TNS-12542: TNS:address already in use

    查看数据库监听状态不对$ lsnrctl status LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Production on ...

  9. ORA-12514: TNS: no listener 解决方案

    服务端:oracle 11g 客户端: pl/sql 问题描述: 用客户端 pl/sql 连接登录的时候,提示 "ORA-12514: TNS: no listener". 在服务 ...

  10. cx_Oracle.DatabaseError: ORA-12541: TNS:no listener

    问题:利用Python连接Oracle时报错,完整过程如下 import cx_Oracle conn = cx_Oracle.connect('testma/dingjia@192.168.88.1 ...

随机推荐

  1. ci框架(codeigniter)Email发送邮件、收件人、附件、Email调试工具

        ci框架(codeigniter)Email发送邮件.收件人.附件.Email调试工具 Email 类         CodeIgniter 拥有强大的 Email 类来提供如下的功能: 多 ...

  2. SOJ 4454 (矩阵快速幂)

    先引入数的快速幂 例如计算2的5次方,常规算法2*2*2*2*2,利用快速幂的思想,求出5的二进制表达式101,权值为1和4的位上数字为1,即2^5=2^1*2^4.代码如下,时间复杂度为O(logn ...

  3. 对于事务ACID的理解

    ACID,即以下四点: 原子性(Atomicity) 原子性是指事务是一个不可分割的工作单位,事务中的操作要么都发生,要么都不发生. 一致性(Consistency) 事务前后数据的完整性必须保持一致 ...

  4. 使用Hexo搭建博客

    好长时间没在博客园写东西了,自己搭了一套博客,把自己的一些积累分享给大家,欢迎指正! 博客地址:http://www.baiguangnan.com 使用Hexo搭建自己的博客,可以参考这里:http ...

  5. 012 router password

    Press RETURN to get started!       Router>en Router#config t Enter configuration commands, one pe ...

  6. 使用11g DNFS建立基于DNFS的tablespace

    使用11g DNFS建立基于DNFS的tablespace 參考自: Step by Step - Configure Direct NFS Client (DNFS) on Linux (11g) ...

  7. VB打开project时出现冲突名称提示

    在敲机房时因为窗口命名不合适,我就改动了下窗口.可是保存后再打开的时候.却出现以下的提示: 这样的情况出现.通常是因为引用了别人的窗口文件,或者是改动窗口的名字可是就是找不到不论什么冲突的地方.事实上 ...

  8. [Canvas画图] 藏图阁(16) 人体穴位

    本节目标: 趁着今天是愚人节.阿伟决定来重温一下学医的那段日子. 有那么一段时间, 阿伟对武侠小说和医学同一时候产生了浓厚的兴趣,当时最想学的就是葵花点穴手, 一阳指之类的点穴功夫.轻轻一点.就能把别 ...

  9. MongDB应用

    题外话 工作3年,了解的技术颇多,但都是一知半解,了解不是很透澈.用过的技术,就像猴子搬过的包谷,搬一个丢一个.几年风雨,真有点一缕清风过,片叶不沾身的味道. 为强化知识点,提升文档及学习能力,我把以 ...

  10. 第一次PHP面试题

    1.标记符title是放在标记符什么之间:head 2.级联样式表文件的扩展名:CSS 3.html中<pre>的作用:pre 元素可定义预格式化的文本 4.mysql_affected_ ...