Relocate service in RAC environment(Temporarily/Permanently)

Relocate service in RAC environment(Temporarily/Permanently)



ABOUT SERVICE IN RAC
Service name is used by clients to connect to one or more instances. The service name should be unique throughout your system.

If multiple databases in the cluster offer the same service name, then RAC balances connections to that service across all such databases. If you want client connections to a service to be directed to a particular database, then the service name must be unique within the cluster

TEMPORARILY RELOCATE SERVICE FROM ONE NODE TO ANOTHER NODE IN CLUSTER


$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]
       Specify instances for an administrator-managed database, or nodes for a policy managed database
    -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 usage

Using Relocate service option to move from one node to another node

srvctl relocate service -d IND_A -s indrac.com -i IND_2 -t IND_1 –f

AFTER CHANGING SERVICE STATUS
ora.IND_a.db            ONLINE on indora01, ONLINE on indora02
ora.IND_a.indrac.com.svc ONLINE on indora01

In the above example, we have moved our service from one node to another node of the cluster. this doesnt change in the configuration

srvctl config service -d IND_a
Service name: indrac.com
Service is enabled
Server pool: IND_A_RAC.com
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: NONE
Edition:
Preferred instances: IND_2
Available instances: IND_1


PERMANENT RELOCATE SERVICE FROM ONE NODE OF THE CLUSTER TO ANOTHER

To view the service configuration of the environment. i am planning to move my service from IND_1 to IND_2 permanently

srvctl config service -d IND_b -s indrac.com
Service name: indrac.com
Service is enabled
Server pool: IND_B_rac.com
Cardinality: 1
Disconnect: true
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: NONE
Edition:
Preferred instances: IND_1
Available instances: IND_2

srvctl modify service -h
Modifies the configuration for the service.
Usage: srvctl modify service -d -s -n -i "" [-a ""] [-f]
    -d       Unique name for the database
    -s              Service name
    -n                       Modify service configuration
    -i "" Comma separated list of preferred instances
    -a "" Comma separated list of available instances
    -f Disconnect all sessions during stop or relocate service operations

To modify service from one to another node

srvctl modify service -d IND_b -s indrac.com -n -i IND_2 -a IND_1 –f

To verify whether the service has moved from one node to another permanently

$srvctl config service -d IND_b -s indrac.com
Service name: indrac.com
Service is enabled
Server pool: IND_B_rac.com
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: NONE
Edition:
Preferred instances: IND_2
Available instances: IND_1


========================================================================


Comments