Oracle 参数 SERVICE_NAMES 官方解释,作用,如何配置最优化建议

本站中文解释

SERVICE_NAMES参数用于指定Oracle数据库服务器正在运行的服务名称,如ORACLE_DBC,可以用该参数来鉴别客户端连接到哪台数据库服务器上。

正确设置步骤:

1.打开Oracle客户端配置文件(tnsnames.ora),查看数据库服务器的配置参数,建议在原有的基础上进行修改。

2.在指定的伺服器服务设置中添加一行,格式为:$SERVICE_NAME = “服务名称” 。

3.检查服务器上的相关环境变量和Oracle系统参数,如ORACLE_SID和ORACLE_HOME,以及同步客户端配置文件(tnsnames.ora)的SERVICE_NAMES参数。

4.如果更改后的参数正常工作,便可完成修改,如果不能正常工作,应及时更改回正确的设置,以防止出现严重的问题。

官方英文解释

SERVICE_NAMES specifies one or more names by which clients can connect to the instance.

Property Description

Parameter type

String

Syntax

SERVICE_NAMES =

db_service_name [, db_service_name [ ... ] ]

Default value

DB_UNIQUE_NAME.DB_DOMAIN if defined

Modifiable

ALTER SYSTEM

Modifiable in a PDB

No

Range of values

Any ASCII string or comma-separated list of string names

Basic

No

Oracle RAC

Do not set the SERVICE_NAMES parameter for Oracle RAC environments. Instead, define services using Oracle Enterprise Manager and manage those services using Server Control (SRVCTL) utility.

The instance registers its service names with the listener. When a client requests a service, the listener determines which instances offer the requested service and routes the client to the appropriate instance.

You can specify multiple service names to distinguish among different uses of the same database. For example:

SERVICE_NAMES = sales.example.com, widgetsales.example.com

You can also use service names to identify a single service that is available from two different databases through the use of replication.

If you do not qualify the names in this parameter with a domain, Oracle qualifies them with the value of the DB_DOMAIN parameter. If DB_DOMAIN is not specified, then no domain will be applied to the non-qualified SERVICE_NAMES values.

When you specify additional service names with this parameter, the default service name is not overridden. The default service name plus the additional service names specified with this parameter are the service names that clients can use to connect to the database.

Note:

The SERVICE_NAMES initialization parameter is deprecated in Oracle Database 19c and may be desupported in a future release.

Use of the SERVICE_NAMES parameter is no longer actively supported. It must not be used for high availability (HA) deployments and it is not supported for HA operations. This restriction includes FAN, load balancing, FAILOVER_TYPE, FAILOVER_RESTORE, SESSION_STATE_CONSISTENCY, and any other uses.

To manage your services, Oracle recommends that you instead use the SRVCTL command-line utility, the GDSCTL command-line utility, or the DBMS_SERVICE PL/SQL package.

See Also:

  • Oracle Database Net
    Services Administrator’s Guide
    for more information on this parameter and its settings

  • Oracle Real Application
    Clusters Administration and Deployment Guide
    for information about services administration in an Oracle RAC environment

  • “DB_DOMAIN”


数据运维技术 » Oracle 参数 SERVICE_NAMES 官方解释,作用,如何配置最优化建议