Install oracle 11G----- (ORA-12514 TNS listener currently does not recognize the request service in the connect descriptor) workaround

Here is the solution:

Judging from the error message that the client does not monitor the instance service name

1. Start the database by restarting the service, but the server still cannot be connected to the server again.

2. Since the first method can not solve the problem, then the second method. Consider listening to listener.ora

   In the listening configuration file listener.ora, it is not necessary to specify the monitoring service name (it is not specified after installing Oracle10g). Under normal circumstances, as long as the database is started, there is no problem with the client connecting to the database, but sometimes an ORA-12514 error will occur when the database is restarted and closed repeatedly.

   Since there is no listener specified in listener.ora, we can specify the instance name of the listener in the listener.ora file, so the question should be able to connect.

Proceed as follows:

  • Find listener.ora in the Oracle installation directory of the oracle server (mine is under E:\Oracle10g, everyone is different, find it according to your own situation) Network/admin

# listener.ora Network Configuration File: E:\Oracle10g\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = E:\Oracle10g)
      (PROGRAM = extproc)
    )
   (SID_DESC =
    (GLOBAL_DBNAME = ORCL)
    (ORACLE_HOME = E:\Oracle10g)
    (SID_NAME = ORCL)
    )

 )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = onest)(PORT = 1521))
    )
  )

The part marked in red is the part I added, and ORCL is the instance name of the listener.

  • Then restart the listening service in the service of the Oracle server, and then configure the monitoring of the Orcl instance again on the oracle client
  • If it still doesn't work, then we don't need to worry, just restart the oracle server, and the connection will be successful again. This is also what we often forget after configuring listener.ora monitoring. Try again, you can see that the client can connect to the oracle server, and there is no problem with PL/SQL connecting again.

而有些朋友在配置客户端时,连接数据库成功,而使用PL/SQL时,又出现了如下图所示的问题。这又如何解决呢?为什么oracle客户端已经连接成功了,而PL/SQL确不行呢?

===========================================================================================

出现如上的原因是,可能是大家再配置oracle客户端时,虽然链接成功了,步骤上可能有些错误。大家使用Net Cofiguration Assistant客户端时重新配置了Orcl,而不是添加,我们应该如下步骤处理,就不会出问题了。

1、如果Net Cofiguration Assistant中已经有了Orcl。我们可以重新配置

2、如果Net Cofiguration Assistant中没有Orcl,我们应该添加  

如果大家该步处理也没有问题了,listener.ora 修改成功,并且重新启动了oracle服务器,无论oracle客户端还是PL/SQL都能够成功连接数据库了。

总结一下。当大家遇到“ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务”错误的解决步骤:

1、通过重启服务的方式启动数据库,再次连接尝试。

2、如果第一种方法不可行,我们采用第二种方法

  • 正确添加listener.ora;
  • 重新启动了oracle服务器,并检查oracle所有服务是否启动;
  • oracle客户端Net Cofiguration Assistant正确添加或重新配置实例名 
本博客转载自其他大神,只为技术交流学习

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325726334&siteId=291194637