ORA-12514、The listener supports no services

今天收到开发的一个问题,说是程序连不上oracle数据库。

马上连上数据库,查看监听端口

发现监听的是本机的回环地址,别的机器上的程序肯定是不能连接的,于是修改了监听文件

vim  $ORACLE_HOME/db_1/network/admin/listener.ora,将HOST地址改为本地的内网IP,并

重启监听并重新查看

虽然监听恢复正常了,但是提示监听器不支持任何服务。用客户端连接会报错如下

这个错误一般是因为客户端连接服务名错误或者服务器没有配置服务名,重新编辑监听文件listener.ora,添加服务字段:

SID_LIST_LISTENER=
(SID_LIST =
  (SID_DESC =
  (GLOBAL_DBNAME = orcl)
  (SID_NAME = orcl)
  )
)
 

重启监听服务,问题解决。

ORA-12514 is an error that occurs when the Oracle listener is not able to find the requested service in the connect descriptor provided. This error typically indicates that the service name or SID specified in the connection string is incorrect or not known by the listener. To resolve this issue, you can try the following steps: 1. Verify the service name or SID: Double-check the service name or SID specified in the connect descriptor. Make sure it matches the service name or SID defined in the Oracle database. 2. Check listener status: Ensure that the Oracle listener is running and listening for incoming connections. You can use the following command to check the listener status: ``` lsnrctl status ``` If the listener is not running, start it using the following command: ``` lsnrctl start ``` 3. Register the service: If the service name or SID is correct, but still not known by the listener, you can try registering the service manually with the following command: ``` lsnrctl services ``` This command will reload the listener configuration and make it aware of any new services. 4. Check network connectivity: Ensure that there is no network issue between the client and the Oracle server. Check if you can ping the server from the client machine and vice versa. If none of these steps resolve the ORA-12514 error, it might be helpful to provide more information about your specific setup, such as the version of Oracle Database, operating system, and how you are connecting to the database.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zcfeng530

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值