ORA-12514: TNS: 监听程序没法识别连接描述符中请求的服务

ORA-12514: TNS: 监听程序无法识别连接描述符中请求的服务
服务器: winXP/Open Suse
数据库: Oracle10g, ,本机连接。

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

又遇到了ora-12514: TNS: 监听程序无法识别连接描述符中请求的服务

尝试了一下办法解决:
1.打开tnsnames.ora文件。发现文件并没有破坏。listener.ora文件也核对过多次,都无问题。

2.在windows服务里停止oracle的一切服务,然后重新启动,问题依然存在

3.监听器、Net服务名等都多次重新配置,测试连接都可以成功。

4.IP、主机名都试了,都不行

——解决方案——————–
你先在cmd命令中lsnrctl stat看一下监听是否启动;
如果启动了,在cmd中set oracle_sid=serversid后看看能否登陆。

——解决方案——————–
正确启动监听的前提下,
检查tnsnames设置,并使用相应的连接字符串格式。
——解决方案——————–
可首先使用/本机格式登陆测试,排除是否连接串与tnsnames相关设置问题。
——解决方案——————–
一般指的是你的服务没有起来吧!
——解决方案——————–
重启一下你的服务,等个5分钟左右,若登录仍然有该提示,那你就要考虑你的用户角色了。
如果是你新建的用户,即使你 grant “DBA” to user 了,仍然要用 normal 角色登录。
——解决方案——————–
尝试在listener.ora文件中替换成如下配置:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product)
(PROGRAM = extproc)
)
(SID_DESC =

(GLOBAL_DBNAME = ORACLE) —-实例名

(ORACLE_HOME = D:\oracle\product) —oracle安装目录

(SID_NAME = ORACLE)

)
)
然后重启oracle的tnslistener服务。

——解决方案——————–
从错误信息上分析,可能是连接使用的 orcl_sid 与在侦听器上注册的不一致。

运行 lsnrctl status 检查一下侦听器上注册的 orcl_sid,
通过此 orcl_sid 直接使用 sqlplus system/password@servername:1521/orcl_sid 连接一下,看看是否成功。
——解决方案——————–
好像以前曾碰到过:其它程序占了1521端口,结果导致这样的错误,不妨看看1521端口是哪个程序在使用
——解决方案——————–
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

  • 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.

官方给出的关于ORA-12514的错误原因以及解决办法。原因简单来说可能有以下几种:
一、连接描述符给出的服务尚未在监听器中进行动态注册。
二、可能是先启动了监听器,后启动了数据库服务。
三、也有可能是服务未在监听器中进行静态注册。

转自:http://www.myexception.cn/oracle-management/53822.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值