Home » Oracle » Oracle Database » Oracle RAC interview Questions

Oracle RAC interview Questions

Oracle RAC interview Questions

This is a small compilation of Oracle RAC interview Questions which include both the Oracle RAC-specific questions and Oracle Clusterware questions. This is good for experienced level Professional

Oracle RAC-specific Questions

Question 1.
What are Oracle RAC and its uses?
Answer

  • Oracle RAC is a cluster database where multiple instances of Oracle run multiple nodes sharing a single physical database and have common data & control files
  • Each instance has its own log files and rollback segments (UNDO Tablespace) and can simultaneously execute transactions against the single database
  • Caches are synchronized using Oracle Cache Fusion Technology
  • Since Oracle RAC has multiple instances, it provides high availability and highly scalable Solutions for Business Applications
Oracle RAC interview Questions

Question 2.
What are the prerequisites or conditions for Oracle RAC setup?
Answer
Shared Storage, Private interconnect, Oracle Clusterware, Virtual IP, SCAN IP , Multiple servers

Question 3
What are the special background processes for RAC?
Answer
LCKn: Take care of Library cache and row cache locks
LMD: Request Global enqueues and instance lock
LMSn: Perform Global cache fusion
LMON
: Issues heartbeat and perform recovery
LMHB: Monitors the LMON,LMD, LMSn
ACMS: Atomic control file to memory service
GTX[i-j]:Global transaction Process
PING: Interconnect latency Measurement process
RMSn: Oracle RAC management process

Question 4
What is cache fusion?
Answer
Cache fusion is the Transfer of data blocks between RAC instances by using a private network(interconnect). Cache Fusion is the remote memory mapping of Oracle buffers, shared between the caches of participating nodes in the cluster. When a block of data is requested in an instance, it first checks if any instance has the block, and if the other instance has the data blocks, the instance gets the data block through cache fusion from another instance. If no instance is having the data block, then it is read from the data files on the storage.

Question 5
What is the purpose of Private Interconnect?
Answer
Clusterware uses the private interconnect for cluster synchronization (network heartbeat) and daemon communication between the clustered nodes. This communication is based on the TCP protocol. RAC uses the interconnect for cache fusion (UDP/RDS) and inter-process communication (TCP).

Question 6
What are RAC specific Parameters?
Answer
CLUSTER_DATABASE
CLUSTER_DATABASE_INSTANCE
INSTANCE_NUMBER
CLUSTER_INTERCONNECTS

Question 7
What are the initialization parameters that must have the same value for every instance in an Oracle RAC database and what should be unique?
Answer

Same Across the Instances
COMPATIBLE
CLUSTER_DATABASE
CLUSTER_DATABASE_INSTANCE
CONTROL_FILES
DB_BLOCK_SIZE
DB_DOMAIN
DB_FILES
DB_NAME
DB_RECOVERY_FILE_DEST
DB_RECOVERY_FILE_DEST_SIZE
DB_UNIQUE_NAME
INSTANCE_TYPE
PARALLEL_MAX_SERVERS
REMOTE_LOGIN_PASSWORD_FILE
UNDO_MANAGEMENT

Unique Across the instance
CLUSTER_DATABASE
CLUSTER_DATABASE_INSTANCE
INSTANCE_NUMBER
CLUSTER_INTERCONNECTS
UNDO_TABLESPACE

Question 8
What are the wait events in RAC?
Answer
gc buffer busy
gc buffer busy acquire
gc current request
gc cr request
gc cr failure
gc current block lost
gc cr block lost
gc current block corrupt
gc cr block corrupt
gc current block busy
gc cr block busy
gc current block congested
gc cr block congested.
gc current block 2-way
gc cr block 2-way
gc current block 3-way
gc cr block 3-way
(even if we have n number of nodes, there can be only 3-way wait event)
gc current grant 2-way
gc cr grant 2-way
gc current grant busy
gc current grant congested
gc cr grant congested
gc cr multi block read
gc current multi-block request
gc cr multi block request
gc cr block build time
gc current block flush time
gc cr block flush time
gc current block send time
gc cr block send time
gc current block pin time
gc domain validation
gc current retry
ges inquiry response
gcs log flush sync

Question 9
What is the difference between CR(Consistent Read) block and the cur (current) block?
Answer
The current block contains changes for all the committed and yet-to-be-committed transactions. A consistent read (CR) block represents a consistent snapshot of the data from a previous point in time.

Question 10
What is the difference between Crash recovery and Instance recovery?
Answer
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.

Question 11
How to kill a session in Oracle RAC?
Answer
We use the same command to kill the session on the instance connected as the single node database only

alter system kill session 'SID, SERIAL#;

If we have to kill a session on another instance while connected to a different instance, we can use the below command

alter system kill session 'SID, SERIAL#,@instance_id'

