ORA-12541:TNS:无监听程序”错误解决

 

外地回来,登录pl/sql出现错误:ORA-12541:TNS:无监听程序。

1.       检查oracleproduct10.1.0db_1NETWORKloglistener.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:oracleproduct10.1.0db_1networkadminlistener.ora

写入D:oracleproduct10.1.0db_1networkloglistener.log的日志信息

写入D:oracleproduct10.1.0db_1networktracelistener.trc的跟踪信息

跟踪级别当前为0

 

pid=7180 开始

监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\.pipeEXTPROCipc)))

监听该对象时出错: (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=\.pipeEXTPROCipc)))

2.       Oraclelistener已经启动。

3.       查看oracleproduct10.1.0db_1NETWORKADMINlistener.ora

# listener.ora Network Configuration File: D:oracleproduct10.1.0db_1networkadminlistener.ora

# Generated by Oracle configuration tools.

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = D:oracleproduct10.1.0db_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.       查看oracleproduct10.1.0db_1NETWORKADMINtnsnames.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启动。

你可能感兴趣的:(oracle,windows,tcp,list,service,NetWork)