当前位置: 代码迷 >> Oracle管理 >> 紧急求救,ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect,该如何解决
  详细解决方案

紧急求救,ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect,该如何解决

热度:449   发布时间:2016-04-24 05:51:48.0
紧急求救,ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect
ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect
descriptor
这个错误怎么解决阿?我本地连接pl/sql不行哦。
配置文件如下:请大侠帮忙看一下:

tnsnames.ora文件:

# TNSNAMES.ORA Network Configuration File: E:\oracle9i\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.



ORAPOP =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
  )
  (CONNECT_DATA =
  (SERVICE_NAME = ORAPOP)
  )
  )
-----------------------------------------

sqlnet.ora文件:

# SQLNET.ORA Network Configuration File: E:\oracle9i\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES,HOSTNAME,ONAMES)

------------------------------------------
listener.ora文件

# LISTENER.ORA Network Configuration File: E:\oracle9i\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
  )
  )





------解决方案--------------------
Backup LISTENER.ORA file!!!!!!!

In ...\network\admin open listener.ora

see

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\Ora10g)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = test)
(ORACLE_HOME = D:\Ora10g)
)
)

Add the entry 
(SID_DESC =
(SID_NAME = test)
(ORACLE_HOME = D:\Ora10g)
)
with regard to the particular Oracle Home and SID Name.

Restart the listener:
c:>lsnrctl stop
c:>lsnctl start

------解决方案--------------------
你的监听没有配好,监听再配下看看
------解决方案--------------------
监听文件的内容不全。

补充如5楼
  相关解决方案