Question 12
What is Oracle RAC One Node?
Answer
Oracle RAC One Node Option is the single instance of Oracle RAC running in the cluster. This option provides flexibility to consolidate multiple databases in a cluster providing benefits like high availability, online rolling patch application

Oracle Clusterware Specific Questions

Question 1
What are Oracle Clusterware/Daemon processes and what do they do?
Answer
ocssd: It Manages cluster configuration by controlling which nodes are members of the cluster. It is managed by the process cssdagent. It is monitored through both cssdagent and cssdmonitor

crsd: Manages high availability operations within the cluster. It manages resources like databases, listeners, and VIPs.
It manages cluster resources based on the configuration information that is stored in OCR for each resource. This includes start, stop monitor, and failover operations. T

See also  How to create stat table in Oracle

oprocd: OPROCD is spawned by init. cssd and runs as the root user. It is used to detect hardware and driver freezes on the local node. If the node has been frozen for long enough that the other nodes have evicted it from the cluster

ctss: Cluster Time Synchronization Service. Provides time management in a cluster for Oracle Clusterware.

evmd: Event Management daemon publishes events created by
Oracle Clusterware

ohasd: Oracle high availability daemon. It is the first process which is started and it spawned all the processes in the cluster

orarootagent: It is called Oracle Root Agent. A specialized oraagent process that helps crsd manage resources owned by root, such as the network, and the Grid virtual IP address.

oragent: Extends Clusterware to support Oracle-specific requirements and complex resources. Runs server callout scripts when FAN events occur. This process was known as RACG in Oracle Clusterware 11g release 1 (11.1).

Question 2
What are the Main Clusterware components?
Answer
Voting Disk – Oracle RAC uses the voting disk to manage cluster membership by way of a health check and arbitrates cluster ownership among the instances in case of network failures. The voting disk must reside on a shared disk.

Oracle Cluster Registry (OCR) – Maintains cluster configuration information as well as configuration information about any cluster database within the cluster. The OCR must reside on a shared disk that is accessible by all of the nodes in your cluster. The daemon OCSSd manages the configuration info in OCR and maintains the changes to the cluster in the registry.

Virtual IP (VIP) – When a node fails, the VIP associated with it is automatically failed over to some other node and the new node re-arps the world indicating a new MAC address for the IP. Subsequent packets sent to the VIP go to the new node, which will send error RST packets back to the clients. This results in the clients getting errors immediately.

crsd – Cluster Resource Services Daemon. It manages the startup the resources like database, listener, VIP
cssd – Cluster Synchronization Services Daemon. Manages cluster configuration by controlling which nodes are members of the cluster
evmd – Event Manager Daemon

Question 3
What is the difference between SRVCTL and CRSCTL utilities?
Answer

