jump to navigation

Modify RAC Services. 28 January 2010

Posted by David Alejo Marcos in RAC.
Tags: ,

Today I had to redefine the services on our 3 nodes cluster.

The change has been triggered by a new database running on the cluster and a more logical distribution of the business as we noticed an increase on the load of data using the interconnect.

Batches were running on two different nodes, depending of the type of product. Some tables are specific to the product, but we still have many common tables and all the information retrieved from common tables were being transferred from node to node.

After this change, all batches but one will run on the same preferred node.

The problem:

Redistribute existing services as per the following design:

Existing configuration:

Totem: PREF: qa1 qa2 qa3 AVAIL:  TAF: NONE


Bonds: PREF: qa1 AVAIL: qa3 TAF: NONE

New configuration:

Totem: PREF: qa3 AVAIL: qa1 qa2 TAF: NONE


Bonds: PREF: qa1 AVAIL: qa2 TAF: NONE

The solution:

The way we were going to implement it was by dropping the existing service and re-creating it. This is not a bad idea, but implies a reboot of our application server and the possibility of errors on the application if anything or anyone tries to connect to the database using that service at the time we were re-creating it (we are a 24*7 shop).

After having a look on the Oracle manuals (Oracle RAC Administrator guide, appendix B), I found a better way to do it.

srvctl modify service gives us the possibility of redefine the service without need of re-creating it or even stopping it.

Now we can upgrade available nodes to preferred, downgrade them or simply creating a new definition while the service is still running (Note.- Stop and start the service is recommended as there are some restrictions, i.e. newly added nodes will not be used until the service is restarted).

So, the syntax is as follows:

srvctl modify service -d db_unique_name -s service_name -n -i pref_inst_list [ -a avail_inst_list] [-f]


-n = Only uses the instances named for this service (unnamed instances already assigned to the service are removed).

-i = List of preferred instances.

-a = List of available instances.

-f = Disconnect all sessions during stop or relocate service operations.

In our case, the command I had to execute was:

srvctl modify service -s Totem -d qa -n -i qa3 -a qa1,qa2

to check the change:

[oracle ~]$  srvctl config service -s Totem -d qa -a

and the other services:

[oracle ~]$srvctl modify service -s CDS -d qa -n -i qa1 -a qa2

[oracle ~]$srvctl modify service -s bonds -d qa -n -i qa1 -a qa2

This will save us some typing and the potencial of making a mistake on the naming.

As always, comments are welcome.


1. rajesh - 14 May 2012

Thanks David for sharing this.

After reconfiguration of service , service still keep running as per past configuration and reconfiguration comes into picture only after service restart. Also service reconfiguration may fail due to below error :

SRVCTL modify service fails with PRKP-1048 CRS-0211 [ID 783691.1]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: