oracle pl/sql 无法监听错误解决方法

错误名:ORA-12514: TNS:监听程序当前无法识别连接描述符中请求的服务
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
导致无法进入pl/sql
解决方法:在D盘oracle安装文件中搜索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 = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.16)(PORT = 1521))
    )
  )
-----------------------------------------
如果是的话,改为如下:
------------------------------------
# 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)
)  
(SID_DESC =
     (GLOBAL_DBNAME = ORCL)
     (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
     (SID_NAME = ORCL)

)


  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.16)(PORT = 1521))
    )
  )

----------------------------------------
也就是加入了一句话:
(SID_DESC =
     (GLOBAL_DBNAME = ORCL)
     (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
     (SID_NAME = ORCL)

)
然后停止service 和listener两个服务,再依次重启service 和listener
[color=red][b]这时在重启listener的时候可能会出现listener 重启一次后意外停止的错误
[/b][/color]
这时解决方法为:打开oracle-oracle10g_home->configration and migration tools->net manager 把192.168.1.16改为localhost
重启两个服务即可进入pl/sql
-------------------------------------------------------------------
-------------------------------------------------------------------
   查了一下,网上是说,加上了面一段东西,意思是把LISTENER服务主动注册到进程监视器(pmon)中去。所以,但你启动了Serivce后,启动LISTENER的时候,会主动去注册到进程监视器(pmon)中去。所以不会有什么问题。但是反过却不行。

         如果说没有添加那一段,情况正好相反,是由实例的pmon进程在LISTENER中注册服务,LISTENER为被动注册。所以需要先起LISTENER才可以。

        总结一下,如果说你不加那段东西,那么就应该先起LISTENER,如果说你加了那段东西,就应该先起Serivce。

你可能感兴趣的:(oracle,sql,.net)