显示应向侦听器动态注册的所有实例 [英] Show All Instances That Should Be Dynamically Registered With a Listener

查看:68
本文介绍了显示应向侦听器动态注册的所有实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Oracle中是否有一种方法可以显示默认情况下应使用某个侦听器动态注册哪些实例?

Is there a way in Oracle to show which instances should dynamically register by default with a certain listener?

我能做

lsnrctl状态| grep实例

lsnrctl status | grep Instance

,这将向我显示在该特定侦听器中注册的当前正在运行的实例.但这不会显示未运行的实例.

and this will show me the currently running instances that are registered with that particular listener. But this will not display the instances that are not running.

详细信息:

假设我有:

向LISTENER_HOST1_DEV注册的INSTDEV1(向上),INSTDEV2(向上),INSTDEV3(向下)

INSTDEV1 (up), INSTDEV2 (up), INSTDEV3 (down) registered with LISTENER_HOST1_DEV

和在LISTENER_HOST1_STG中注册的INSTSTG1(向上),INSTSTG2(向上),INSTSTG3(向下)

and INSTSTG1 (up), INSTSTG2 (up), INSTSTG3 (down) registered with LISTENER_HOST1_STG

有没有一种直接的方法来找出前三个实例应该向LISTENER_HOST1_DEV注册 第二组-带有LISTENER_HOST1_STG

Is there a straightforward way to find out that the first three instances should register with LISTENER_HOST1_DEV and the second set - with LISTENER_HOST1_STG

lsnrctl状态LISTENER_HOST1_DEV& lsnrctl状态LISTENER_HOST1_STG将仅显示INSTDEV1,INSTDEV2,INSTSTG1和INSTSTG2,而不显示非运行实例.

lsnrctl status LISTENER_HOST1_DEV & lsnrctl status LISTENER_HOST1_STG will show only INSTDEV1, INSTDEV2, INSTSTG1 and INSTSTG2, not the non-running instances.

谢谢.

推荐答案

第一种方式:

您可以在以下位置查看oratab文件: /etc/oratab或/var/opt/oracle/oratab 对于所有实例

You can check oratab file at /etc/oratab or /var/opt/oracle/oratab For all the instances

然后登录到每个数据库,并检查是否定义了local_listener参数.

And login to each of the database and check for the local_listener parameter is defined or not.

显示参数local_list

show parameter local_list

它将在动态模式下定义.

It will be defined in Dynamic mode.

第二种方式:

如果使用动态侦听器选项创建了12c数据库,则tnsnames.ora文件将为每个数据库定义单独的侦听器条目,格式为 LISTENER_SID和您的消息

If you have created 12c database with dynamic listener option your tnsnames.ora file will have separate listener entries defined for each database in the format LISTENER_SID along with your tnsentries

我不知道其他任何方法. 希望这会有所帮助.

I don't know of any other method. Hope this helps.

这篇关于显示应向侦听器动态注册的所有实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