日期:2014-05-16  浏览次数:20474 次

验证service_names、db_name、db_unique_name在注册动态监听服务名时的作用

监听中动态注册时的服务名:如果没有设定service_names,将拼接db_unique_name和db_domain参数值来注册监听,(service_names优先级高),验证如下:。
  ----(很多文档里写的是db_name和db_domain这是不准确的)
  本实验的db_domain为空。Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

1.db_unique_name为PRODA,db_name 为PROD,service_names 为空--reset参数值,监听状态中有一个服务:PRODA

SQL> show parameter service_name
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
service_names                        string
SQL> show parameter db_unique
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      PRODA
SQL> show parameter db_name
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      PROD
SQL> show parameter db_doma
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_domain                            string
[oracle@ocm1 admin]$ lsnrctl status LSNR2
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-APR-2014 23:36:38
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.bys.com)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias                     LSNR2
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                09-APR-2014 23:31:20
Uptime                    0 days 0 hr. 5 min. 18 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                   &nb