12c OCP题库解析060-4 后台进程新成员——LREG进程专门负责注册实例服务

Which statement is true about Oracle Net Listener?

A. It acts as the listening endpoint for the Oracle database instance for all local and nonlocal user connections.

B. A single listener can service only one database instance and multiple remote client connections.

C. Service registration with the listener is performed by the process monitor (LREG) process of each database instance.

D. The listener.ora configuration file must be configured with one or more listening protocol addresses to allow remote users to connect to a database instance.

E. The listener.ora configuration file must be located in the ORACLE_HOME/network/admin directly.

 

【题意简述】

考察了Oracle 12c新特性——LREG进程负责监听器的注册(Listener Registration)。

 

【考点分析】

Oracle监听器 Net Listener 是一个重要的数据库服务器组件,在整个 Oracle 体系结构中,扮演着重要的作用。它负责管理 Oracle 数据库和客户端之间的通讯,它在一个特定的网卡端口 (默认是TCP 1521端口)上监听连接请求,并将连接转发给数据库。

Oracle监听器主要负责下面的几方面功能:

l  监听客户端请求。

l  为客户端请求分配 Server Process

l  注册实例服务

l  错误转移 failover

l  负载均衡

    其中,failover和负载均衡都是RAC架构下的功能。

 

本质上讲,Listener是建立实例和客户端进程之间联系的桥梁。 Listener 与实例之间的联系,就是通过注册的过程来实现的。注册的过程就是实例告诉监听器,它的数据库实例名称instance_name和服务名 service_names。监听器注册上这样的信息,对客户端请求根据监听的注册信息,找到正确的服务实例名称。目前 Oracle提供动态注册和静态注册两种方式。

静态注册就是实例启动时读取 listener.ora 文件的配置,将实例和服务注册到监听程序。无论何时启动一个数据库,默认地都有两条信息注册到监听器中:数据库服务器对应的实例和服务。

动态注册的动作是监听器所在主机上数据库实例完成。实例的后台进程每隔一段时间就会将实例的参 数信息注册到监听器上,实现动态注册。

大家都知道,在Oracle Database 11g以及之前版本,PMON进程负责注册实例服务。而在Oracle Database 12c中,大量新的后台进程被引入进来,其中就包括专门负责注册实例服务的LREG后台进程。

 

我们节选官方文档中关于PMON和LREG的定义,其中专门提到了12c和之前版本的区别:

……

Process Monitor Process (PMON)

The process monitor (PMON) monitors the other background processes and performs process recovery when a server or dispatcher process terminates abnormally.

PMON is responsible for cleaning up the database buffer cache and freeing resources that the client process was using. For example, PMON resets the status of the active transaction table, releases locks that are no longer required, and removes the process ID from the list of active processes.

Listener Registration Process (LREG)

The listener registration process (LREG) registers information about the database instance and dispatcher processes with the Oracle Net Listener. When an instance starts, LREG polls the listener to determine whether it is running. If the listener is running, then LREG passes it relevant parameters. If it is not running, then LREG periodically attempts to contact it.

Note:

In releases before Oracle Database 12c, PMON performed the listener registration.

……

 

【答案剖析】

A,监听器负责监听非本地用户的连接请求。例如我们熟知的sqlplus / as sysdba 命令是操作系统用户验证登录方式,通过OS本地的IPC可以直接连接到实例,而IPC由本地OS提供,允许各种进程在主机内进行通信,所以不需要listener也可以连接到实例。所以A错误。

B, 监听器运行在数据库服务器之上,可以与一个或多个Oracle 实例相关联,所以 B 错误

C, 本质上讲,Listener 是建立实例和客户端进程之间联系的桥梁。 Listener 与实例之间的联系,就是通过注册的过程来实现的。从12c版本开始,LREG后台进程负责注册实例服务。所以C正确。

D,在配置listener.ora时会遇到Host参数,该参数作用就是指定连接的主机地址。我们可以选择IP地址和主机服务器名称。两种方法下,Oracle监听器是采用不同的策略方法。当使用HOST主机名的时候,Oracle监听器会对该计算机上所有的IP地址开启监听动作;如果使用IP地址,监听程序只能监听对应的IP地址。所以D错误。

E, 默认情况下,listener.ora 配置文件存放在ORACLE_HOME/network/admin目录下,但是我们可以修改配置文件的存放路径。以Windows环境为例,我们可以通过定义TNS_ADMIN环境变量来指定listener.ora、tnsnames.ora等配置文件的默认存放路径。所以E错误。

 

【答案】C


                                                                                                                                                                                            ~~~~~~~ the end~~~~~~~~~

                                                                                                                                                                                                               hoegh
                                                                                                                                                                                                           2016.05.16

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30162081/viewspace-2100754/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30162081/viewspace-2100754/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值