Top 25+ RAC Interview Questions & Answers [ ORACLE TRICKS ]
Last updated on 04th Jul 2020, Blog, Interview Questions
These Oracle RAC Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Oracle RAC . As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer.we are going to cover top 100 Oracle RAC Interview questions along with their detailed answers. We will be covering Oracle RAC scenario based interview questions, Oracle RAC interview questions for freshers as well as Oracle RAC interview questions and answers for experienced.
1) What is cache fusion?
In a RAC environment, it is the combining of data blocks, which are shipped across the interconnect from remote database caches (SGA) to the local node, in order to fulfill the requirements for a transaction (DML, Query of Data Dictionary).
2) What is split brain?
When database nodes in a cluster are unable to communicate with each other, they may continue to process and modify the data blocks independently. If the same block is modified by more than one instance, synchronization/locking of the data blocks does not take place and blocks may be overwritten by others in the cluster. This state is called split brain.
3) What is the difference between Crash recovery and Instance recovery?
When an instance crashes in a single node database on startup a crash recovery takes place. In a RAC environment the same recovery for an instance is performed by the surviving nodes called Instance recovery.
4) What is the interconnect used for?
It is a private network which is used to ship data blocks from one instance to another for cache fusion. The physical data blocks as well as data dictionary blocks are shared across this interconnect.
5) How do you determine what protocol is being used for Interconnect traffic?
One of the ways is to look at the database alert log for the time period when the database was started up.
6) What methods are available to keep the time synchronized on all nodes in the cluster?
Either the Network Time Protocol(NTP) can be configured or in 11gr2, Cluster Time Synchronization Service (CTSS) can be used.
7) What files components in RAC must reside on shared storage?
Spfiles, ControlFiles, Datafiles and Redolog files should be created on shared storage.
8) Where does the Clusterware write when there is a network or Storage missed heartbeat?
The network ping failure is written in $CRS_HOME/log
9) How do you find out what OCR backups are available?
The ocrconfig -showbackup can be run to find out the automatic and manually run backups.
10) If your OCR is corrupted what options do have to resolve this?
You can use either the logical or the physical OCR backup copy to restore the Repository.
11) Mention what is the difference between single instance environment and RAC environment?
|Instance has its own SGA (System Global Area)||Each instance has its own SGA|
|Datafiles and control files are accessed by only one instance||Datafiles and control files shared by all instances|
|Online redo logfile dedicated for read/write to only one instance||Online redo logfile only one instance can write, but other instances can read during recovery and archiving.|
|Flash recovery log accessed by only one instance||Flash recovery log shared by all instances|
|Alert log and trace files dedicated to the instance||Alert log and trace files are private to each instance. Other instance never write or read to those files|
12) What happens if you keep split brain syndrome in RAC unresolved? How it can be resolved?
If you keep split brain syndrome unresolved, then there would be data integrity issue. The blocks changed in one instance will not be locked and could be over-written by another instance. It is resolved by using the voting disk, it will decide which node(s) will survive and which node(s) will be evicted.
13) Mention in RAC what files should be created on shared storage?
In RAC ControlFiles, Spfiles, Redolog files, and Datafiles should be created on shared storage.
14) Mention what are the tools provided in Oracle Enterprise Manager?
Tools provided in Oracle Enterprise Manager are,
- It is used to deliver the centralized management system and provides configuration and administration capabilities.
- It provides the cost reduction plans and provides higher efficiency
- It is used as a graphical management tool to manage the database to make it configure automatically.
- It is related to the Oracle Clusterware. It is used to maintain the services of the Oracle RAC.
- It also manages the server pools that are being created with the Oracle Clusterware and provision to manage it from a single place.
15) Mention what is OLR?
ORL stands for Oracle Local Repository (OLR). It consists of information which enables the cluster programs to initiate with the OCR in the ASM Storage. Until the grid process are started, the ASM file is unavailable. In such case, a local copy of the data of the OCR is required, that is stored in OLR.
16) Explain the use of VIP and OLR?
The alternate to virtual IP address is called VIP. Every node of the cluster is mapped with VIP and therefore in case of any node failure the VIP notifies the application about the node being down and itself switches towards the surviving node. In the absence of VIP, the TCP timeout would be encountered by the application. This TCP timeout then would notify a dead session as a result of the failure.
OLR or popularly known as Oracle Local Repository consists of details related to cluster and the processes related to it when the OCR is in the ASM system. The grid process takes time to start and in the meanwhile ASM system will also be unavailable and therefore an OCR local copy is booted which is eventually stored inside OLR.
17) What do you understand by rolling upgrade?
A rolling patch refers to the cluster binaries being applied on the up and running databases of RAC environment. The cluster nodes are rolled one after another where the patched node is unavailable whereas all other instances are in open state.
18) What do you understand by cache fusion?
This is the basic Oracle RAC Interview Question asked in an interview. The combination of data blocks coming straight from remote database caches and getting shipped to the local nodes so that the requirements for doing a transaction such as a DDL or a DML can be fulfilled.
19) What are the uses of RAC?
RAC or Real Application Clusters are used to support all the software where aspects such as high availability and grouped level of clustering are expected. Other uses of RAC are:
- Detection of any unwanted results or errors: RAC in itself is efficient in providing a very quick solution to every detected problem. It makes use of auto recovery from the failures way before it is reported to the user.
- Reliability: The RAC helps in ensuring that the server responsible for managing the database is not just dependent on the single point of failure. In other words, it builds and provides a fault tolerant mechanism where even if one node goes down the entire system doesn’t go down and the other provided sources should take its place and thereby providing reliability.
- Continuous Operations: All those planned, as well as unplanned outages, should not affect BAU
- Recoverability: RAC ensures that if there is any failure at any given point of time, the state can be recovered easily at least until the last checkpoint made.
20) What is the ASM Metadata backup technique?
Md_backup is the command which can be used to take ASM metadata backup. It is also used to restore the disk group based configurations if a storage loss for ASM disk group is encountered.
Let us move to the next Oracle RAC Interview Questions.
26)Suppose your remote nodes have some inventory and you are given the task of identifying and verifying them. How will you do that?
“Opatch Inventory-all_nodes” is the command which will ensure that you are able to access the data of all the remotely located nodes by just a single node.
21)How do you find out what object has its blocks being shipped across the instance the most?
You can use the dba_hist_seg_stats.
22)What is a VIP in RAC use for?
The VIP is an alternate Virtual IP address assigned to each node in a cluster. During a node failure the VIP of the failed node moves to the surviving node and relays to the application that the node has gone down. Without VIP, the application will wait for TCP timeout and then find out that the session is no longer live due to the failure.
23)How do we know which database instances are part of a RAC cluster?
You can query the V$ACTIVE_INSTANCES view to determine the member instances of the RAC cluster.
24)What is OCLUMON used for in a cluster environment?
The Cluster Health Monitor (CHM) stores operating system metrics in the CHM repository for all nodes in a RAC cluster. It stores information on CPU, memory, process, network and other OS data, This information can later be retrieved and used to troubleshoot and identify any cluster related issues. It is a default component of the 11gr2 grid install. The data is stored in the master repository and replicated to a standby repository on a different node.
25)What would be the possible performance impact in a cluster if a less powerful node (e.g. slower CPU’s) is added to the cluster?
All processing will show down to the CPU speed of the slowest server.
26)What is the purpose of OLR?
Oracle Local repository contains information that allows the cluster processes to be started up with the OCR being in the ASM storage system. Since the ASM file system is unavailable until the Grid processes are started up a local copy of the contents of the OCR is required which is stored in the OLR.
27)What is the default memory allocation for ASM?
In 10g the default SGA size is 1G in 11g it is set to 256M and in 12c ASM it is set back to 1G.
28)How do you backup ASM Metadata?
You can use md_backup to restore the ASM diskgroup configuration in-case of ASM diskgroup storage loss.
29)What files can be stored in the ASM diskgroup?
In 11g the following files can be stored in ASM diskgroups.
- Redo logfiles
In 12c the files below can also new be stored in the ASM Diskgroup
- Password file
30)What it the ASM POWER_LIMIT?
This is the parameter which controls the number of Allocation units the ASM instance will try to rebalance at any given time. In ASM versions less than 126.96.36.199 the default value is 11 however it has been changed to unlimited in later versions.
31)What is Oracle Real Application Clusters?
Oracle RAC enables you to cluster Oracle databases.Oracle RAC uses Oracle Clusterware for the infrastructure to bind multiple servers so they operate as a single system.Oracle Clusterware is a portable cluster management solution that is integrated with Oracle Database.
32)What are the file storage options provided by Oracle Database for Oracle RAC?
The file storage options provided by Oracle Database for Oracle RAC are,
- Automatic Storage Management (ASM)
- OCFS2 and Oracle Cluster File System (OCFS)
- A network file system
- Raw devices
Enroll in Oracle RAC Certification Course Led By Industry ExpertsWeekday / Weekend BatchesSee Batch Details
33) What is a CFS?
A cluster File System (CFS) is a file system that may be accessed (read and write) by all members in a cluster at the same time. This implies that all members of a cluster have the same view.
34)Where are the Clusterware files stored on a RAC environment?
The Clusterware is installed on each node (on an Oracle Home) and on the shared disks (the voting disks and the CSR file)
35)What command would you use to check the availability of the RAC system?
crs_stat -t -v (-t -v are optional)
36)What is the minimum number of instances you need to have in order to create a RAC?
You can create a RAC with just one server.
37) Name two specific RAC background processes?
RAC processes are: LMON, LMDx, LMSn, LKCx and DIAG.
38)What is hangcheck timer used for ?
The hangcheck timer checks regularly the health of the system. If the system hangs or stop the node will be restarted automatically.
There are 2 key parameters for this module:
- hangcheck-tick: this parameter defines the period of time between checks of system health. The default value is 60 seconds; Oracle recommends setting it to 30seconds.
- hangcheck-margin: this defines the maximum hang delay that should be tolerated before hangcheck-timer resets the RAC node.
39)What files can I put on Linux OCFS2?
For optimal performance, you should only put the following files on Linux OCFS2:
- Control Files
- Redo Logs
- Archive Logs
- Shared Configuration File (OCR)
- Voting File
40)Is it possible to use ASM for the OCR and voting disk?
No, the OCR and voting disk must be on raw or CFS (cluster file system).
41)Can I change the name of my cluster after I have created it when I am using Oracle Clusterware?
No, you must properly uninstall Oracle Clusterware and then re-install.
42) What the O2CB is?
The O2CB is the OCFS2 cluster stack. OCFS2 includes some services. These services must be started before using OCFS2 (mount/ format the file systems).
43)What the OCR file is used for?
OCR is a file that manages the cluster and RAC configuration.
44)What the Voting Disk file is used for?
The voting disk is nothing but a file that contains and manages information of all the node memberships.
45) Can you have many database versions in the same RAC?
Yes, but Clusterware version must be greater than the greater database version.
46) What was RAC previous name before it was called RAC?
OPS: Oracle Parallel Server
47) What RAC component is used for communication between instances?
48) What is the difference between normal views and RAC views?
A RAC view has the prefix ‘G’. For example, GV$SESSION instead of V$SESSION
49) Which command will we use to manage (stop, start) RAC services in command-line mode?
50)what is dynamic remastering ? When will the dynamic remastering happens?
dynamic remastering is ability to move the ownership of resource from one instance to another instance in RAC. dynamic resource remastering is used to implement for resource affinity for increased performance. resource affinity optimized the system in situation where update transactions are being executed in one instance. when activity shift to another instance the resource affinity correspondingly move to another instance. If activity is not localized then resource ownership is hashed to the instance.
In 10g dynamic remastering happens in file+object level.the process of remastering is very stringent. For one instance should touch more than 50 times than the other instance in particular period(say 10 mints). this touch ratio and time can be tuned by gc_affinity_limit and _gc_affinity_time parameter.
Get Oracle RAC Training from Top-Rated Instructors
- Instructor-led Sessions
- Real-life Case Studies
51) why we required to maintain odd number of voting disks?
Odd number of disk are to avoid split brain, When Nodes in cluster can’t talk to each other they run to lock the Voting disk and whoever lock the more disk will survive, if disk number are even there are chances that node might lock 50% of disk (2 out of 4) then how to decide which node to evict.
whereas when number is odd, one will be higher than other and each for cluster to evict the node with less number
52)How you check the health of Your RAC Database?
‘crsctl’ command from root or oracle user can be used to check the clusterware health But for starting or stopping we have to use root user or any privilege user.
[oracle@TEST_NODE1 ~]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
53) How you check the services in RAC Node?
We can check the service or start the services with ‘srvctl’ command.load balanced/TAF service named RAC online.
[oracle@TEST_NODE1 ~]$ srvctl start service -d orcl -s RAC
[oracle@TEST_NODE1 ~]$ crsstat
54)If there is some issue with virtual IP how will you troubleshoot it?How will you change virtual ip?
To change the VIP (virtual IP) on a RAC node, use the command
[oracle@testnode oracle]$ srvctl modify nodeapps -A new_address
55) How you will backup your RAC Database?
Backup strategy of RAC Database:
An RAC Database consists of:
- Voting disk &
- Database files, controlfiles, redolog files & Archive log files
56) What is RAC and how is it different from non RAC databases?
RAC stands for Real Application Cluster, you have n number of instances running in their own separate nodes and based on the shared storage. Cluster is the key component and is a collection of servers operations as one unit. RAC is the best solution for high performance and high availably. Non RAC databases has single point of failure in case of hardware failure or server crash.
57) Give the usage of srvctl ?
srvctl start instance -d db_name -i “inst_name_list” [-o start_options]
srvctl stop instance -d name -i “inst_name_list” [-o stop_options]
srvctl stop instance -d orcl -i “orcl3,orcl4” -o immediate
srvctl start database -d name [-o start_options]
srvctl stop database -d name [-o stop_options]
srvctl start database -d orcl -o mount
58) Mention the Oracle RAC software components ?
Oracle RAC is composed of two or more database instances. They are composed of Memory structures and background processes same as the single instance database.Oracle RAC instances use two processes GES(Global Enqueue Service), GCS(Global Cache Service) that enable cache fusion.Oracle RAC instances are composed of following background processes:
ACMS—Atomic Controlfile to Memory Service (ACMS)
GTX0-j—Global Transaction Process
LMON—Global Enqueue Service Monitor
LMD—Global Enqueue Service Daemon
LMS—Global Cache Service Process
LCK0—Instance Enqueue Process
RMSn—Oracle RAC Management Processes (RMSn)
RSMN—Remote Slave Monitor
59) What is GRD?
GRD stands for Global Resource Directory. The GES and GCS maintains records of the statuses of each datafile and each cahed block using global resource directory.This process is referred to as cache fusion and helps in data integrity.
60)What are the different network components are in 10g RAC?
public, private, and vip components
Private interfaces is for intra node communication. VIP is all about availability of application. When a node fails then the VIP component fail over to some other node, this is the reason that all applications should based on vip components means tns entries should have vip entry in the host list
61) Give Details on ACMS:
ACMS stands for Atomic Controlfile Memory Service.In an Oracle RAC environment ACMS is an agent that ensures a distributed SGA memory update(ie)SGA updates are globally committed on success or globally aborted in event of a failure.
62) What are the major RAC wait events?
In a RAC environment the buffer cache is global across all instances in the cluster and hence the processing differs.The most common wait events related to this are gc cr request and gc buffer busy
GC CR request :the time it takes to retrieve the data from the remote cache
Reason: RAC Traffic Using Slow Connection or Inefficient queries (poorly tuned queries will increase the amount of data blocks requested by an Oracle session. The more blocks requested typically means the more often a block will need to be read from a remote instance via the interconnect.)