ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 连接Oracle数据库时提示Ora-12514错误

连接Oracle数据库时提示Ora-12514错误

原创 Linux操作系统 作者:arronax_zyj 时间:2008-03-23 00:21:30 0 删除 编辑
问题描述:
    当配置完listener和tnsname后,在确认listener服务有正常启动的前提下,在sqlplus下尝试连接数据库,返回以下错误:
ORA-12514: TNS:监听程序当前无法识别连接描述符中请求的服务
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor 

解决方法:
在listener.ora文件中添加以下内容:
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = D:\oracle\product\10.2.0\db_1) 
(SID_NAME = orcl)
)
注意:orcl为数据库名,D:\oracle\product\10.2.0\db_1为$ORACLE_HOME的路径,修改后的listener.ora文件内容如下:
# listener.ora Network Configuration File: e:\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 = e:\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_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = linewell-d29e66.mshome.net)(PORT = 1521))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )



相关说明:
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 
- 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.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/370491/viewspace-216948/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-02-02

  • 博文量
    21
  • 访问量
    141212