ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

监听器目前不知道在连接描述符中的服务请求。

Expert Oracle Database Tips by Donald BurlesonAugust 27, 2015

在2015年8月27日,Donald Burleson一个oracle数据库专家技巧。

Question:  I am attempting to enter SQL*Plus and I am getting this error:

问题:我打算进入SQL*Plus得到了一个这个错误。

oracle> sqlplus system/manager@mysid

ERROR
ORA-12514: TNS: Listener does not currently know of service requested in connect descriptor
监听器目前不知道连接描述中的服务请求。
How do I prevent this form of the ORA-12514 error?  Also, I often get a TNS-12514 along with the ORA-12514.  Are these the same error?   If not, how do I avoid the TNS-12514?

如何的我可以避免ORA-12514错误?并且,随着ORA-12514错误我经常得到TNS-12514错误,这些是相同的错误吗?如果不是,我可以如何的避免TNS-12514错误。

permutation of the ORA-12514: TNS listener cannot resolve service name error as shown below.

ORA-12514置换:TNS监听器不能解决服务器名称错误,如下显示。

root> oerr ora 12514

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

监听器目前不知道连接描述中的服务请求。

Cause:(原因)

The listener received a request to establish a connection to a database or other service. 
监听器收到请求建立一个数据库或者其他服务请求。
The connect descriptor received by the listener specified a service name for a service (usually a database service) that either has not yet dynamically registered with the listener or has not been statically configured for the listener.

那个连接描述符接收到通过一个监听器指定的服务名称关于一个服务(通常是数据库的服务)要么尚未有动态的注册那个监听器,要么没有静态的配置监听器。

This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.

这里可以有一些暂时状态例如:监听器开始之后但是,数据库实例有使用监听器注册之前。

Action:(方案)

  • Wait a moment and try to connect a second time.(等待一会,尝试第二次)

  • Check which services are currently known by the listener by executing: lsnrctl services

  检查目前监听器已知的服务。通过执行:lsnrctl services

  • Check that the SERVICE_NAME parameter in the connect descriptor of the net service name used specifies a service known by the listener.

  • 检查那个在连接描述符中的服务名称参数,网络服务名称使用被监听器已知的指定的服务。
  • If an easy connect naming connect identifier was used, check that the service name specified is a service known by the listener.

  • 如果一个简单的连接名称连接标识符被使用,检查监听器已知的服务指定服务名称 。
  • Check for an event in the listener.log file.

  • 在listener.log 文件检事件。

To register the database with the listener
是用监听器注册数据库。
You have two options to register your database with the listener:

使用监听器注册数据库有两种方法。

  1. Simply add a service name to your tnsnames.ora file. 简单的直接添加服务名称到你的tnsname.ora文件
  2. If you have the multiple listeners and have specified the database name in your pfile/spfile with local_listener=mysid then you can dynamically register the database with the listener.

  如果你有多个监听器使用local_listener=sid在你的 pfile/spfile 指定数据库名称然后可以使用监听器动态的注册数据库。

The TNS-12514 is very similar to the ORA-12514 for a reason.  Sometimes Oracle does not get far enough along in the process for an Oracle error, so a similar network error will appear.  Resolving one should take care of the other.

TNS-12514是相似的原因和ORA-12514.有时oracle不能得到足够远的沿着在那个oracle错误进程,因此出现了类似的网络错误。解决一个问题错误应该注意另外一个错误。

Read on for specific information on dealing with the TNS-12514 on Windows.

读特定的信息在windows系统处理TNS-12514问题。

ORA-12514: TNS listener cannot resolve service name error

监听器不能够解决服务名称错误。

Question:  I have an issue causing a ORA-12514: TNS: listener could not resolve SERVICE_NAME error:

我有一个问题引起ora-12514错误,监听器不能解决服务名称错误。

SQL> shutdown immediate

Database closed. 
Database dismounted. 
ORACLE instance shut down.
 
SQL> startup mount

ORACLE instance started. 
ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor

I'm using Oracle 10g on Windows 2000.

What's cause of this error and how to resolve it?

什么是引起错误和如何的解决这个问题

Answer by Edward Stoever: 

I avoid using a listener connection when I startup or shutdown, as a matter of practice. I realize that cannot always be done. Are you physically on the machine? Can you ssh or telnet in and run sqlplus on the box? Then connect like so:

按照常规当开启和关闭数据库我避免使用监听器连接。我意识到不能一直被做,在机器上面你有物理吗?你可以在盒子里使用ssh或者telnet运行sqlplus。

export ORACLE_SID=mydb  ###Unix/Linux 
sqlplus sys as sysdba 
[no password needed - just hit return ] 
SQL> startup mount 
...

Do not connect with the @mydb to avoid the listener.

不要使用@mydb连接避免监听器

Also, Windows systems are subject to a variety of other issues from screen savers that hog the CPU to the Catch-22 of either anti-virus protection or a virus interfering with connections.  These conditions and a few others can cause TNS-12514 to appear.

因此,windows系统是属于不同其他问题从屏幕保护,占用cpu到Catch-22或使用连接防病毒保护或者病毒接口,这些条件是其他的原因促使TNS-12514.

Also note the similarities in numbering and content for ORA-12154, which deals with TNS inability to resolve the service name.

因此注意类似的ORA-12514在编号和内容,这与TNS无法解决服务名称的问题有关。
 
website:http://dba-oracle.com/t_ora_12514_tns_listener_does_not_currently_know_service_requested.htm
05-02 15:51