Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Oracle RAC Interview Questions

1) What is the use of RAC

ANS:

Oracle RAC allows multiple computers to run Oracle RDBMS software simultaneously while accessing a single database, thus providing clustering.

2) What are the prerequisites for RAC setup ?


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

Ans:
ocssd, crsd, evmd, oprocd, racgmain, racgimon

4) What are the special background processes for RAC (or) what is difference in stand-alone database & RAC database background processes?

ANS:

DIAG, LCKn, LMD, LMSn, LMON 

5) What are structural changes in 11g R2 RAC?

Ans:
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 is cache fusion?

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



7) What is the purpose of Private Interconnect?

Ans:

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) and inter-process communication (TCP).



8) What are the Clusterware components?

Ans:

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 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 your cluster. 
The daemon OCSSd manages the configuration info in OCR and maintains the changes to 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
oprocd / hangcheck_timer – Node hang detector



9) What is OCR file?

Ans:
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 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 your cluster. 
The daemon OCSSd manages the configuration info in OCR and maintains the changes to cluster in the registry.


10) What is Voting file/disk and how many files should be there?

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

11) How to take backup of OCR file?

Ans:
#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?

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


13) What is local OCR?

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


14) How to check backup of OCR files?

Ans:
#ocrconfig –showbackup


15) How to take backup of voting file?

Ans:
dd if=/u02/ocfs2/vote/VDFile_0 of=$ORACLE_BASE/bkp/vd/VDFile_0
crsctl backup css votedisk         -- from 11g R2

16)  How do I identify the voting disk location?

Ans:
# crsctl query css votedisk

17) How do I identify the OCR file location?

check /var/opt/oracle/ocr.loc or /etc/ocr.loc

Ans:
# ocrcheck


18) If voting disk/OCR file got corrupted and don’t have backups, how to get them?

Ans:
We have to install Clusterware.


19) Who will manage OCR files?

Ans:
cssd will manage OCR.



20)  Who will take backup of OCR files?

Ans:
crsd will take backup.


21) What is split brain syndrome?

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


22) What are various IPs used in RAC? Or How may IPs we need in RAC?

Ans:
Public IP, Private IP, Virtual IP, SCAN IP


23) What is the use of virtual IP?

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

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.

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

Ans:
Single Client Access Name (SCAN) is a new 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.

25)  How many SCAN listeners will be running?

Ans:
Three SCAN listeners only.

26) What is FAN?

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


27) What is FCF?

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


30) What is TAF and TAF policies?

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

31) What are nodeapps?

Ans:
VIP, listener, ONS, GSD


32) What is gsd (Global Service Daemon)?   [ http://www.datadisk.co.uk/html_docs/rac/rac_cs.htm ]

runs on each node with one GSD process per node. 
The GSD coordinates with the cluster manager to receive requests from clients such as the DBCA, EM, and the SRVCTL utility to execute administrative job tasks such as instance startup or shutdown. 
The GSD is not an Oracle instance background process and is therefore not started with the Oracle instance

33) How to do load balancing in RAC?


Client Side Connect-Time Load Balance:
---------------------------------------
The client load balancing feature enables clients to randomize connection requests among the listeners. 
This is done by client Tnsnames Parameter: LOAD_BALANCE.
The (load_balance=yes) instructs SQLNet to progress through the list of listener addresses in the address_list section of the net service name in a random sequence. When set to OFF, instructs SQLNet to try the addresses sequentially until one succeeds. 

Client Side Connect-Time failover 
-------------------------------------
This is done by client Tnsnames Parameter: FAILOVER
The (failover=on) enables clients to connect to another listener if the initial connection to the first listener fails. Without connect-time failover, Oracle Net attempts a connection with only one listener. 

Server Side Listener Connection Load Balancing.
-------------------------------------------------
With server-side load balancing, the listener directs a connection request to the best instance currently providing the service.
Init parameter remote_listener should be set. When set, each instance registers with the TNS listeners running on all nodes within the cluster. 

There are two types of server-side load balancing: 
--------------------------------------------------
Load Based — Server side load balancing redirects connections by default depending on node load. This id default.
Session Based — Session based load balancing takes into account the number of sessions connected to each node and then distributes the connections to balance the number of sessions across the different nodes.

From 10g release 2 the service can be setup to use load balancing advisory. This mean connections can be routed using SERVICE TIME and THROUGHPUT. Connection load balancing means the goal of a service can be changed, to reflect the type of connections using the service. 

