ORA-12505: TNS:listener does not currently know of SID given in connect descriptor ORACLE 报错 故障修复 远程处理

文档解释

ORA-12505: TNS:listener does not currently know of SID given 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 SID for an instance (usually a database instance) 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 instances are currently known by the listener by executing: lsnrctl services
– Check that the SID parameter in the connect descriptor specifies an instance known by the listener.
– Check for an event in the listener.log file.

ORA-12505: TNS: listener does not currently know of SID given in connect descriptor这是由于指定的服务名称/SID不正确导致的。官方解释,这个错误可能是由于客户端连接字符串中指定的 SID 不存在于服务器端的监听器配置文件中,而且它也有可能是在不兼容的驱动程序的情况下指定一个错误的端口号。

常见案例

1)服务器端没有正确配置SID导致:该错误是由于指定的SID不在tnsnames.ora文件中所致,或者该文件中有不正确的定义所致。

2)客户端没有正确配置TNSNAMES.ORA:客户端TNSNAMES.ORA文件中指定的服务名/SID不存在,或者指定的服务名/SID不正确。

3)客户端没有正确配置sqlplus.exe环境变量:在使用sqlplus运行sql语句时,与指定的tnsname相对应的环境变量没有被设置。

正常处理方法及步骤

1)检查服务器端TNSNAMES.ORA文件,确认文件内容正确。

2)检查客户端TNSNAMES.ORA文件,确认内容正确。

3)检查sqlplus.exe环境变量,确认设置正确。

4)重启服务器端进程,重新启动客户端进程。

香港美国云服务器首选树叶云,2H2G首月10元开通。
树叶云(www.IDC.Net)提供简单好用,价格厚道的香港/美国云服务器和独立服务器。IDC+ISP+ICP资质。ARIN和APNIC会员。成熟技术团队15年行业经验。

文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/286962.html<

(0)
运维的头像运维
上一篇2025-05-15 14:37
下一篇 2025-05-15 14:38

相关推荐

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注