Preparing for an Oracle RAC interview? This post collects 50 Oracle Real Application Clusters interview questions and answers, from architecture and Cache Fusion to Clusterware, networking, node eviction, services and troubleshooting. Each answer has been checked against Oracle's documentation for Oracle Database and Grid Infrastructure 19c and later.
Related posts on this blog: Oracle RAC guides | 57 Oracle Exadata Interview Questions | 25 Oracle ZDM Interview Questions
Section 1: RAC Architecture Basics
Q1. What is Oracle Real Application Clusters (RAC)?
Answer: Oracle RAC lets several database instances, each running on its own server (node), open and work on one shared database at the same time. It gives you high availability, because if one node fails the others keep serving users, and scalability, because you can add nodes as load grows. An Oracle RAC database can have up to 100 instances.
Q2. What is the difference between a database and an instance in RAC?
Answer: A single-instance database has a one-to-one relationship between instance (memory and processes) and database (files). RAC has a one-to-many relationship: one set of database files on shared storage, opened by many instances, each with its own SGA and background processes.
Q3. What are the main components needed to build a RAC database?
Answer: Cluster nodes, shared storage that every node can reach (usually Oracle ASM), a private network (interconnect) between the nodes, a public network for clients, and Oracle Grid Infrastructure (Oracle Clusterware plus Oracle ASM).
Q4. What is Oracle Clusterware?
Answer: Oracle Clusterware is Oracle's cluster software, installed as part of Grid Infrastructure. It manages node membership, monitors and restarts resources (databases, listeners, VIPs, services, ASM), and provides the heartbeats and voting mechanism that keep the cluster healthy.
Q5. What is Cache Fusion?
Answer: Cache Fusion is the RAC mechanism that ships data blocks directly from one instance's buffer cache to another's over the interconnect, instead of writing them to disk and reading them back. This diskless cache coherency is what makes RAC perform well.
Q6. What is the Global Resource Directory (GRD)?
Answer: The GRD is a memory structure, spread across all instances, that records which instance holds which data block and in what mode. The Global Cache Service (GCS) and Global Enqueue Service (GES) use it to coordinate access to shared resources. Each resource has a master instance that tracks its status.
Q7. What is the difference between GCS and GES?
Answer: Global Cache Service (GCS) coordinates access to data blocks in the buffer caches, which is Cache Fusion. Global Enqueue Service (GES) coordinates global enqueues (locks) that are not data blocks, such as library cache and dictionary cache locks, and handles global deadlock detection.
Section 2: RAC Background Processes
Q8. What does the LMON process do?
Answer: LMON is the Global Enqueue Service Monitor. It monitors the whole cluster to manage global resources, handles instance deaths, and performs the global resource part of recovery. It also manages reconfiguration when an instance joins or leaves the cluster.
Q9. What does the LMD process do?
Answer: LMD is the Global Enqueue Service Daemon. It manages incoming remote enqueue requests within each instance and handles global deadlock detection.
Q10. What does the LMS process do?
Answer: LMS is the Global Cache Service process, and usually the busiest RAC process. It sends block images between the buffer caches of different instances (Cache Fusion), manages global data block access, and controls the flow of messages to remote instances. The number of LMS processes is set by GCS_SERVER_PROCESSES.
Q11. What does the LCK0 process do?
Answer: LCK0 is the Instance Enqueue process. It handles non-Cache Fusion resource requests, such as library cache and row cache requests.
Q12. Which Clusterware daemons should a RAC DBA know?
- OHASD (Oracle High Availability Services): starts first and brings up the rest of the stack.
- OCSSD (Cluster Synchronization Services): node membership and heartbeats. If it fails, the node reboots.
- CRSD (Cluster Ready Services): manages cluster resources, and creates the automatic OCR backups.
- EVMD (Event Manager): publishes cluster events.
- CTSSD (Cluster Time Synchronization Service): keeps time in sync when NTP/chrony is not configured.
- oraagent / orarootagent: agents that start, stop and check resources.
Section 3: OCR, OLR and Voting Disks
Q13. What is the Oracle Cluster Registry (OCR)?
Answer: OCR stores Oracle Clusterware and Oracle RAC configuration information: which databases, instances, services, listeners and VIPs exist, and how they depend on each other. It lives on shared storage, usually in an ASM disk group.
Q14. What is the Oracle Local Registry (OLR)?
Answer: OLR is a registry like OCR, but it sits on local storage on each node and holds information specific to that node. OHASD reads it at startup, before ASM and OCR are available, so the node can bring up its own part of the stack.
Q15. How is OCR backed up?
Answer: Clusterware automatically backs up OCR every 4 hours, and also keeps daily and weekly backups. You cannot change how often these run or how many are kept. You can also take a manual backup at any time as root:
# ocrconfig -manualbackup
# ocrconfig -showbackup
Q16. What is a voting disk (voting file)?
Answer: Voting files record cluster membership. Every node writes a disk heartbeat to them, and Clusterware uses them to decide which nodes stay in the cluster when nodes can no longer talk to each other (split brain).
Q17. How many voting files does ASM create?
Answer: When voting files are in ASM, the number depends on the disk group redundancy:
- External redundancy: 1 voting file
- Normal redundancy: 3 voting files
- High redundancy: 5 voting files
You cannot add or delete individual voting files in ASM. To move them you use crsctl replace votedisk +DG.
Q18. Why is the number of voting files odd, and what is the majority rule?
Answer: A node must be able to access more than half of the voting files to stay in the cluster. With an odd number (1, 3 or 5), there is always a clear majority. For example, with 3 voting files a node must see at least 2.
Q19. How do you check OCR and voting disk status?
# ocrcheck
$ crsctl query css votedisk
Section 4: Networking: VIP, SCAN and Interconnect
Q20. What is a node VIP and why is it needed?
Answer: Each node has a virtual IP (VIP) on the public network. If the node fails, its VIP moves to a surviving node, which immediately rejects new connections. Clients get an error at once and try the next address, instead of waiting for a long TCP timeout.
Q21. What is SCAN?
Answer: Single Client Access Name (SCAN) is one name that clients use to connect to any database in the cluster. Because it points to the whole cluster rather than to a node, you can add or remove nodes without changing client connection strings.
Q22. How many IP addresses should SCAN resolve to?
Answer: Oracle recommends three IP addresses, resolved by DNS round robin or by GNS, regardless of the number of nodes. At minimum SCAN must resolve to one address. A SCAN VIP and a SCAN listener are created for each address. In a cluster with fewer than three nodes, one node hosts two SCAN VIPs and their listeners.
Q23. What is the difference between a SCAN listener and a local listener?
Answer: SCAN listeners run on the SCAN VIPs and can run on any node. They receive client connections and redirect them to the local listener on the node running the least-loaded instance that offers the requested service. Instances register with SCAN listeners through the REMOTE_LISTENER parameter.
Q24. What is GNS?
Answer: Grid Naming Service (GNS) lets the cluster manage its own names and addresses. The corporate DNS delegates a subdomain to GNS, and the node VIPs and SCAN VIPs can be obtained from DHCP. This means less manual DNS work when nodes are added.
Q25. What is the private interconnect used for?
Answer: The private interconnect carries the network heartbeat between nodes and all Cache Fusion block traffic. It should be a dedicated, low-latency, high-bandwidth private network.
Q26. What is HAIP (Redundant Interconnect Usage)?
Answer: When you define several private interfaces, Clusterware creates from one to four highly available IP (HAIP) addresses in the link-local 169.254.x.x range. It load-balances interconnect traffic across them. If an interface fails, its HAIP moves to a working interface. Clusterware uses at most four interfaces at a time, and each private interface should be on a different subnet.
Section 5: Node Eviction and Split Brain
Q27. What is split brain?
Answer: Split brain happens when nodes lose the interconnect between them and each group believes the others are dead. If both groups kept writing to the shared database, data would be corrupted. Clusterware prevents this by evicting nodes so that only one group survives.
Q28. What are the two CSS heartbeats?
Answer: The network heartbeat over the private interconnect, and the disk heartbeat to the voting files. Each node sends both, and missing either one for too long leads to eviction.
Q29. What are misscount, disktimeout and reboottime?
- misscount: how long the network heartbeat can be missing before a node is evicted. The default is 30 seconds on Linux in 11gR2 and later.
- disktimeout: how long a node can fail to write to the voting files. The default is 200 seconds.
- reboottime: time allowed for a node to reboot after eviction. The default and recommended value is 3 seconds.
Check them with crsctl get css misscount (and disktimeout, reboottime). Oracle advises against changing them unless you have a specific reason, such as vendor guidance for your storage.
Q30. Which node survives an eviction?
Answer: Normally the larger sub-cluster survives. If both are the same size, the sub-cluster containing the node with the lowest node number usually survives. From 12.2, server weight-based node eviction lets you mark more important servers or resources (with the -css_critical option) so they are favoured as a tie-breaker.
Q31. Where do you look when a node is evicted?
Answer: Start with the CSSD log (ocssd trace) and the Clusterware alert log in the Grid Infrastructure diagnostic destination on each node, then the OS logs (/var/log/messages). Look for missed network heartbeats (interconnect problems) or voting disk I/O timeouts (storage problems). Oracle's AHF/TFA tools can collect all of these logs at once.
Section 6: Database Administration in RAC
Q32. Why does each RAC instance have its own redo thread and undo tablespace?
Answer: Each instance writes redo to its own thread of online redo log groups and uses its own undo tablespace, so instances don't contend for the same log files and undo. All redo threads and undo tablespaces are on shared storage so any instance can read them for recovery.
Q33. How is instance recovery done in RAC?
Answer: When an instance fails, a surviving instance detects it. LMON remasters the failed instance's global resources, and then the surviving instance's SMON reads the failed instance's redo thread and performs recovery. The database stays open on the other instances while this happens.
Q34. Which parameters must be the same on all instances, and which must be unique?
Answer: Parameters such as DB_NAME, DB_BLOCK_SIZE, CONTROL_FILES and CLUSTER_DATABASE must be identical on all instances. Parameters such as INSTANCE_NUMBER, THREAD and UNDO_TABLESPACE must be unique per instance. Use one shared SPFILE with SID='*' or SID='inst' settings.
Q35. How do you start and stop a RAC database?
Answer: Use srvctl so Clusterware stays aware of the state:
$ srvctl stop database -db ORCL
$ srvctl start database -db ORCL
$ srvctl status database -db ORCL
$ srvctl stop instance -db ORCL -instance ORCL2
Q36. How do you check the status of all cluster resources?
$ crsctl stat res -t # cluster resources
$ crsctl stat res -t -init # lower-stack (OHASD) resources
$ crsctl check cluster -all # stack health on all nodes
Q37. How should sequences be defined in RAC?
Answer: Use a large CACHE with NOORDER (the default) so each instance gets its own range of numbers without coordinating with the others. ORDER or NOCACHE forces cluster-wide coordination and can cause heavy contention.
Q38. What are GV$ views?
Answer: GV$ views show the same information as V$ views but for all instances, with an INST_ID column. For example, GV$SESSION lists sessions on every instance.
Section 7: Services, Workload and High Availability
Q39. What is a database service in RAC?
Answer: A service is a named workload, such as OLTP or BATCH, that you can run on chosen instances. Clients connect to the service name, not to an instance. You can set preferred and available instances so the service fails over automatically.
$ srvctl add service -db ORCL -service oltp -preferred ORCL1,ORCL2 -available ORCL3
$ srvctl relocate service -db ORCL -service oltp -oldinst ORCL1 -newinst ORCL3
Q40. What is the difference between administrator-managed and policy-managed databases?
Answer: Administrator-managed databases tie instances to specific nodes. Policy-managed databases ran in server pools and moved between nodes automatically. Policy-managed databases were deprecated in 21c and are desupported in 23ai/26ai, so administrator-managed is the deployment to use today.
Q41. What are FAN, ONS and Fast Connection Failover (FCF)?
Answer: Fast Application Notification (FAN) sends events when services, instances or nodes go up or down. Oracle Notification Service (ONS) carries those events to clients. FCF is how Oracle connection pools (UCP, OCI session pool, ODP.NET) react to FAN: they remove dead connections and rebalance at once, instead of waiting for timeouts.
Q42. What is the difference between TAF, Application Continuity and Transparent Application Continuity?
- TAF (Transparent Application Failover) reconnects sessions and can resume queries, but in-flight transactions are lost.
- Application Continuity (AC), introduced in 12c, replays in-flight work on a surviving instance after a recoverable outage. It works with Transaction Guard, which records whether the last commit succeeded.
- Transparent Application Continuity (TAC), from 18c, tracks session state automatically so applications get replay without code changes. You enable it on a service with
-failovertype AUTO.
Q43. What is Oracle RAC One Node?
Answer: RAC One Node is a single instance of a RAC database that runs on one node of a cluster. It fails over to another node if its node fails. You can also move it to another node while it is running (online database relocation), which is useful for planned maintenance.
$ srvctl relocate database -db ORCL -node node2
Q44. What is Flex ASM?
Answer: With Flex ASM, ASM instances don't have to run on every node. Database instances can connect to an ASM instance on another node, and if their local ASM instance fails they fail over to another one instead of crashing. The default cardinality is three ASM instances. Flex ASM is enabled by default from 12c Release 2.
Q45. What happened to Flex Cluster Leaf nodes?
Answer: Leaf nodes were deprecated in 18c and desupported in 19c. In 19c and later, all nodes in a Flex Cluster work as Hub nodes.
Section 8: Performance, Patching and Troubleshooting
Q46. What are common RAC-specific wait events?
- gc cr request / gc current request: waiting for a block from another instance.
- gc cr block 2-way / 3-way, gc current block 2-way / 3-way: block received after 2 or 3 network hops.
- gc buffer busy acquire / release: contention on a hot block, often a busy index leaf or segment header.
- gc cr block busy / gc current block busy: the holding instance needed to flush redo or build a consistent-read copy before sending the block.
Q47. How do you reduce global cache contention?
Answer: Send related workload to the same instance through services, so the blocks it needs stay in one cache. Fix hot blocks, for example with reverse-key indexes or hash partitioning for right-growing indexes, and use cached NOORDER sequences. Make sure the interconnect is fast, uses a dedicated network and is not dropping packets. AWR and ASH reports show the global cache statistics per instance.
Q48. How do you patch Grid Infrastructure and RAC with minimal downtime?
Answer: Apply Release Updates in rolling mode, one node at a time, with opatchauto run as root. The other nodes keep serving users while each node is patched, and services move off the node being patched. Oracle Fleet Patching and Provisioning (FPP) and out-of-place patching can reduce downtime further.
Q49. What is cluvfy used for?
Answer: The Cluster Verification Utility (cluvfy) checks that nodes meet the prerequisites before installing or adding nodes, and checks the health of an existing cluster. For example:
$ cluvfy stage -pre crsinst -n node1,node2 -verbose
$ cluvfy comp nodecon -n all
Q50. How do you add a node to an existing cluster?
Answer: Run cluvfy stage -pre nodeadd, extend Grid Infrastructure to the new node (the installer wizard via gridSetup.sh, because the old addnode script is deprecated from 19c), run the root scripts, extend the database home, and then add the instance with DBCA or srvctl add instance. Finally, update the services to include the new instance.
Quick Revision
- Cache Fusion moves blocks between buffer caches over the interconnect, managed by GCS (LMS) and GES (LMD, LMON).
- OCR is shared cluster configuration and is backed up every 4 hours. OLR is local to each node.
- ASM voting files: 1 (external), 3 (normal), 5 (high). A node must see more than half of them.
- SCAN should resolve to 3 IP addresses. HAIP uses up to 4 private interfaces.
- Defaults: misscount 30s (Linux), disktimeout 200s, reboottime 3s.
- Policy-managed databases were deprecated in 21c. Leaf nodes were desupported in 19c.
- Use services, FAN/FCF and Application Continuity or TAC for continuous availability.
References: Oracle Real Application Clusters Administration and Deployment Guide, Oracle Clusterware Administration and Deployment Guide, and Oracle Grid Infrastructure Installation Guides (docs.oracle.com).
ConversionConversion EmoticonEmoticon