Oracle RAC One Node – HA Solution for Oracle Database

Oracle provides many solution for database HA. To name few Oracle RAC, Oracle Data Guard, Oracle Streams etc. These solutions provide protection at different levels. For example, RAC protects from instance failure, node failure. Data guard & streams protect from complete site failure. All these solutions have database running on all the nodes.

This means we’ll have to pay the license cost for all the nodes where our database is running. Whether we are using it or not does not matter. Oracle 11.2.0.2 has come up with a solution “RAC One Node”, which provides database HA but less costly than RAC.

How it works?

Let’s assume we have a 4 node cluster. With RAC One Node, we’ll have database running only on 1 node, but capable of relocating to rest of the 3 nodes. So if the current node dies, it can be relocated to other surviving nodes. This can be a graceful migration (for patching OS upgrade etc) or some kind of failure.

Taking into consideration above setup, RAC One Node will be licensed as following

– All nodes (except ONE spare node) on which RAC One is installed must be licensed for RAC One Node. So in our scenario, 3 (1 Active + 2 ) nodes will have get RAC One Node license. One spare node, where the instance will be relocated need not have this license.

– In case of failure, an instance is relocated to non-licensed node, can be active only for 10 days. After that instance should relocate back to licensed node.

Other advantages of using RAC One Node

– Database instance can be relocated to different host (even with higher processing power). This approach allows to consolidate the hardware to an extent. For example, at end of the month, when monthly cycles are to be executed (CPU intensive operation), it can relocated to high capacity node and then back to a original node for data to day operations. So we can create a RAC setup with nodes, having different processing capabilities.

– Reduce maintenance outages

– Rolling patches for single instance databases

– Out of the box cluster failover for HA of database (Same as RAC)

– Dynamic Resource management at instance level (Physical resources can be changed)

– At any given point of time, one instance will be active. When asked to relocate, and transactions are active, relocate will wait for some time and then kills the connection on the source instance.

– Also at any given point of time, only one instance will be accepting connections

– If required, we can also move from RAC One Node to RAC. The license can be converted to RAC with some ratio.

Note: On Linux this functionality was supported on 11.2.0.1 with one of patch
9004119. But other platforms, have this functionally from 11.2.0.2 onwards.

Following are few steps, to create a RAC ONE Node database setup. I’ve also demonstrated, how to relocate the instance

Start DBCA (which is now RAC ONE Node aware). We have 3 options for creating a database

Click Next, and specify Global name, SID & service parameters

Once the database is created, check the status of the database

# crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.LISTENER.lsnr
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.RACONEDG.dg
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.RACONEFRADG.dg
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.asm
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.gsd
               OFFLINE OFFLINE      solsrv-20
               OFFLINE OFFLINE      solsrv-21
ora.net1.network
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.ons
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.registry.acfs
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       solsrv-20
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       solsrv-21
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       solsrv-21
ora.cvu
      1        ONLINE  ONLINE       solsrv-21
ora.solsrv-20.vip
      1        ONLINE  ONLINE       solsrv-20
ora.solsrv-21.vip
      1        ONLINE  ONLINE       solsrv-21
ora.oc4j
      1        ONLINE  ONLINE       solsrv-21
ora.racone.db
      1        ONLINE  ONLINE       solsrv-20            Open
ora.racone.srv1.svc
      1        ONLINE  ONLINE       solsrv-20
ora.scan1.vip
      1        ONLINE  ONLINE       solsrv-20
ora.scan2.vip
      1        ONLINE  ONLINE       solsrv-21
ora.scan3.vip
      1        ONLINE  ONLINE       solsrv-21

Linux Patch 9004119 will install following utilities

Omotion
racone2rac
raconefix
raconeinit
raconestatus 

But on other platforms, One Node RAC support was added from version 11.2.0.2. When I installed 11.2.0.2 on Solaris, these utilities were missing (Not sure, if this is intentional!!) So initially, I tried copying and converting them (copying the scripts from Linux) to Solaris, but it needed lot many changes (was not sure if it would work, after making the change). So I started exploring other option of Enterprise Manager.  EM didn’t disappoint me… it has a straight forward way of doing this.

Following are the steps:

Select Availability option

Select RAC One Node Database

Specify the credentials

Next screen will prompt for selecting the node where we need to relocate the database

Confirm the relocation

A job for relocation is submitted.  After a while, database will be relocated to selected node.  This can again be verified by checking the status

--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.LISTENER.lsnr
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.RACONEDG.dg
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.RACONEFRADG.dg
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.asm
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.gsd
               OFFLINE OFFLINE      solsrv-20
               OFFLINE OFFLINE      solsrv-21
ora.net1.network
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.ons
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
ora.registry.acfs
               ONLINE  ONLINE       solsrv-20
               ONLINE  ONLINE       solsrv-21
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       solsrv-20
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       solsrv-21
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       solsrv-21
ora.cvu
      1        ONLINE  ONLINE       solsrv-21
ora.solsrv-20.vip
      1        ONLINE  ONLINE       solsrv-20
ora.solsrv-21.vip
      1        ONLINE  ONLINE       solsrv-21
ora.oc4j
      1        ONLINE  ONLINE       solsrv-21
ora.racone.db
      2        ONLINE  ONLINE       solsrv-21            Open
ora.racone.srv1.svc
      1        ONLINE  ONLINE       solsrv-21
ora.scan1.vip
      1        ONLINE  ONLINE       solsrv-20
ora.scan2.vip
      1        ONLINE  ONLINE       solsrv-21
ora.scan3.vip
      1        ONLINE  ONLINE       solsrv-21

Few useful commands

$ srvctl start  database -d RACONE
$ srvctl stop  database -d RACONE
$ srvctl config database -d RACONE
Database unique name: RACONE
Database name: RACONE
Oracle home: /oracle/11gr2
Oracle user: ora11gr2
Spfile: +RACONEDG/RACONE/spfileRACONE.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: RACONE
Database instances:
Disk Groups: RACONEDG,RACONEFRADG
Mount point paths:
Services: SRV1
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: RACONE
Candidate servers: solsrv-20,solsrv-21
Database is administrator managed
$  srvctl status database -d RACONE
Instance RACONE_2 is running on node solsrv-20
Online relocation: INACTIVE
$ srvctl modify  database -d RACONE -w 2
$ srvctl relocate database -d RACONE -n solsrv-21
$ srvctl status database -d RACONE
Instance RACONE_1 is running on node solsrv-20
Online relocation: ACTIVE
Source instance: RACONE_1 on solsrv-20
Destination instance: RACONE_2 on solsrv-21
 

Advertisements
This entry was posted in Oracle Real Application Cluster, RAC One Node and tagged . Bookmark the permalink.

4 Responses to Oracle RAC One Node – HA Solution for Oracle Database

  1. Silvio says:

    I have a question.

    Can I use Policy-Managed to configure RAC One Node, or this feature is only avaliable for Admin-Managed?

    Thanks!

    • I haven’t tried, with policy-managed database. But I don’t see a reason, why it should not be allowed. Policy managed databases and server pools is intended for users with bigger clusters (more number of nodes) , where you create groups of ‘n’ nodes into server pools & should be able to use this functionality.

  2. Dino says:

    If I have 2 Active node in 1 cluster.
    How many Spare nodes could I have ?

    • Oracle RAC One-node and RAC are two different things.

      With “RAC One-node”, you can only have 1 node (1 active, 1 passive). With RAC multiple nodes, if you you want to configure HA for physical sites, you can have RAC or SI on secondary side. Replication will have to be taken care by implementation of Data Guard (preferred method).

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