Oracle11gRAC如何手动添加service

这篇文章给大家介绍Oracle 11g RAC如何手动添加service,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

成都创新互联公司专注于上思企业网站建设,响应式网站设计,电子商务商城网站建设。上思网站建设公司,为上思等地区提供建站服务。全流程按需定制设计,专业设计,全程项目跟踪,成都创新互联公司专业和态度为您提供的服务

11.2.0.4 RAC

dbname:XXXXXXDB

添加服务:
ordXX:ordXX
orXX:orXX
dsXX:dsXX

[oracle@jdordXX2 ~]$ srvctl add service -h


Adds a service configuration to the Oracle Clusterware.


Usage: srvctl add service -d -s {-r "" [-a ""] [-P {BASIC | NONE | PRECONNECT}] | -g [-c {UNIFORM | SINGLETON}] } [-k   ] [-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 ] [-w ] [-t ] [-f]
    -d      Unique name for the database
    -s             Service name
    -r ""    Comma separated list of preferred instances
    -a ""    Comma separated list of available instances
    -g           Server pool name
    -c {UNIFORM | SINGLETON} Service runs on every active server in the server pool hosting this service (UNIFORM) or just one server (SINGLETON)
    -k             network number (default number is 1)
    -P {NONE | BASIC | PRECONNECT}        TAF policy specification
    -l                Role of the service (primary, physical_standby, logical_standby, snapshot_standby)
    -y              Management policy for the service (AUTOMATIC or MANUAL)
    -e       Failover type (NONE, SESSION, or SELECT)
    -m     Failover method (NONE or BASIC)
    -w             Failover delay
    -z             Failover retries
    -t             Edition (or "" for empty edition value)
    -j  Connection Load Balancing Goal (SHORT or LONG). Default is LONG.
    -B     Runtime Load Balancing Goal (SERVICE_TIME, THROUGHPUT, or NONE)
    -x  Distributed Transaction Processing (TRUE or FALSE)
    -q AQ HA notifications (TRUE or FALSE)
Usage: srvctl add service -d -s -u {-r "" | -a ""} [-f]
    -d      Unique name for the database
    -s             Service name
    -u                       Add a new instance to service configuration
    -r       Name of new preferred instance
    -a      Name of new available instance
    -f                       Force the add operation even though a listener is not configured for a network
    -h                       Print usage


[oracle@jdordXX2 ~]$ srvctl add service -d XXXXXXDB -s ordXX -r XXXXXXDB1 -a XXXXXXDB2 -P basic -e select -m basic -z 180 -w 5
[oracle@jdordXX2 ~]$ srvctl add service -d XXXXXXDB -s dsXX -r XXXXXXDB1 -a XXXXXXDB2 -P basic -e select -m basic -z 180 -w 5
[oracle@jdordXX2 ~]$ srvctl start service -d XXXXXXDB -s ordXX
[oracle@jdordXX2 ~]$ srvctl start service -d XXXXXXDB -s dsXX
[oracle@jdordXX2 ~]$ srvctl add service -d XXXXXXDB -s orXX -r XXXXXXDB1 -a XXXXXXDB2 -P basic -e select -m basic -z 180 -w 5
[oracle@jdordXX2 ~]$ srvctl start service -d XXXXXXDB -s orXX


[oracle@jdordXX1 ~]$ srvctl relocate service -d XXXXXXDB -s Gaoyc -i XXXXXXDB1 -t XXXXXXDB2

[oracle@jdordXX2 ~]$ srvctl add service -d XXXXXXDB -s Gaoyc -r XXXXXXDB1,XXXXXXDB2 -P basic -e select -m basic -z 180 -w 5


[oracle@jdordXX1 ~]$ srvctl add service -d XXXXXXDB -s Gaoyc -r "XXXXXXDB1,XXXXXXDB2" -a "XXXXXXDB2,XXXXXXDB1" -P basic -e select -m basic -z 180 -w 5
PRKO-2102 : Failed to create server pool XXXXXXDB_Gaoyc: PRCS-1009 : Failed to create server pool ora.XXXXXXDB_Gaoyc 
PRCR-1071 : Failed to register or update server pool ora.XXXXXXDB_Gaoyc
CRS-2714: 'jdordXX2' is specified multiple times in 'SERVER_NAMES' of 'ora.XXXXXXDB_Gaoyc'

##-r参数和-a参数不允许重复
[oracle@jdordXX1 ~]$ srvctl add service -d XXXXXXDB -s Gaoyc -r "XXXXXXDB1,XXXXXXDB2" -P basic -e select -m basic -z 180 -w 5
[oracle@jdordXX1 ~]$ srvctl remove service -d XXXXXXDB -s Gaoyc
[oracle@jdordXX1 ~]$ 


[oracle@jdordXX1 ~]$ srvctl relocate service -h


Temporarily relocates service from one node of the cluster to another.


Usage: srvctl relocate service -d -s {-i -t | -c -n } [-f]
    -d      Unique name for the database
    -s             Service name
    -i            Old instance name
    -t            New instance name
    -c        Node name to relocate service from
    -n         Node name to relocate service to
    -f                       Disconnect all sessions during stop or relocate service operations
    -h                       Print usages


