Showing posts with label Oracle RAC Interview Questions. Show all posts
Showing posts with label Oracle RAC Interview Questions. Show all posts

June 28, 2023

50 frequently asked Oracle DBA RAC Interview Questions Part2 [ 2023 ]

Oracle RAC Interview Questions/FAQs Part2 [2023]

22. What is split-brain syndrome?
Answer:
Split brain 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.

23. What are various IPs used in RAC? Or How many IPs do we need in RAC?

Answer:
Public IP, Private IP, Virtual IPSCAN IP

24. What is the use of virtual IP (VIP)?

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.

25. What is the use of SCAN IP (SCAN name) and will it provide load balancing?

Answer:
Single Client Access Name (SCAN) was introduced in Oracle Real Application Clusters (RAC) 11g Release 2, 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.

26. How many SCAN listeners will be running?

Answer:
Three SCAN listeners only, irrespective of the number of nodes in the cluster.

27. What is FAN?

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.

28. What is FCF?

Answer:
Fast Connection Failover (FCF) 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.

29. What is TAF and TAF policies?

Answer:
Transparent Application Failover (TAF) - A runtime failover for high availability environments, such as Real Application Clusters, 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.

30. How will you upgrade the RAC database?

Answer:

31. What are rolling patches and how to apply them?

Answer:

32. How to add/remove a node?

Answer:

33. What are nodeapps?

Answer:
VIP, listener, ONS, GSD

34. What is gsd (Global Service Daemon)?

Answer:

35. How to do load balancing in RAC?

Answer:

36. What are the uses of services? How to find out the services in the cluster?

Answer:
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.

37. How to find out the nodes in the cluster (or) how to find out the master node?

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 ocssd.log file and search for "master node number".
iv) oclumon manage -get master        (From Oracle RAC 12c)
v) ocrconfig -manualbackup

https://satya-racdba.blogspot.com/2019/01/oracle-rac-master-node.html

38. How to know the public IPs, private IPs, VIPs in RAC?

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

39. What utility is used to start DB/instance?

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

40. How can you shutdown a single instance?

Answer:
Change cluster_database=false
srvctl stop instance –d database_name –i instance_name



May 21, 2023

Best 20 Oracle RAC Interview Questions/FAQs Part1 [ 2023 ]

Oracle DBA RAC Interview Questions Part1


1. What is the use of Oracle RAC?
Answer:

2. What are the prerequisites for RAC setup?

Answer:

3. What are Oracle Clusterware/Daemon processes and what do they do?

Answer:
ohasd, orarootagent, oragent, ocssd, crsd, ctsd, evmd

4. What are the special background processes for RAC (or) what is the difference between stand-alone database & RAC database background processes?
Answer:
DIAG, LCKn, LMD, LMSn, LMON 

5. What were the structural changes in Oracle 11g R2 RAC?

Answer:
http://satya-racdba.blogspot.com/2010/07/new-features-in-9i-10g-11g-rac.html
Grid & ASM are on one home, 
Voting disk & ocrfile can be on the ASM,
SCAN,
By using srvctl, we can mange diskgroups, home, ons, eons, filesystem, srvpool, server, scan, scan_listener, gns, vip, oc4j
GSD

6. What were the new features in 11g (R2) Oracle RAC?

Answer:
http://satya-racdba.blogspot.com/2010/07/new-features-in-9i-10g-11g-rac.html
Grid & ASM are on one home, 
Voting disk & ocrfile can be on the ASM,
SCAN,
By using srvctl, we can mange diskgroups, home, ons, eons, filesystem, srvpool, server, scan, scan_listener, gns, vip, oc4j
GSD

7. What is cache fusion?

Answer:
Transferring of data between RAC instances by using private network. 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 read from the datafile by an instance within the cluster and another instance is in need of the same block, it is easy to get the block image from the instance which has the block in its SGA rather than reading from the disk. Oracle RAC uses the interconnect for cache fusion (UDP/RDS).

8. 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).

9. What are the Clusterware components?

Answer:
Voting Disk or Voting file - Oracle RAC uses the voting disk/file 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 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 shared disk that is accessible by all of the nodes in the 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 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
cssd – Cluster Synchronization Services Daemon
evmd – Event Manager Daemon

10. What is OCR file?

Answer:
RAC configuration information repository that manages information about the cluster node list and instance-to-node mapping information. The OCR also manages information about Oracle Clusterware resource profiles for customized applications. Maintains cluster configuration information as well as database configuration information. The OCR must reside on shared disk that is accessible by all of the nodes in the cluster. The daemon OCSSd manages the configuration info in OCR and maintains the changes to the cluster in the registry.