Transparent Application Failover (TAF) :
----------------------------------------------
Transparent Application Failover (TAF) is a feature of the Oracle Call Interface (OCI) driver at client side. It enables the application to automatically reconnect to a database, if the database instance to which the connection is made fails. In this case, the active transactions roll back. 
Tnsnames Parameter: FAILOVER_MODE

e.g (failover_mode=(type=select)(method=basic)) 
Failover Mode Type can be Either SESSION or SELECT.

Session failover will have just the session to failed over to the next available node. With SELECT, the select query will be resumed.
TAF can be configured with just server side service settings by using dbms_service package.

Fast Connection Failover (FCF):
-----------------------------------
Fast Connection Failover is a feature of Oracle clients that have integrated with FAN HA Events.
Oracle JDBC Implicit Connection Cache, Oracle Call Interface (OCI), and Oracle Data Provider for .Net (ODP.Net) include fast connection failover. 

With fast connection failover, when a down event is received, cached connections affected by the down event are immediately marked invalid and cleaned up.



34) What are the uses of services? How to find out the services in cluster?

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

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

Ans:

# olsnodes  -- Which ever displayed first, is the master node of the cluster.

select MASTER_NODE from v$ges_resource;

To find out which is the master node, you can see ocssd.log file and search for "master node number".


36) How to know the public IPs, private IPs, VIPs in RAC?

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


37) What utility is used to start DB/instance?

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


38) How can you shutdown single instance?

Ans:
Change cluster_database=false

srvctl stop instance –d database_name –i instance_name

39) What is HAS (High Availability Service) and the commands?

Ans:
HAS includes ASM & database instance 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]


40) How many nodes are supported in a RAC Database?

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



41) What is fencing?

Ans:
I/O fencing prevents updates by failed instances, and detecting failure and preventing split brain in 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.


42) Why Clusterware installed in root (why not oracle)?

Oracle Clusterware works closely with the operating system, system administrator access is required for some of the installation tasks. 
In addition, some of the Oracle Clusterware processes must run as the special operating system user, root.


43) What are the wait events in RAC?

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

http://orainternals.wordpress.com/2009/12/23/rac-performance-tuning-understanding-global-cache-performance/

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
(gc current/cr block n-way, n is number of nodes)
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


44) What are the initialization parameters that must have same value for every instance in an Oracle RAC database?
Ans:
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


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



46) New features in Oracle Clusterware 12c ?


Oracle Flex ASM - This feature of Oracle Clusterware 12c claims to reduce per-node overhead of using ASM instance. 
Now the instances can use remote node ASM for any planned/unplanned downtime. ASM metadata requests can be converted by non-local instance of ASM.

ASM Disk Scrubbing - From RAC 12c, ASM comes with disk scrubbing feature so that logical corruptions can be discovered. 
Also Oracle 12c ASM can automatically correct this in normal or high redundancy diskgroups.

Oracle ASM Disk Resync & Rebalance enhancements.
Commands Databases Supporting To the application Gameing Game What is raid

Application Continuity (AC) - is transparent to the application and in-case the database or the infrastructure is unavailable, this new features which work on JDBC drivers, masks recoverable outages. 
This recovers database session beneath the application so that the outage actually appears to be delayed connectivity or execution. 
Transaction guard (improvements of Fast Application Notification).

IPv6 Support - Oracle RAC 12c now supports IPv6 for Client connectivity, Interconnect is still on IPv4.

Per Subnet multiple SCAN - RAC 12c, per-Subnet multiple SCAN can be configured per cluster.

Each RAC instance opens the Container Database (CDB) as a whole so that versions would be same for CDB as well as for all of the Pluggable Databases (PDBs). PDBs are also fully compatible with RAC.

Oracle installer will run root.sh script across nodes. We don't have to run the scripts manually on all RAC nodes. 

new "ghctl" command for patching.


