SERVICE_NAME和SERVICE_NAMES和GLOBAL_DBNAME的各自定义

本文详细解释了在Oracle数据库配置中,如何设置tnsnames.ora文件中的SERVICE_NAME参数。对于动态注册,此参数应等于DB_NAME.DB_DOMAIN;而对于静态注册,则需与listener.ora文件中的GLOBAL_DBNAME参数保持一致。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

tnsnames.ora文件里边SERVICE_NAME的参数值--对于动态注册和静态注册,该参数有不同的取值

对于动态注册:
The following pfile/spfile parameters are important when setting the value
for SERVICE_NAME in the tnsnames.ora file:

DB_NAME
DB_DOMAIN
SERVICE_NAMES

一句话概括:
Use the values of the parameters existing in the pfile or spfile,
namely DB_NAME and DB_DOMAIN to determine the value of the SERVICE_NAME that should be used in the TNSNAMES.ORA.

即是:SERVICE_NAME=DB_NAME.DB_DOMAIN

#######################################################################################################################
对于静态注册:
If using statically defined SIDs in the listener.ora file under SID_DESC, the
GLOBAL_DBNAME parameter (within SID_DESC) must match the value set in the
tnsnames.ora file for SERVICE_NAME.

即是:SERVICE_NAME=GLOBAL_DBNAME parameter(listener.ora文件中)



附1:listener.ora文件中GLOBAL_DBNAME的含义:
--来自:Global Database Name Explained (Doc ID 115499.1)

In the LISTENER.ORA file, under the sections SID description, a parameter
GLOBAL_DBNAME can be found. This parameter identifies the database by its
global database name and consists of the name and domain name of the database,
as given in SERVICE_NAMES parameter in the database initialization parameter
file (init<SID>.ora).
即是:GLOBAL_DBNAME=consists of the name and domain name of the database


The value of this parameter is used by the Oracle Intelligent Agent to
determine the service name of the database. Detailed information about this
LISTENER.ORA parameter can be found in Note:97066.1 "How the Intelligent
Agent determines a database service name".

附2:
数据库初始化参数service_names的含义:
默认情况下,service_names为DB_NAME.DB_DOMAIN
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值