SRVCTL(Server control( is a command-line interface that you can use to manage Oracle resources, such as databases, services, or listeners in the cluster.
It can manage server pools that have names prefixed with ora.*

crsctl (Oracle Clusterware Control) is a command-line tool that you can use to manage Oracle Clusterware. crsctl should be used for general Clusterware management and management of individual resources.

Oracle Clusterware 11g release 2 (11.2) introduces cluster-aware commands with which you can perform operations from any node in the cluster on another node in the cluster, or on all nodes in the cluster, depending on the operation.

Question 3a

What is an OCR file?
Answer

  • OCR stands for Oracle cluster Registry and stores and manages information about the components that Oracle Clusterware controls, such as Oracle RAC databases, listeners, virtual IP addresses (VIPs), services and any applications.
  • The OCR must reside on a shared disk that is accessible by all of the nodes in your cluster.
  • The daemon OCSSd manages the configuration info in OCR and maintains the changes to the cluster in the registry.
  • The OCR stores configuration information in a series of key-value pairs in a tree structure. Oracle recommends doing multiplexing for the OCR files

Question 4
which file has OCR location in the filesystem? or How do you identify the OCR file location?
Answer
Check /var/opt/oracle/ocr.loc or /etc/ocr.loc or /ete/oracle/ocr.loc

or u can use
ocrcheck

Question 5
How do we take a backup of the OCR file? and how do we check the backups available?
Answer

  • Oracle has provided a utility called ocrconfig for performing the backups of the Oracle cluster registry files.
  • In Oracle 10.1 and above, the OCR is backed up automatically by one instance every four hours. The previous three backup copies are retained. A backup is also retained for each full day and at the end of each week. The frequency of backups and the number of files retained cannot be modified.
  • The backup is stored in $ORA_CRS_HOME/crs/cdata/crs
  • You can do an on-demand backup using the below command
ocrconfig -manualbackup
ocrconfig -export file_name.dmp

Also, it is recommended the backup the automatic backup taken by CRS

$cp -p -R /u01/app/crs/cdata /u02/crs_backup/ocrbackup/RAC1

You can also take backup using ocrdump

ocrdump -backupfile my_file

$cp -p -R ORA_CRS_HOME/crs/cdata/crs $BACKUP_LOCATION

You can check the backup by using the below command

ocrconfig -showbackup

Question 6
How to recover OCR file?
Answer
Stop Oracle Clusterware on each node using:

crsctl stop crs

Restore the backup file using ocrconfig -restore

ocrconfig -restore $ORA_CRS_HOME/cdata/crs/backup00.ocr

Start Oracle Clusterware on each node using:

crsctl start crs

This can also be done by export dump also

ocrconfig -import file_name.dmp

Question 7
What is local OCR (OLR)?
Answer
/etc/oracle/local.ocr
/var/opt/oracle/local.ocr

See also  How to calculate IOPS of an oracle database

Question 8
What is Voting file/disk and how many files should be there?
Answer
Oracle Clusterware uses the voting disk to determine which instances are members of a cluster. The voting disk is akin to the quorum disk, which helps to avoid split-brain syndrome. Oracle RAC uses the voting disk to manage cluster membership by way of a health check and arbitrates cluster ownership among the instances in case of network failures. The voting disk must reside on the shared cluster system or a shared raw device file.
Number of voting files must be odd i.e. 1, 3, 5, 7, 9, 11, 13, 15(max) etc.

If you configure voting disks on Oracle ASM, then you do not need to manually configure the voting disks. Depending on the redundancy of your disk group, an appropriate number of voting disks are created.

Question 9
How to take a backup of the voting file?
Answer
Run the following command to back up a voting disk. Perform this operation on every voting disk as needed where voting_disk_name is the name of the active voting disk and backup_file_name is the name of the file to which you want to back up the voting disk contents:

dd if=voting_disk_name of=backup_file_name

Example
dd if=/u/app/oracle/oradata/votingdisk-1 of=/u/oracle/backup/vote/vote1.dmp bs=4k

17646+1 records in

17646+1 records out

Question 10

How to recover the voting disk?
Answer
Run the following command to recover a voting disk where backup_file_name is the name of the voting disk backup file and voting_disk_name is the name of the active voting disk:

dd if=backup_file_name of=voting_disk_name

dd if=/u/oracle/backup/vote/vote1.dmp of=u/app/oracle/oradata/votingdisk-1 bs=4k

17646+1 records in

17646+1 records out

Question 11
How do I identify the voting disk location?
Answer

crsctl query css votedisk

Question 12
How to change the Voting Disk Configuration after Installing Real Application Clusters
Answer
You can dynamically add and remove voting disks after installing Real Application Clusters. Run the following command as the root user to add a voting disk:

crsctl add css  path

Run the following command as the root user to remove a voting disk:

crsctl delete css votedisk 

Note: If oracle Clusterware is down on all nodes, then use the force option.

crsctl add css votedisk   -force
crsctl delete css votedisk -force

Question 13
What are various IPs used in RAC? Or How many IPs do we need in RAC?
Answer
Public IP, Private IP, Virtual IP, SCAN IP

Question 14
What is the use of virtual IP in RAC?
Answer
When a node fails, the VIP associated with it is automatically failed over to some other node and the new node re-arps the world indicating a new MAC address for the IP. Subsequent packets sent to the VIP go to the new node, which will send error RST packets back to the clients. This results in the clients getting errors immediately.

Without using VIPs or FAN, clients connected to a node that died will often wait for a TCP timeout period (which can be up to 10 min) before getting an error. As a result, you don’t really have a good HA solution without using VIPs.

Question 15
What is the use of SCAN IP (SCAN name) and will it provide load balancing?
Answer
Single Client Access Name (SCAN) is a new Oracle Real Application Clusters (RAC) 11g Release 2, a feature that provides a single name for clients to access an Oracle Database running in a cluster. The benefit is clients using SCAN do not need to change if you add or remove nodes in the cluster.

Question 16
How many SCAN listeners will be running?
Answer
Three SCAN listeners only.

Question 17
What is FAN( Fast Application Notification )?
Answer
Applications can use Fast Application Notification (FAN) to enable rapid failure detection, balancing of connection pools after failures, and re-balancing of connection pools when failed components are repaired. The FAN process uses system events that Oracle publishes when cluster servers become unreachable or if network interfaces fail.

Question 18
What is FCF( Fast Connection Failover )?
Answer
Fast Connection Failover provides high availability to FAN-integrated clients, such as clients that use JDBC, OCI, or ODP.NET. If you configure the client to use fast connection failover, then the client automatically subscribes to FAN events and can react to database UP and DOWN events. In response, Oracle gives the client a connection to an active instance that provides the requested database service.

Question 19
What are TAF and TAF policies?
Answer
Transparent Application Failover (TAF) – A runtime failover for high availability environments, such as Real Application Clusters and Oracle Real Application Clusters Guard, TAF refers to the failover and re-establishment of application-to-service connections. It enables client applications to automatically reconnect to the database if the connection fails, and optionally resume a SELECT statement that was in progress. This reconnect happens automatically from within the Oracle Call Interface (OCI) library.

Question 20
What all components are included in nodeapps?
Answer
VIP, listener, ONS, GSD

Question 21
What are the uses of services? How to find out the services in the cluster?
Answer
Database services (services) are logical abstractions for managing workloads in Oracle Database. Services divide workloads into mutually disjoint groupings. Applications should use the services to connect to the Oracle database. Services define rules and characteristics (unique name, workload balancing, failover options, and high availability) to control how users and applications connect to database instances.
In an Oracle Real Application Clusters (Oracle RAC) environment, a service can span one or more instances and facilitate workload balancing based on transaction performance. This provides end-to-end unattended recovery, rolling changes by workload, and full location transparency. Oracle RAC also enables you to manage several service features with Enterprise Manager, the DBCA, and the Server Control Utility (SRVCTL).

See also  How to set statistics for Table/index/column in Oracle

Question 22
how to find out the master node in the Oracle RAC cluster?
Answer
To find out which is the master node, use any one of the below.
(i) olsnodes — Which ever displayed first, is the master node of the cluster.
(ii) select MASTER_NODE from v$ges_resource;
(iii) check the ocssd.log file and search for “master node number”.
(iv) oclumon manage -get master (in Oracle RAC 12c)
(v) ocrconfig -manualbackup

Question 23
How to know the public IPs, private IPs, and VIPs in RAC?
Answer

olsnodes -n -p -i
node1-pub 1 node1-prv node1-vip
node2-pub 2 node2-prv node2-vip

Question 24
What utility is used to start DB/instance? How can you shut down a single instance?
Answer


srvctl start database –d database_name
srvctl start instance –d database_name –i instance_name

Question 25
How to check the cluster (all nodes) status and How to check the cluster (one node) status?
Answer
To check the viability of Cluster Synchronization Services (CSS) across nodes:


$ crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
To check the viability of Cluster Synchronization Services (CSS) on one node
$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

Question 26
What is HAS (High Availability Service) and the commands?
Answer
HAS includes ASM & database instances and listeners.


crsctl check has
crsctl config has
crsctl disable has
crsctl enable has
crsctl query has releaseversion
crsctl query has softwareversion
crsctl start has
crsctl stop has [-f]

Question 27
Why is the interconnect used for? How do you determine what protocol is being used for Interconnect traffic?
Answer
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.
One of the ways is to look at the database alert log for the time period when the database was started up.

Question 28
What is a split-brain syndrome?
Answer
This will arise when two or more instances attempt to control a cluster database. In a two-node environment, one instance attempts to manage updates simultaneously while the other instance attempts to manage updates.

I hope you like this compilation of Oracle RAC Interview Questions.Please do provide feedback

Related Articles
Unix shell scripting interview questions : compilation of unix shell scripting interview questions for success in any interviews.Examples are given for the command also
Oracle interview questions : 49 Oracle Interview questions and answers : Basics , Oracle SQL to help you in interviews
Oracle PLSQL interview questions : 25 Oracle PLSQL interview questions with detailed explanation and answer for the success in interview
Weblogic Interview questions : Weblogic Interview questions to help you |How to access the admin console|States of the Weblogic Server|multicast and unicast
oracle apps dba interview questions : 60 awesome oracle apps dba interview questions.Must read to succeed in interviews and jobs
oracle apps technical interview questions and answers : 19 oracle apps technical interview questions and answers to succeed in your career


RAC specific
why-database-not-startup-automatic in 11gR2 cluster
How to setup diag wait in cluster
How to Recreate Central Inventory in Real Applications Clusters
Cluster command in 10g and 11g
Oracle Flex Cluster 12c
How to change Hostname for a Grid Infrastructure Oracle Restart Standalone Configuration
oracle database version
https://www.oracle.com/database/technologies/rac.html

Recommended  Courses

The following are some of the recommended courses you can buy if you want to get a step further

Given below are the links to some of the courses


Oracle DBA 11g/12c – Database Administration for Junior DBA : This course is good for the people who are starting as Junior DBA or aspire to be Oracle DBA. This will provide a good understanding of backup & recovery and General administration tasks
Oracle Database: Oracle 12C R2 RAC Administration : This course covers the installation, administration of Oracle RAC. A good course for Oracle DBA who want to upgrade his skills for Oracle RAC
Oracle Data Guard: Database Administration for Oracle 12C R2 : This course covers the installation, administration of Oracle Dataguard. A good course for Oracle DBA who want to upgrade his skills for Oracle Dataguard

Leave a Comment

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

Scroll to Top