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.

-z failover_retries

The number of failover retry attempts.

-w failover_delay

The time delay between failover attempts.

-u

Add a new preferred or available instance to an existing service configuration.

-f

Force the add operation even though a listener is not configured for the network.

示例:

[oracle@rac1 ~]$ srvctl add service -d rac -s ractest1 -r rac1 -a rac2 -P BASIC -y automatic -e SELECT -z 5 -w 180[oracle@rac1 ~]$ srvctl add service -d rac -s ractest2 -r rac2 -a rac1 -P BASIC -y automatic -e SELECT -z 5 -w 180

[oracle@rac1 ~]$ crs_stat -t -vName Type R/RA F/FT Target State Host ----------------------------------------------------------------------ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1 ora.FRA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1 ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac1 ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac1 ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2 ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2 ora....VOTE.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1 ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac1 ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE rac2 ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac1 ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE rac2 ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac1 ora.rac.db ora....se.type 0/2 0/1 ONLINE ONLINE rac1 ora....st1.svc ora....ce.type 0/0 0/0 OFFLINE OFFLINE ora....st2.svc ora....ce.type 0/0 0/0 OFFLINE OFFLINE ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1 ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1 ora.rac1.gsd application 0/5 0/0 OFFLINE OFFLINE ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1 ora.rac1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac1 ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac2 ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2 ora.rac2.gsd application 0/5 0/0 OFFLINE OFFLINE ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2 ora.rac2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2 ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac1 ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac1 ora.scan2.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2 ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2

2、使用 srvctl 工具启动和停止 service 资源

语法:

srvctl start service -d db_unique_name
[-s "service_name_list" [-n node_name | -i instance_name]]

[-o start_options]

Table A-121 srvctl start service Options

Option Description
-d db_unique_name

Unique name for the database

-s "service_name_list"

Comma-delimited list of service names.

If you do not include this option, then SRVCTL starts all of the services for the specified database.

-n node_name

The name of the node where the service should be started. Use this option for policy-managed databases.

Note: This option is available only with Oracle Clusterware.

-i instance_name

The name of the instance for which the service should be started. Use this option for administrator-managed databases.

Note: This option is available only with Oracle Clusterware.

-o start_options

Options to startup command, such as OPENMOUNT, or NOMOUNT

Note: For multi-word startup options, such as read only and read write, separate the words with a space and enclose in single quotation marks (''). For example, 'read only'.

See Also: SQL*Plus User's Guide and Reference for more information about startup options

示例:

[oracle@rac1 ~]$ srvctl start service -d rac -s ractest1,ractest2 -o open[oracle@rac1 ~]$ crs_stat -t -vName Type R/RA F/FT Target State Host ----------------------------------------------------------------------ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1 ora.FRA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1 ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac1 ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac1 ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2 ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2 ora....VOTE.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1 ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac1 ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE rac2 ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac1 ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE rac2 ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac1 ora.rac.db ora....se.type 0/2 0/1 ONLINE ONLINE rac1 ora....st1.svc ora....ce.type 0/0 0/0 ONLINE ONLINE rac2 ora....st2.svc ora....ce.type 0/0 0/0 ONLINE ONLINE rac2 ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1 ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1 ora.rac1.gsd application 0/5 0/0 OFFLINE OFFLINE ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1 ora.rac1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac1 ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac2 ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2 ora.rac2.gsd application 0/5 0/0 OFFLINE OFFLINE ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2 ora.rac2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2 ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac1 ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac1 ora.scan2.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2 ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2

