ORA-12514 Error Analysis ORA-12514 TNS listener not recognize the current connection descriptor solution of the requested service

ORA-12514 TNS listener not recognize the current connection descriptor solution of the requested service

 

ORA-12514 TNS listener not recognize the current service connection request descriptor

Some colleagues encountered this problem, now sum up, for the following reasons:

After you successfully install oracle, has not stopped the database (ie the database is started), the client configuration is successful, it should not have been any problem.

And once you and my colleagues, sometimes Oracle installed in a virtual machine, and after the Oracle installation, not making any monitor configuration, the virtual machine restart, the problem ORA-12514 is will appear. As shown below

 

Solutions are as follows:

According to the error information to determine that the client is not listening to the service instance name

1, restart the service by way of starting the database, the connection still can not connect the server again.

2, since the first method does not resolve the problem, then the second method. Consider the listener listener.ora

  First check whether the normal start listening, and whether there are instances registered with the listener, if there are no instances registered with the listener, use the command manually register this case as shown below

 

If this is the case the manual instances registered with the listener's command

alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.100)(PORT=1522))';

 

The following is copied from elsewhere, to be verified

(My understanding is below a previous version of the registration example of a method for listening to)

   Listener configuration file listener.ora can listen without having to specify the service name (after installing Oracle10g is not specified). Under normal circumstances, generally as long as the database is started, the client connection to the database is no problem, but will sometimes repeat start closed ORA-12514 errors.

   Since listener.ora is not specified in the listener, we can monitor the instance name in the listener.ora file, so the problem should be connected.

Proceed as follows:

  • In the oracle Oracle server installation directory (in my E: \ under Oracle10g, each person is different, depending on your situation to find) find my listener.ora as shown under Network / admin directory shown

# 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))
    )
  )

I add marked red for the part, ORCL to listen instance name.

Wherein GLOBAL_DBNAME, global database name = name of the global database database database domain name +
SID_NAME instance name is

To view:

  1. select name from v $ database; // Check global database name
  2. select instance_name from v$instance; //查看sid
  • And then restart the Oracle server monitoring services in the service, then the oracle client by configuring the connection profile of Orcl instance tnsname.ora again,
  • At this time we do not worry, just restart the oracle server, connected again namely success. This is why we have configured listener.ora after listening, often forgotten. Try again, you can see that the client can connect oracle on the server, and PL / SQL connection again no problem.

And when some friends when you configure the client, connect to the database is successful, the use of PL / SQL, and there is a problem. This in turn how to solve it? Why oracle client has a successful connection, while the PL / SQL does not it?

The reason for the above is that we may be reconfigured when oracle client, although the link is successful, there may be some errors on the steps. We use Net Cofiguration Assistant client-side when reconfigured Orcl, instead of adding, we should deal with the following steps, it will not be a problem.

1. If you already have Orcl Net Cofiguration Assistant in. We can reconfigure

2, if there is no Net Cofiguration Assistant Orcl, we should add 

If we do not deal with the problem step, listener.ora modification is successful, the oracle and restart the server, regardless of the client or oracle PL / SQL can successfully connected to the database.

in conclusion. When we met, " ORA-12514 TNS listener not recognize the current connection descriptor requested service " error solution steps:

1, by way of restarting the database service startup, try the connection again.

2, if the first method is not possible, we use the second method

  • Added correctly listener.ora;
  • Restart the oracle server and check all the oracle service is started;
  • oracle client Net Cofiguration Assistant correctly add or reconfigure the instance name 

-------------------------------------------------

 

ORA-12514 TNS listener not recognize the current service connection request descriptor

Some colleagues encountered this problem, now sum up, for the following reasons:

After you successfully install oracle, has not stopped the database (ie the database is started), the client configuration is successful, it should not have been any problem.

And once you and my colleagues, sometimes Oracle installed in a virtual machine, and after the Oracle installation, not making any monitor configuration, the virtual machine restart, the problem ORA-12514 is will appear. As shown below

 

Solutions are as follows:

According to the error information to determine that the client is not listening to the service instance name

1, restart the service by way of starting the database, the connection still can not connect the server again.

2, since the first method does not resolve the problem, then the second method. Consider the listener listener.ora

  First check whether the normal start listening, and whether there are instances registered with the listener, if there are no instances registered with the listener, use the command manually register this case as shown below

 

If this is the case the manual instances registered with the listener's command

alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.100)(PORT=1522))';

 

而下文是从其他地方复制而来的,待验证

(我的理解下文是以前版本的一种注册实例至监听的一种方法)

   监听配置文件listener.ora中可以不必指定监听的服务名(安装Oracle10g后也是没有指定的)。正常情况下一般只要数据库启动,客户端连接数据库也没有什么问题,但是有时重复启动关闭也会出现ORA-12514错误。

   既然listener.ora中没有指定监听,我们可以在listener.ora文件中指定监听的实例名,这样该问题应该可以连接。

步骤如下:

  • 在oracle服务器Oracle安装目录(我的在E:\Oracle10g下,每个人的不一样,根据自己的情况查找)Network/admin目录下找到listener.ora 我的如下图所示

# 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))
    )
  )

标红的为我添加的部分,ORCL为监听的实例名。

其中GLOBAL_DBNAME,全局数据库名 全局数据库名=数据库名+数据库域名
SID_NAME为实例名

查看方法:

  1. select name from v$database; //查看全局数据库名
  2. select instance_name from v$instance; //查看sid
  • 然后在Oracle服务器的服务中重新启动监听服务,然后在oracle客户端通过再次配置对Orcl实例的连接配置文件tnsname.ora,
  • 这时我们不要着急,只需要oracle服务器重新启动一下,再次连接即成功。这也是我们配置完listener.ora 监听后,经常忘记的。再次尝试,可以看到客户端可以连接上oracle服务器了,而且PL/SQL再次连接也没有问题了。

而有些朋友在配置客户端时,连接数据库成功,而使用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 www.cnblogs.com/kfgby/p/11457588.html