Oracle 11g R2 RAC:使用 srvctl 工具管理 service 资源

本文详细介绍了在Oracle 11g R2 RAC环境中,如何使用srvctl工具来管理service资源。内容涵盖了srvctl create service等关键操作,为数据库管理员提供了高效管理集群数据库服务的指导。

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

1、使用 srvctl 工具创建 service 资源
srvctl add service -d db_unique_name -s service_name {-r "preferred_list"
   [-a "available_list"] [-P {BASIC | NONE | PRECONNECT}] | -g server_pool
   [-c {UNIFORM | SINGLETON]} [-k network_number]
   [-l [PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY]
   [-y {AUTOMATIC | MANUAL}] [-q {TRUE | FALSE}] [-x {TRUE | FALSE}]
   [-j {SHORT | LONG}][-B {NONE | SERVICE_TIME | THROUGHPUT}]
   [-e {NONE | SESSION | SELECT}] [-m {NONE | BASIC}] [-z failover_retries]
   [-w failover_delay]

Table A-17 srvctl add service Options

Option Description
-d db_unique_name

Unique name for the database.

-s service_name

The service_name.service_domain should be unique within the cluster unless you want to spread connections across multiple databases that offer the same service. If you do specify the service domain as part of the service name (such as sales.foo.com), then the DB_DOMAIN database attribute is appended to the service name.

-r preferred_list

A list of preferred instances on which the service runs when the database is administrator managed.

The list of preferred instances must be mutually exclusive with the list of available instances.

Note: This option is available only with Oracle RAC and only for administrator-managed databases.

-a available_list

A list of available instances to which the service fails over when the database is administrator managed.

The list of available instances must be mutually exclusive with the list of preferred instances.

Note: This option is available only with Oracle RAC and only for administrator-managed databases.

-P {BASIC | NONE | PRECONNECT}

TAF policy specification (for administrator-managed databases only).

Notes:

  • You can only use PRECONNECT when you specify the -r and -a options.

  • For administrator-managed databases, you cannot set the client-side TAF policy to PRECONNECT.

-g server_pool

The name of a server pool used when the database is policy managed.

Note: This option is available only with Oracle RAC and only for policy-managed databases.

-c {UNIFORM | SINGLETON}

The cardinality of the service, either UNIFORM (offered on all instances in the server pool) or SINGLETON (runs on only one instance at a time).

Notes:

  • This option is available only with Oracle RAC and only for policy-managed databases.

  • For policy-managed Oracle RAC One Node databases, all services must be SINGLETON.

-k network_number

Use this option to determine on which network this service is offered. The service is configured to depend on VIPs from the specified network.

Note: This option is available only with Oracle RAC and Oracle RAC One Node database configurations.

-l {[PRIMARY] |
[PHYSICAL_STANDBY] |
[LOGICAL_STANDBY] |
[SNAPSHOT_STANDBY]}

The service role.

You use this option to indicate that the service should only be automatically started when the Oracle Data Guard database role matches one of the specified service roles.

See Also: Oracle Data Guard Concepts and Administration for more information about database roles

-y {AUTOMATIC | MANUAL}

Service management policy.

If AUTOMATIC (the default), then the service is automatically started upon restart of the database, either by a planned restart (with SRVCTL) or after a failure. Automatic restart is also subject to the service role, however (the -l option).

If MANUAL, then the service is never automatically restarted upon planned restart of the database (with SRVCTL). A MANUAL setting does not prevent Oracle Clusterware from monitoring the service when it is running and restarting it if a failure occurs.

Note: Using CRSCTL to stop and start the Oracle Clusterware restarts the service in the same way that a failure does.

-x {TRUE | FALSE}

Indicates whether or not Distributed Transaction Processing should be enabled for this service. This service will either be a singleton service in a policy-managed database or a preferred service on a single node in an administrator-managed database.

Note: This option is available only with Oracle RAC.

-j {SHORT | LONG}

Assign a connection load balancing goal to the service: SHORT if using an integrated connection pool, LONG for long running connections that you want balanced by the number of sessions per node for the service

-B {NONE | SERVICE_TIME | THROUGHPUT}

Goal for the Load Balancing Advisory.

-e {NONE | SESSION | SELECT}

Failover type.

-m {NONE | BASIC}

Failover method.

If the failover type (-e) is set to a value other than NONE, then you should choose BASIC for this option.

Note: This option is available only with Oracle RAC.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值