[grid@jdordXX1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       jdordXX1                                    
               ONLINE  ONLINE       jdordXX2                                    
ora.LISTENER.lsnr
               ONLINE  ONLINE       jdordXX1                                    
               ONLINE  ONLINE       jdordXX2                                    
ora.asm
               ONLINE  ONLINE       jdordXX1                Started             
               ONLINE  ONLINE       jdordXX2                Started             
ora.gsd
               OFFLINE OFFLINE      jdordXX1                                    
               OFFLINE OFFLINE      jdordXX2                                    
ora.net1.network
               ONLINE  ONLINE       jdordXX1                                    
               ONLINE  ONLINE       jdordXX2                                    
ora.ons
               ONLINE  ONLINE       jdordXX1                                    
               ONLINE  ONLINE       jdordXX2                                    
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       jdordXX1                                    
ora.cvu
      1        ONLINE  ONLINE       jdordXX1                                    
ora.jdordXX1.vip
      1        ONLINE  ONLINE       jdordXX1                                    
ora.jdordXX2.vip
      1        ONLINE  ONLINE       jdordXX2                                    
ora.oc4j
      1        ONLINE  ONLINE       jdordXX1                                    
ora.XXXXXXDB.db
      1        ONLINE  ONLINE       jdordXX1                Open                
      2        ONLINE  ONLINE       jdordXX2                Open                
ora.XXXXXXDB.dsXX.svc
      1        ONLINE  ONLINE       jdordXX1                                    
ora.XXXXXXDB.ordXX.svc
      1        ONLINE  ONLINE       jdordXX1                                    
ora.scan1.vip
      1        ONLINE  ONLINE       jdordXX1                                    
[grid@jdordXX1 ~]$ 


[grid@jdordXX1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       jdordXX1                                    
               ONLINE  ONLINE       jdordXX2                                    
ora.LISTENER.lsnr
               ONLINE  ONLINE       jdordXX1                                    
               ONLINE  ONLINE       jdordXX2                                    
ora.asm
               ONLINE  ONLINE       jdordXX1                Started             
               ONLINE  ONLINE       jdordXX2                Started             
ora.gsd
               OFFLINE OFFLINE      jdordXX1                                    
               OFFLINE OFFLINE      jdordXX2                                    
ora.net1.network
               ONLINE  ONLINE       jdordXX1                                    
               ONLINE  ONLINE       jdordXX2                                    
ora.ons
               ONLINE  ONLINE       jdordXX1                                    
               ONLINE  ONLINE       jdordXX2                                    
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       jdordXX1                                    
ora.cvu
      1        ONLINE  ONLINE       jdordXX1                                    
ora.jdordXX1.vip
      1        ONLINE  ONLINE       jdordXX1                                    
ora.jdordXX2.vip
      1        ONLINE  ONLINE       jdordXX2                                    
ora.oc4j
      1        ONLINE  ONLINE       jdordXX1                                    
ora.XXXXXXDB.db
      1        ONLINE  ONLINE       jdordXX1                Open                
      2        ONLINE  ONLINE       jdordXX2                Open                
ora.XXXXXXDB.funtune.svc
      1        ONLINE  ONLINE       jdordXX1                                    
      2        ONLINE  ONLINE       jdordXX2                                    
ora.scan1.vip
      1        ONLINE  ONLINE       jdordXX1 
      
[oracle@jdordXX2 ~]$ srvctl remove service -d XXXXXXDB -s funtune
PRCR-1025 : Resource ora.XXXXXXDB.funtune.svc is still running
[oracle@jdordXX2 ~]$ srvctl stop service -d XXXXXXDB -s funtune;
[oracle@jdordXX2 ~]$ srvctl remove service -d XXXXXXDB -s funtune


[oracle@jdordXX2 ~]$ srvctl config service -d XXXXXXDB -s ordXX
Service name: ordXX
Service is enabled
Server pool: XXXXXXDB_ordXX
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition: 
Preferred instances: XXXXXXDB1
Available instances: XXXXXXDB2
[oracle@jdordXX2 ~]$ srvctl remove service -d XXXXXXDB -s ordXX
[oracle@jdordXX2 ~]$ srvctl add service -d XXXXXXDB -s ordXX -r XXXXXXDB1 -a XXXXXXDB2 -P basic -e select -m basic -z 180 -w 5
[oracle@jdordXX2 ~]$ srvctl config service -d XXXXXXDB -s ordXX
Service name: ordXX
Service is enabled
Server pool: XXXXXXDB_ordXX
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: SELECT
Failover method: BASIC
TAF failover retries: 180
TAF failover delay: 5
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition: 
Preferred instances: XXXXXXDB1
Available instances: XXXXXXDB2

关于Oracle 11g RAC如何手动添加service就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。


网页标题:Oracle11gRAC如何手动添加service
链接分享:http://pwwzsj.com/article/pdgehg.html