47) New features in Oracle 9i/10g/11g RAC ?  [ http://satya-racdba.blogspot.in/2010/07/new-features-in-9i-10g-11g-rac.html ]


Oracle Real Application Clusters New features

Oracle 9i RAC:
---------------------
OPS (Oracle Parallel Server) was renamed as RAC
CFS (Cluster File System) was supported
OCFS (Oracle Cluster File System) for Linux and Windows
watchdog timer replaced by hangcheck timer

Oracle 10g R1 RAC :
-------------------
Cluster Manager replaced by CRS
ASM introduced
Concept of Services expanded
ocrcheck introduced
ocrdump introduced
AWR was instance specific

Oracle 10g R2 RAC :
-------------------
CRS was renamed as Clusterware
asmcmd introduced
CLUVFY introduced
OCR and Voting disks can be mirrored
Can use FAN/FCF with TAF for OCI and ODP.NET
The Waiting The Wait Latest News Resource Manager Installing Music Downloads


Oracle 11g R1 RAC :
---------------------
--> Oracle 11g RAC parallel upgrades - Oracle 11g have rolling upgrade features whereby RAC database can be upgraded without any downtime.
-->Hot patching - Zero downtime patch application.
-->Oracle RAC load balancing advisor - Starting from 10g R2 we have RAC load balancing advisor utility. 
11g RAC load balancing advisor is only available with clients who use .NET, ODBC, or the Oracle Call Interface (OCI).
-->ADDM for RAC - Oracle has incorporated RAC into the automatic database diagnostic monitor, for cross-node advisories. 
The script addmrpt.sql run give report for single instance, will not report all instances in RAC, this is known as instance ADDM. 
But using the new package DBMS_ADDM, we can generate report for all instances of RAC, this known as database ADDM.
--> Optimized RAC cache fusion protocols - moves on from the general cache fusion protocols in 10g to deal with specific scenarios where the protocols could be further optimized.
--> Oracle 11g RAC Grid provisioning - The Oracle grid control provisioning pack allows us to "blow-out" a RAC node without the time-consuming install, using a pre-installed "footprint".

Oracle 11g R2 RAC :
-----------------------
--> We can store everything on the ASM. We can store OCR & voting files also on the ASM.
--> ASMCA
--> Single Client Access Name (SCAN) - eliminates the need to change tns entry when nodes are added to or removed from the Cluster. 
RAC instances register to SCAN listeners as remote listeners. SCAN is fully qualified name.
Oracle recommends assigning 3 addresses to SCAN, which create three SCAN listeners.
--> Clusterware components: crfmond, crflogd, GIPCD.
--> AWR is consolidated for the database.
--> 11g Release 2 Real Application Cluster (RAC) has server pooling technologies so it’s easier to provision and manage database grids. 
This update is geared toward dynamically adjusting servers as corporations manage the ebb and flow between data requirements for datawarehousing and applications.By default, LOAD_BALANCE is ON.
--> GSD (Global Service Deamon), gsdctl introduced.
--> GPnP profile.
--> Cluster information in an XML profile.
--> Oracle RAC OneNode is a new option that makes it easier to consolidate databases that aren’t mission critical, but need redundancy.
--> raconeinit - to convert database to RacOneNode.
--> raconefix - to fix RacOneNode database in case of failure.
--> racone2rac - to convert RacOneNode back to RAC.
--> Oracle Restart - the feature of Oracle Grid Infrastructure's High Availability Services (HAS) to manage associated listeners, ASM instances and Oracle instances.
--> Oracle Omotion - Oracle 11g release2 RAC introduces new feature called Oracle Omotion, an online migration utility. 
This Omotion utility will relocate the instance from one node to another, whenever instance failure happens.
Omotion utility uses Database Area Network (DAN) to move Oracle instances. 
Database Area Network (DAN) technology helps seamless database relocation without losing transactions.
--> Cluster Time Synchronization Service (CTSS) is a new feature in Oracle 11g R2 RAC, which is used to synchronize time across the nodes of the cluster. --> CTSS will be replacement of NTP protocol.
--> Grid Naming Service (GNS) is a new service introduced in Oracle RAC 11g R2. With GNS, Oracle Clusterware (CRS) can manage Dynamic Host Configuration Protocol --> (DHCP) and DNS services for the dynamic node registration and configuration.
--> Cluster interconnect: Used for data blocks, locks, messages, and SCN numbers.
--> Oracle Local Registry (OLR) - From Oracle 11gR2 "Oracle Local Registry (OLR)" something new as part of Oracle Clusterware. OLR is node’s local repository, --> similar to OCR (but local) and is managed by OHASD. It pertains data of local node only and is not shared among other nodes.
--> Multicasting is introduced in 11gR2 for private interconnect traffic.
--> I/O fencing prevents updates by failed instances, and detecting failure and preventing split brain in 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.
--> Re-bootless node fencing (restart)? - instead of fast re-booting the node, a graceful shutdown of the stack is attempted.
--> Clusterware log directories: acfs*
--> HAIP (IC VIP).
--> Redundant interconnects: NIC bonding, HAIP.
--> RAC background processes: DBRM – Database Resource Manager, PING – Response time agent.
--> Virtual Oracle 11g RAC cluster - Oracle 11g RAC supports virtualization.

Comments

Popular posts from this blog

Oracle DBMS SCHEDULER Examples

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

7 Steps to configure BDR replication in postgresql

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

How to Enable/Disable autovacuum on PostgreSQL