srvctl stop service -d db_unique_name [-s "service_name_list"
[-n node_name | -i instance_name] [-f]

Table A-153 srvctl stop service Options

Option Description
-d db_unique_name

Unique name for the database

-s service_name_list

Comma-delimited list of service names enclosed in double quotation marks ("").

If you do not provide a service name list, then SRVCTL stops all services on the database.

-n node_name

The name of the node on which the services should be stopped. Use this option for policy-managed databases.

Note: This option is available only with Oracle Clusterware.

-i instance_name

The name of the instance for which the services should be stopped. Use this option for administrator-managed databases.

Note: This option is available only with Oracle Clusterware.

-f

Force SRVCTL to stop the service; this causes SRVCTL to disconnect all of the sessions transactionally, requiring the sessions using the service to reconnect and then connect to another instance.

Note: If you do not specify the -f option, then sessions already connected to this service stay connected, but new sessions cannot be established to the service.

[oracle@rac1 ~]$ srvctl stop service -d rac -s ractest1
[oracle@rac1 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.FRA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac1
ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2
ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2
ora....VOTE.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac1
ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE rac2
ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE rac2
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac1
ora.rac.db ora....se.type 0/2 0/1 ONLINE ONLINE rac1
ora....st1.svc ora....ce.type 0/0 0/0 OFFLINE OFFLINE
ora....st2.svc ora....ce.type 0/0 0/0 ONLINE ONLINE rac2
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac2
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2
ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac1
ora.scan2.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2
ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2  
[oracle@rac1 trace]$ srvctl stop service -d rac -s ractest1,ractest2
[oracle@rac1 trace]$ srvctl status service -d rac
Service ractest1 is not running.
Service ractest2 is not running.
[oracle@rac1 trace]$ srvctl start service -d rac -s ractest2 -i rac1
[oracle@rac1 trace]$ srvctl status service -d rac
Service ractest1 is not running.
Service ractest2 is running on instance(s) rac1
      
3、使用 srvctl 工具启用和禁用 service 资源
If you disable a service, then Oracle Clusterware does not consider the service for automatic startup, failover, or restart. You might disable a service when performing application maintenance, to ensure the service is not accidentally restarted by Oracle Clusterware until your maintenance operations are complete. To make the service available for normal operation again, you enable the service.
srvctl enable service -d db_unique_name -s "service_name_list"
[-i instance_name | -n node_name]

Table A-55 srvctl enable service Options

Option Description
-d db_unique_name

Unique name for the database

-s service_name_list

Comma-delimited list of service names

-i instance_name

Name of the database instance where you want the service to run

Use this option for administrator-managed databases

Note: This option is available only with Oracle Clusterware and Oracle RAC.

-n node_name

Name of the node where you want the service to run

Use this option for policy-managed databases

Note: This option is available only with Oracle Clusterware and Oracle RAC.


srvctl disable service -d db_unique_name
-s "service_name_list" [-i instance_name | -n node_name]

Table A-41 srvctl disable service Options

Option Description
-d db_unique_name

Unique name for the database

-s "service_name_list"

Comma-delimited list of service names, or a single service name

-i instance_name

The name of the instance that you want to disable the service for.

Note: Use this option with administrator-managed databases

Note: This option is available only with Oracle Clusterware and Oracle RAC.

-n node_name

The name of the node on which to disable the service

Note: Use this option with policy-managed databases

Note: This option is available only with Oracle Clusterware and Oracle RAC.

4、使用 srvctl 工具查看 service 资源的状态
srvctl status service -d db_unique_name [-s "service_name_list"] [-f] [-v]

Table A-137 srvctl status service Options

Option Description
-d db_unique_name

Unique name for the database

-s "service_name_list"

Comma-delimited list of service names.

If you do not specify this option, then the utility lists the status of all the services for the specified database.

-f

Include disabled applications

-v

Displays INTERNAL_STATE, which indicates actions in progress by Oracle Clusterware, such as starting, stopping, or cleaning. If the internal state is STABLE, then the -v option displays nothing because this is the normal state. Additionally, the -v option displays STATE_DETAILS, which may indicate additional information provided by the resource about why it is in its current state.

[oracle@rac1 ~]$ srvctl status service -d rac -s ractest1
Service ractest1 is running on instance(s) rac2
[oracle@rac1 ~]$ srvctl status service -d rac -s ractest1 -v
Service ractest1 is running on instance(s) rac2
[oracle@rac1 ~]$ srvctl status service -d rac -v
Service ractest1 is running on instance(s) rac2
Service ractest2 is running on instance(s) rac2
5、使用 srvctl 工具 relocate service 资源
语法:
srvctl relocate service -d db_unique_name -s service_name
{-c source_node -n target_node | -i old_instance_name -t new_instance_name}
[-f]

Table A-89 srvctl relocate service Options

Option Description
-d db_unique_name

Unique name for the database

-s service_name

Service name

-c source_node

Name of the node where the service is currently running

-n target_node

Name of node where the service should be relocated

-i old_instance_name

Old instance name

-t new_instance_name

New instance name

-f

Disconnect all sessions during stop or relocate service operations

[oracle@rac1 ~]$ srvctl status service -d rac -v
Service ractest1 is running on instance(s) rac2
Service ractest2 is running on instance(s) rac2
[oracle@rac1 trace]$ srvctl relocate service -d rac -s ractest1 -i rac2 -t rac1
[oracle@rac1 trace]$ srvctl status service -d rac
Service ractest1 is running on instance(s) rac1
Service ractest2 is running on instance(s) rac2

6、使用 srvctl 工具删除 service 资源
语法:
srvctl remove service -d db_unique_name -s service_name [-i instance_name] [-f]

Table A-100 srvctl remove service Options

Options Description
-d db_unique_name

Unique name for the database

-s service_name

Service name

-i instance_name

Instance name

Note: This option is available only for Oracle Clusterware.

-f

Removes the service resource even though the service is running

示例:
[oracle@rac1 trace]$ srvctl status service -d rac
Service ractest1 is not running.
Service ractest2 is running on instance(s) rac1
[oracle@rac1 trace]$ srvctl remove service -d rac -s ractest1
[oracle@rac1 trace]$ srvctl status service -d rac
Service ractest2 is running on instance(s) rac1
在 service 正在 running 时强制删除 service
[oracle@rac1 trace]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.FRA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac1
ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2
ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2
ora....VOTE.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac1
ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE rac2
ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE rac2
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac1
ora.rac.db ora....se.type 0/2 0/1 ONLINE ONLINE rac1
ora....st2.svc ora....ce.type 0/0 0/0 ONLINE ONLINE rac1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac2
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2
ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac1
ora.scan2.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2
ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2
[oracle@rac1 trace]$ srvctl status service -d rac
Service ractest2 is running on instance(s) rac1
[oracle@rac1 trace]$ srvctl remove service -d rac -s ractest2 -f
[oracle@rac1 trace]$ srvctl remove service -d rac -s ractest2 -f
[oracle@rac1 trace]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.FRA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac1
ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2
ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2
ora....VOTE.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac1
ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE rac2
ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE rac2
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac1
ora.rac.db ora....se.type 0/2 0/1 ONLINE ONLINE rac1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac2
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2
ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac1
ora.scan2.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2
ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2
7、使用 srvctl 工具查看 service 资源的配置信息
语法:
srvctl config service -d db_unique_name [-s service_name]

Table A-27 srvctl config service Options

Option Description
-d db_unique_name

Unique name for the database

-s service_name

Service name.

If this option is not specified, then the configuration information for all services configured for the database are displayed.

[oracle@rac1 trace]$ srvctl config service -d rac -s ractest1
Service name: ractest1
Service is enabled
Server pool: rac_ractest1
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: SELECT
Failover method: NONE
TAF failover retries: 5
TAF failover delay: 180
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition:
Preferred instances: rac1
Available instances: rac2


转载请注明作者出处及原文链接,否则将追究法律责任:

作者:xiangsir

原文链接:http://blog.csdn.net/xiangsir/article/details/9972975

QQ:444367417

MSN:xiangsir@hotmail.com

[置顶] Oracle 11g R2 RAC:使用 srvctl 工具管理 service 资源的更多相关文章

  1. [置顶] Oracle 11g R2 ASM:了解 Oracle ASM 基本概念

    About Oracle ASM Instances About Oracle ASM Disk Groups About Mirroring and Failure Groups About Ora ...

  2. Oracle 11G R2 RAC中的scan ip 的用途和基本原理【转】

    Oracle 11G R2 RAC增加了scan ip功能,在11.2之前,client链接数据库的时候要用vip,假如你的cluster有4个节点,那么客户端的tnsnames.ora中就对应有四个 ...

  3. 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:4.安装Oracle RAC FAQ-4.7.Oracle 11G R2 RAC修改public网络IP

    问题:Linuxrac2节点的public网IP被占用,导致集群节点2无法访问 1.禁止相关CRS资源的启动,停止这些资源(vip,listener,scan,scan_listener,databa ...

  4. oracle 11g r2 rac到单实例的dg

    oracle 11g r2 rac到单实例的dg 1 主备环境说明 rac环境--primary CentOS release 6.5 (Final)hostname rac1 rac2ip 10.* ...

  5. Oracle 11G R2 RAC中的scan ip 的用途和基本原理

    Oracle 11G R2 RAC增加了scan ip功能,在11.2之前,client链接数据库的时候要用vip,假如你的cluster有4个节点,那么客户端的tnsnames.ora中就对应有四个 ...

  6. [转]Oracle 11g R2 RAC高可用连接特性 – SCAN详解

    原文地址:http://czmmiao.iteye.com/blog/2124373   昨天帮朋友解决11g RAC SCAN问题,当时为这朋友简单解答了一些SCAN特性相关的问题,但我知道这仅仅是 ...

  7. [置顶] Oracle 11g ASM:如何在 ASMCMD 命令行工具中创建 Oracle ACFS 文件系统

    实验环境:Oracle 11g R2 RAC (11.2.0.3.5)                Oracle Enterprise Linux 5.6 x86 1.创建 ASM 磁盘组 在两节点 ...

  8. vSphere在RedHat6.0上搭建Oracle 11g R2 RAC环境

    一.前期准备工作 1.1 为方便操作,装完系统后我们先安装Vmware Tools: 1.1.1.安装工具 在VMware的菜单栏上选择"虚拟机/安装虚拟机工具(VM/Install VMw ...

  9. Oracle 11g R2 RAC 高可用连接特性

    转自-阿里巴巴许春值 1.scan概念 什么叫 SCAN,SCAN (Single Client Access Name) 是 Oracle 从11g R2 开始推出的,客户端可以通过 SCAN 特性 ...

随机推荐

  1. SGU 194. Reactor Cooling(无源汇有上下界的网络流)

    时间限制:0.5s 空间限制:6M 题意: 显然就是求一个无源汇有上下界的网络流的可行流的问题 Solution: 没什么好说的,直接判定可行流,输出就好了 code /* 无汇源有上下界的网络流 * ...

  2. wordpress通过代码禁用IE8, IE9,IE10等IE浏览器兼容视图模式(Compatibility View)

    目前wordpress主流主题大多都放弃了对IE6的支持!甚至IE6,IE7,IE8等的兼容模式也不支持!目前特别是国内的双核浏览器大多数使用使用IE内核都是使用的兼容模式!那将是非常糟糕!如何让IE ...

  3. 递归 与 js 对象的引用

    <script> //递归 function test(n) { if (n == 1) { return 1 } console.log(n) return n * test(n - 1 ...

  4. 不学就吃亏的underscorejs类库学习示例 ——(集合篇)

    underscorejs是一个很不错的类库,我的很多项目都引用了这个类库,的确可以带来很多方便. 记得我当初学的时候,看underscorejs的api是看的一知半解的,甚至不明白api里的conte ...

  5. 入门5:PHP 语法基础——流程控制

    一.if...else 语句 if( ) else{ } 如果 .... 就.... 否则.... if(判断){ 判断成立 则执行该表达式 }else{ 如果上方判断都不成立 则执行该表达式 } i ...

  6. JS生成二维码,支持中文字符

    一.使用jquery-qrcode生成二维码 先简单说一下jquery-qrcode,这个开源的三方库(可以从https://github.com/jeromeetienne/jquery-qrcod ...

  7. psql rank row

    rank() OVER (PARTITION BY f1 ORDER BY f2 DESC) ROW_NUMBER() () OVER (PARTITION BY f1 ORDER BY f2 DES ...

  8. google zxing 二维码扫描(android client分析)

    一.总体架构 二.架构分析 1. com.google.zxing.client.android AmbientLightManager 环境光线管理 Detects ambient light an ...

  9. 02:计算(a+b)*c的值

    总时间限制:  1000ms 内存限制:  65536kB 描述 给定3个整数a.b.c,计算表达式(a+b)*c的值. 输入 输入仅一行,包括三个整数a.b.c, 数与数之间以一个空格分开.(-10 ...

  10. uboot的devices_init函数分析

    一.函数说明 函数功能: 完成设备的初始化 函数位置: common/devices.c 二.程序分析 int devices_init (void) { #ifndef CONFIG_ARM /* ...