11. How to take backup of OCR file?
Answer:
#ocrconfig -manualbackup
#ocrconfig -export file_name.dmp
#ocrdump -backupfile my_file
$cp -p -R /u01/app/crs/cdata /u02/crs_backup/ocrbackup/RAC1

12. How to recover OCR file?

Answer:
#ocrconfig -restore backup_file.ocr
#ocrconfig -import file_name.dmp

13. What is local OCR or Oracle Local Registry 
(OLR)?
Answer:
/etc/oracle/local.ocr   (or)   /var/opt/oracle/local.ocr

14. How to check backup (location) of OCR files?

Answer:
#ocrconfig –showbackup

15. How do you identify the OCR file location?
Answer:
Check /var/opt/oracle/ocr.loc or /etc/ocr.loc
ocrcheck

16. Who will manage OCR files?
Answer:
cssd will manage OCR.

17. Who will take backup of OCR files?
Answer:
crsd will take backup.

18. What is a Voting file/disk and how many files should be there?
Answer:
Voting Disk/File is a file on the shared cluster system or a shared raw device file. 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 the 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 shared disk.

Number of voting files must be odd i.e. 1, 3, 5, 7, 9, 11, 13, 15(max) etc.

19. How to take backup of voting files?
Answer:
dd if=/u02/ocfs2/vote/VDFile_0 of=$ORACLE_BASE/bkp/vd/VDFile_0
crsctl backup css votedisk         -- from 11g R2

20. How do I identify the voting disk location?

Answer:
crsctl query css votedisk

21. If the voting disk/OCR file got corrupted and doesn’t have backups, how to get them?
Answer:
We have to install Clusterware.

March 5, 2023

Top 60 Oracle RAC Interview Questions Part3 [2023]

Oracle RAC DBA Interview Questions/FAQs Part3

41. 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]

42. How many nodes are supported in a RAC Database?

Answer:
Oracle RAC 10g Release 2 onwards, support 100 nodes in a cluster using Oracle Clusterware, and 100 instances in a RAC database.

43. What is IO fencing?

Answer:
I/O fencing prevents updates by failed instances, and detecting failure and preventing split brain in the cluster. When a cluster node fails, the failed node needs to be fenced off from all the shared disk devices or diskgroups. This methodology is called I/O Fencing, sometimes called Disk Fencing or failure fencing.

44. Why is Clusterware installed in the root user (why not in the oracle user)?

Answer:

45. What are the wait events in RAC?

Answer:
http://satya-racdba.blogspot.com/2012/10/wait-events-in-oracle-rac-wait-events.html

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

46. What is the difference between cr block and cur (current) block?

Answer:

47. What are the initialization parameters that must have the same value for every instance in an Oracle RAC database?

Answer:
http://satya-racdba.blogspot.com/2012/09/init-parameters-in-oracle-rac.html

ACTIVE_INSTANCE_COUNT
ARCHIVE_LAG_TARGET
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

48. What were the new features in Oracle RAC 12c?

Answer:
http://satya-racdba.blogspot.com/2012/10/new-features-in-oracle-rac-12c.html

49. How is the Cluster Health Monitor is different from OSWatcher?
Answer:

50. Why do we need user equivalency? What happens if we remove it between nodes 3,5 in a production of 6 node RAC cluster?
Answer:

51. What is the purpose of OLR?
Answer:
With the OCR files being placed in ASM and accessible only when the cluster processes have started up and ASM instance is up and running. However, without the OCR file the Clusterware processes cannot startup.

To resolve this, a copy of the Oracle Local Registry(OLR) registry is now created on each node during the initial installation which stores node-specific information and allows us to get around the problem.

Oracle Local Registry (OLR) 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.

OLR stores the information on the Clusterware configuration, version information, and GpnP wallets.
OHASD process mostly manages this file.

52. What is the difference is between relocating the SCAN using srvctl relocate scan and SCAN_LISTENER by using srvctl relocate scan_listener command?
Answer:

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

54. Why is the interconnect used for?
Answer:
It is a private network that 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.

55. How do you determine what protocol is being used for Interconnect traffic?
Answer:
One of the ways is to look at the database alert log for the time period when the database was started up.

56. What files components in RAC must reside on shared storage?
Answer:
Spfiles, ControlFiles, Datafiles and Redolog files should be created on shared storage.

57. What is the difference between SRVCTL and CRSCTL utilities?
Answer:
Differences between srvctl and crsctl in Oracle RAC

58. What is the difference between locks, latches, enqueues and semaphores in Oracle?
Answer:

59. What is the use of RACcheck utility?
Answer:

Related Oracle RAC Articles: Oracle RAC Interview Questions Part1 Oracle GoldenGate Interview Questions/FAQs   Oracle RMAN Interview Questions/FAQs