By Franck Pachot

.
You will probably never do it, but let’s imagine you have a RAC database, policy managed, with singleton service. Then you convert it to RAC One Node and you change your mind and convert it back to RAC. Be careful, the singleton services are converted to uniform ones when converting to RAC

My RACDB database is running on two nodes:

[oracle@racp1vm1 ~]$ srvctl status database -db racdb
Instance RACDB_1 is running on node racp1vm1
Instance RACDB_2 is running on node racp1vm2

it is policy managed and in a server pool of two servers:


[oracle@racp1vm1 ~]$ srvctl config database -db racdb | grep pool
Server pools: pool1
[oracle@racp1vm1 ~]$ srvctl status srvpool -serverpool pool1
Server pool name: pool1
Active servers count: 2

I’m in RAC and have the singleton service ‘S’ running on first node


[oracle@racp1vm1 ~]$ srvctl config service -db racdb -service S
Service name: s
Server pool: pool1
Cardinality: UNIFORM
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
...

I want to go to RAC One Node so I need to have only one instance running


[oracle@racp1vm1 ~]$ srvctl stop instance -db racdb -instance RACDB_2 -f

and then convert


[oracle@racp1vm1 ~]$ srvctl convert database -db racdb -dbtype RACONENODE

Then I check the service:


[oracle@racp1vm1 ~]$ srvctl status service -db racdb -service s
Service s is running on nodes: racp1vm1

still running on one node of course, and still defined as SINGLETON


[oracle@racp1vm1 ~]$ srvctl  config service -db racdb -service s
Service name: s
Server pool: pool1
Cardinality: SINGLETON
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC

Let’s now convert back to RAC


[oracle@racp1vm1 ~]$ srvctl convert database -db racdb -dbtype RAC

and check the service:


[oracle@racp1vm1 ~]$ srvctl status service -db racdb -service s
Service s is running on nodes: racp1vm1,racp1vm2

Ouch. My service that was a singleton is now running on all nodes.


[oracle@racp1vm1 ~]$ srvctl config service -db racdb -service s
Service name: s
Server pool: pool1
Cardinality: UNIFORM
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC

It seems that the conversion from RAC One Node to RAC has modified all service cardinality to be UNIFORM.

You have to set it back to SINGLETON:


[oracle@racp1vm1 ~]$ srvctl modify service -db racdb -cardinality singleton -service s -f

Be careful with that.
A service for which the application has not be designed to be load balanced across several nodes may have horrible performance. It’s always a good idea to check the service config and where they are running.