ORA-12521: TNS:listener does not currently know of instance requested in connect descriptor ORACLE 报
文档解释
ORA-12521: TNS:listener does not currently know of instance 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 in addition to the service name an instance name 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 INSTANCE_NAME parameter in the connect descriptor specifies an instance name known by the listener.
– Check for an event in the listener.log file.
官方解释
常见案例
1. 数据库实例刚刚安装,但未注册到监听程序中。
2. 在指定节点上运行了多个实例,但是客户端只知道一个实例,并尝试连接另一个实例。
3. 连接字符串中实例名(SID)的拼写错误。
正常处理方法及步骤
1、检查数据库连接字符串,确认实例名(SID)是否正确,SID应与数据库实例相匹配;
2、确认TNSNAMES.ORA文件中此实例是否存在;
3、检查数据库实例是否正确注册到监听程序中,请使用以下命令来检查:
(1)lsnrctl status
(2)lsnrctl services
(3)select instance_name from v$instance;
(1)如果用户是Windows操作系统环境:
a. 启动Oracle实例
b. 再次启动监听程序
(2)如果用户是Linux/Unix操作系统环境:
a. 关闭Oracle实例
b. 再次启动监听程序
c. 启动Oracle实例
5、重新启动和初始化客户端;
6、重新尝试连接实例。
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341