连接oracle出现ORA-12541:TNS:无监听程序

连接oracle出现ORA-12541:TNS:无监听程序,第1张

如何启动oracle的监听

1.打开Net Configuration Assistant

2.选择监听程序配置,下一步

3.选择重新配置,下一步

4.选择监听程序,默认,下一步

注:如果你的监听已启动,则出现提示框,选择是

5.选择协议,使用默认的TCP协议,下一步

6.选择端口号,使用标准端口号1521,下一步

7.不配置另一个监听程序,选择否,下一步

8.监听程序配置完成,下一步

1.在我的电脑右键管理中停掉 监听服务OracleOraDb10g_home1TNSListener

2.用自带的 Oracle - OraDb10g_home1-->配置和移植工具-->Net Configuration Assistant-->删除监听程序

3.新建一个监听程序

4.启动监听

检查oracle\product\10.1.0\db_1\NETWORK\log\listener.log:TNSLSNR for 32-bit Windows: Version 10.1.0.2.0 - Production on 04-1月 -2010 13:38:34 Copyright (c) 1991, 2004, Oracle. All rights reserved. 系统参数文件为D:\oracle\product\10.1.0\db_1\network\admin\listener.ora写入D:\oracle\product\10.1.0\db_1\network\log\listener.log的日志信息写入D:\oracle\product\10.1.0\db_1\network\trace\listener.trc的跟踪信息跟踪级别当前为0 以 pid=7180 开始监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)))监听该对象时出错: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=pc-xxx.mail.yyy.cn)(PORT=1521)))TNS-12542: TNS: 地址已被占用 TNS-12560: TNS: 协议适配器错误 TNS-00512: 地址已在使用 32-bit Windows Error: 48: Unknown error不再监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)))2. Oracle的listener已经启动。3. 查看oracle\product\10.1.0\db_1\NETWORK\ADMIN\listener.ora# listener.ora Network Configuration File: D:\oracle\product\10.1.0\db_1\network\admin\listener.ora# Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST =(SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = D:\oracle\product\10.1.0\db_1) (PROGRAM = extproc)) ) LISTENER = (DESCRIPTION_LIST =(DESCRIPTION = (ADDRESS_LIST =(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) (ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = pc-xxx.mail.yyy.cn)(PORT = 1521)) )) ) 把(ADDRESS = (PROTOCOL = TCP)(HOST = pc-xxx.mail.yyy.cn)(PORT = 1521))改为(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))pc-xxx.mail.yyy.cn是计算机名127.0.0.1也就是目前数据库正在用的ip地址。4. 查看oracle\product\10.1.0\db_1\NETWORK\ADMIN\tnsnames.ora找到下列语句:ORCL = (DESCRIPTION =(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = pc-xxx.mail.yyy.cn)(PORT = 1521)))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)) )将(ADDRESS = (PROTOCOL = TCP)(HOST = pc-xxx.mail.yyy.cn)(PORT = 1521))改为(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))5. 关闭后再启动listener运行->cmd启动dos窗口,执行lsnrctl stop关闭,lsnrctl start启动。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/8129332.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-13
下一篇 2023-04-13

发表评论

登录后才能评论

评论列表(0条)

保存