Oracle RAC Interview Question and Answer

1. What is cache fusion?

In a RAC environment, data blocks are moved from remote database caches (SGA) to the local node to meet transaction needs (like DML or querying the data dictionary). Cache fusion refers to the shared memory of Oracle buffers between the nodes in the cluster. It’s easier to obtain the block image from the instance with the block in its SGA rather than reading it from disk, especially when one instance has read a data file and another instance needs the same block.

2. What is split brain?

    When database nodes in a cluster can’t talk to each other, they may still work on and change the same data blocks on their own. If more than one instance changes the same block, they don’t lock or sync the data properly, which can lead to some changes being overwritten by others in the cluster. This situation is known as split brain.

    3. What is the difference between Crash recovery and Instance recovery?

    When a single node database crashes and starts up again, it goes through a process called crash recovery. In a RAC (Real Application Clusters) environment, the recovery for an instance is done by the other working nodes, which is referred to as instance recovery.

    4. What is the interconnect used for?

    It is a private network that transfers data blocks between instances for cache fusion. Both physical data and data dictionary blocks are shared through this connection.

    5. How do you determine what protocol is being used for Interconnect traffic?

    One way is to check the database alert log for when the database started.

    6. What methods are available to keep the time synchronized on all nodes in the cluster?

    Either configure the Network Time Protocol (NTP) or use the Cluster Time Synchronization Service (CTSS) in 11gr2.

    7. What files components in RAC must reside on shared storage?

    Spfiles, ControlFiles, Datafiles, and Redolog files should be 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 command shows both automatic and manual backups.

    10. If your OCR is corrupted what options do have to resolve this?

    You can use the logical or physical OCR backup to restore the Repository.

    11. 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.

    12. What is a VIP in RAC use for?

    The VIP is a backup Virtual IP address for every node in a cluster. If a node fails, its VIP transfers to a working node, informing the application that the node is down. Without VIP, the application waits for a TCP timeout before realizing the session is no longer active due to the failure.

    13. How do we know which database instances are part of a RAC cluster?

    You can use the V$ACTIVE_INSTANCES view to find the member instances of the RAC cluster.

    14. What is OCLUMON used for in a cluster environment?

    The Cluster Health Monitor (CHM) saves operating system metrics for all nodes in a RAC cluster in its repository. It collects data on CPU, memory, processes, network, and other OS details. This data can be accessed later to troubleshoot and identify cluster issues. It is part of the default installation for 11gR2 grid. The data is kept in a master repository and copied to a standby repository on a different node.

    15. 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 depend on the CPU speed of the slowest server.

    16. What is the purpose of OLR?

    Oracle Local repository contains the information required to start cluster processes with the OCR located in ASM. Because the ASM file system isn’t available until the Grid processes are active, a local copy of the OCR data is necessary and is saved in the OLR.

    17. What is the default memory allocation for ASM?

    In 10g, the default SGA size is 1G; in 11g, it’s 256M; and in 12c ASM, it’s back to 1G.

    18. How do you backup ASM Metadata?

    You can use md_backup to restore the ASM diskgroup if there is storage loss.

    19. What files can be stored in the ASM diskgroup?

    In 11g, ASM diskgroups can store the following files:
     Datafiles
     Redo logfiles
     Spfiles
    In 12c, the ASM Diskgroup can also store:
     Password file

    20. What it the ASM POWER_LIMIT?

    This parameter controls how many Allocation units the ASM instance tries to rebalance at once. In ASM versions earlier than 11.2.0.3, the default is 11, but it has changed to unlimited in later versions.

    21. What is a rolling upgrade?

    A patch is considered rolling if it can be applied to the cluster binaries without shutting down the database in a RAC environment. All nodes in the cluster are patched one at a time, with only the node being patched offline while the others remain available.

    22. What are some of the RAC specific parameters?

    Some RAC parameters include:
     CLUSTER_DATABASE
     CLUSTER_DATABASE_INSTANCE
     INSTANCE_TYPE (RDBMS or ASM)
     ACTIVE_INSTANCE_COUNT
     UNDO_MANAGEMENT

    23. What is the future of the Oracle Grid?

    The Grid software is increasingly able to support high availability for Oracle Databases and other applications, including those from Oracle. With 12c, it offers more features and makes deploying pre-built solutions for common Oracle applications easier.

    24. What components of the Grid should I back up?

    The backups should include OLR, OCR, and ASM data.

    25. Is there an easy way to verify the inventory for all remote nodes?

    You can run the opatch lsinventory -all nodes command from a single node to look at the inventory details for all nodes in the cluster.

    26. What are the components of clusterware?

    Oracle cluster registry (OCR): It holds information about instances, services, cluster configuration, nodes, and ASM storage if required. The OCR should be on a shared disk accessible by all cluster nodes. The OCSSd daemon manages the configuration and tracks changes in the registry.
    Voting Disk: It checks if a node has failed. If it has, the node is forcibly rebooted and re-added to the surviving cluster nodes. Oracle RAC uses it to maintain cluster membership.

    27. What is FAN?

    FAN, or fast application notification, connects to events involving services, nodes, and instances. Oracle RAC 12c uses this mechanism to convey service level changes, such as UP or DOWN status. With FAN events, applications can respond quickly and take immediate action.

    28. What is SCAN?

    SCAN, or Single Client Access Name, is a feature of Oracle RAC 11g release 2 that allows clients to access an Oracle Database cluster using a single name. This means SCAN users don’t have to change anything when nodes are added or removed from the cluster.

    29. What is hangcheck timer?

    The hangcheck timer helps to keep the system healthy by checking it regularly. If the system stops or hangs, the node will restart automatically.
    There are two important settings:

    • Hangcheck margin: This shows how much delay is allowed before the hangcheck timer restarts the RAC node.
    • Hangcheck Tick: This is the time between each system health check. The default is set to 60 seconds, but Oracle recommends changing it to 30 seconds.

    30. What is GRD?

    GRD, or Global Resource Directory, helps GES and GCS keep track of cached blocks and datafiles. This is called cache fusion and it supports data integrity.

    31. What is OCR file?

    It is a repository for RAC configuration information that stores details about instance node and cluster node mapping. It also keeps profiles for Oracle Clusterware resources used by custom applications. Additionally, it manages configuration data for any cluster database. The OCR must be located on a shared disk accessible by all cluster nodes. The OCSSD command daemon updates the configuration information in the OCR and manages changes within the cluster registry.

    32. What is a raw partition?

    It is the lowest level of the physical disk. When a new partition is created, a raw partition is made without formatting, and logical partitions are assigned to it. Once formatting is done, it becomes a cooked partition.

    33. What is the use of VIP?

    The VIP is a backup Virtual IP address for each node in a cluster. If a node fails, the VIP transfers to the working node, informing the application about the failure. Without VIP, the application would wait for a TCP timeout to realize that the session is no longer active due to the failure.

    34. What is load balancing Advisory?

    Load Balancing Advisory helps distribute work evenly across Oracle RAC instances and finds which instances perform best. It gives real-time data to the application about the database’s service level. The LBA checks the workload of each instance in the cluster and directs new tasks to the least busy instance(s). This process happens for each service across all instances providing resources.

    35. What options are required to resolve OCR, if it is corrupted?

    The backup of the physical or logical OCR copy is used to restore the repository,

    36. What is Voting file/disk and how many files should be there?

    Voting Disk File is a file used in a shared cluster system. Oracle Clusterware relies on the voting disk to identify which instances belong to a cluster. It serves a similar purpose as a quorum disk, preventing split-brain issues. Oracle RAC uses the voting disk to monitor cluster membership and resolve ownership during network failures. The voting disk must be located on shared storage.

    37. How is possible to install a RAC if we don’t have a CFS?

    This is possible by using a raw device.

    38. What is a raw device?

    A raw device is a disk drive without a file system. Raw devices are used in Real Application Clusters to share disks.

    39. When to use CFS(Cluster File System) over raw?

    A CFS provides:
    – Easier management
    – Use of Oracle Managed Files with RAC
    – A single Oracle Software installation
    – Autoextend enabled on Oracle datafiles
    – Uniform access to archive logs during node failures
    – When Oracle_Home is on CFS, applying Oracle patches ensures that the updated Oracle_Home is available to all nodes in the cluster.
    Note: This option relies on the availability of a CFS on your platform.

    40. When to use raw over CFS?

    – CFS is not available or supported by Oracle.
    – Performance is crucial: Raw devices provide the best performance since there’s no layer between Oracle and the disk.
    Note: Autoextend doesn’t work on raw devices when space runs out, but additional space can be added online if necessary.

    41. Why we need to have configured SSH or RSH on the RAC nodes?

    SSH (Secure Shell, 10g+) and RSH (Remote Shell, 9i+) enable the “oracle” UNIX account to connect to another RAC node and execute commands as the local “oracle” UNIX account.

    42. Is the SSH, RSH needed for normal RAC operations?

    No SSH or RSH is needed except for RAC, patch set installation, and creating clustered databases.

    43. Does Real Application Clusters support heterogeneous platforms?

    The Real Application Clusters do not support heterogeneous platforms in the same cluster.

    44. What is the Cluster Verification Utiltiy (cluvfy)?

    The Cluster Verification Utility (CVU) is a tool used to check important components during different stages of deployment in a RAC environment.

    45. What versions of the database can I use the cluster verification utility (cluvfy) with?

    The cluster verification utility is available with Oracle Database 10g Release 2 and can also be used with Release 1.

    46. How to take backup and recover of OCR file?

    Backup :

    ocrconfig -manualbackup

    ocrconfig -export file_name.dmp

    ocrdump -backupfile my_file

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

    ocrconfig -restore backup_file.ocr

    ocrconfig -import file_name.dmp

    47. What is the locaton of local OCR?

    /etc/oracle/local.ocr
    /var/opt/oracle/local.ocr

    48. How do you backup voting disk ? and how do I identify the voting disk location?

    Backup voting disk command:

    dd if=voting_disk_name of=backup_file_name

    Identify the voting disk location:

    crsctl query css votedisk

    49. How do I identify the OCR file location?

    check /var/opt/oracle/ocr.loc or /etc/ocr.loc ( depends upon platform)
    or
    ocrcheck

    50. What is the functionality and features provided by Oracle Clusterware?

    It enables users to register services to start, stop, and monitor processes in case of failures.

    51. Difference between crsctl and srvctl utility in RAC?

    CRSCTL controls clusterware tasks:
     Starting and stopping Oracle Clusterware
     Enabling and disabling Clusterware daemons
     Registering cluster resources

    SRVCTL handles Oracle resource tasks:
     Starting and stopping database instances and services
     Also manages cluster resources like network, VIP, disks, etc., from 11gR2 onwards.

    Leave a Reply