Skip to content

RAC to RON then RON to RAC and singleton service

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.

Let’s work together

Ready to operate at
the next level?

Tell us about your challenge. We’ll bring the depth, the expertise, and the Swiss precision.

Oracle Team

Oracle Team

Posts published under the Oracle Team account are collective contributions by the dbi services Oracle consultants. The practice covers the full Oracle Database lifecycle: architecture, migration and upgrade, high availability with RAC and Data Guard, backup and recovery, performance tuning, and engineered systems such as Oracle Database Appliance and Exadata. The team holds Oracle certifications up to Certified Master level and operates customer platforms under service level agreements.View Author posts

1,009 posts since December 2010

Tags:

Leave a Comment

Your email address will not be published. Required fields are marked *