Professional Documents
Culture Documents
RAC Interview Questions
RAC Interview Questions
Well, there is not much difference between 10g and 11gR (1) RAC.
o Databases
o Instances
o Applications
o Node Monitoring
o Event Services
o High Availability
Databases
Instances
Applications
Cluster Management
Node Management
Event Services
High Availability
Storage Management (with help of ASM and other new ACFS filesystem)
Removed OS dependent hang checker etc, manages with own additional monitor
process
4. What are Oracle Kernel Components (nothing but how does Oracle RAC
database differs than Normal single instance database in terms of Binaries and
process)
Basically Oracle kernel need to switched on with RAC On option when you convert to RAC,
that is the difference as it facilitates few RAC bg process like LMON,LCK,LMD,LMS etc.
To turn on RAC
# link the oracle libraries
$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk rac_on
# rebuild oracle
$ cd $ORACLE_HOME/bin
$ relink oracle
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:
5. What is Clusterware?
Software that provides various interfaces and services for a cluster. Typically, this
includes capabilities that:
6. What are the background process that exists in 11gr2 and functionality?
Process
Functionality
Name
The CRS daemon (crsd) manages cluster resources based on configuration
information that is stored in Oracle Cluster Registry (OCR) for each
crsd
resource. This includes start, stop, monitor, and failover operations. The
crsd process generates events when the status of a resource changes.
8. What is startup sequence in Oracle 11g RAC? 11g RAC startup sequence?
Click here to know more details
9. As you said Voting & OCR Disk resides in ASM Diskgroups, but as per startup
sequence OCSSD starts first before than ASM, how is it possible?
How does OCSSD starts if voting disk & OCR resides in ASM Diskgroups?
You might wonder how CSSD, which is required to start the clustered ASM instance, can
be started if voting disks are stored in ASM? This sounds like a chicken-and-egg problem:
without access to the voting disks there is no CSS, hence the node cannot join the
cluster. But without being part of the cluster, CSSD cannot start the ASM instance. To
solve this problem the ASM disk headers have new metadata in 11.2: you can use kfed to
read the header of an ASM disk containing a voting disk. The kfdhdb.vfstart and
kfdhdb.vfend fields tell CSS where to find the voting file. This does not require the ASM
instance to be up. Once the voting disks are located, CSS can access them and joins the
cluster.
Source: Pro Oracle Database 11g RAC on Linux- Martin Bach Amazon.com
1. Client Connected through SCAN name of the cluster (remember all three IP
addresses round robin resolves to same Host name (SCAN Name), here in this
case our scan name is cluster01-scan.cluster01.example.com
2. The request reaches to DNS server in your corp and then resolves to one of the
node out of three. a. If GNS (Grid Naming service or domain is configured) that is
a subdomain configured in the DNS entry for to resolve cluster address the
request will be handover to GNS (gnsd)
3. Here in our case assume there is no GNS, now the with the help of SCAN listeners
where end points are configured to database listener.
4. Database Listeners listen the request and then process further.
5. In case of node addition, Listener 4, client need not to know or need not change
any thing from their tns entry (address of 4thnode/instance) as they just using
scan IP.
Grid Naming service is alternative service to DNS , which will act as a sub domain in your
DNS but managed by Oracle, with GNS the connection is routed to the cluster IP and
manages internally.
In Oracle Database 11g Release 2, GPnP allows each node to perform the following
tasks dynamically:
To add a node, simply connect the server to the cluster and allow the cluster to configure
the node.
So this profile will be read local or from the remote machine when plugged into cluster
and dynamically added to cluster.
13. What are the file types that ASM support and keep in disk groups?
Change tracking
Temporary data files RMAN backup sets
bitmaps
Is cluster-aware
Supports reading from mirrored copy instead of primary copy for extended
clusters
Process Description
In 11gr2 the listeners will run from Grid Infrastructure software home
The node listener is a process that helps establish network connections from ASM
clients to the ASM instance.
Is capable of listening for all database instances on the same machine in addition
to the ASM instance
A scan listener is something that additional to node listener which listens the incoming
db connection requests from the client which got through the scan IP, it got end points
configured to node listener where it routes the db connection requests to particular node
listener.
- -
cat /etc/oracle/ocr.loc
ocrconfig_loc=+DATA
local_only=FALSE
Process Description
Supported Default
Disk Group Type
MirroringLevels Mirroring Level
Two-wayThree-
Normal redundancy wayUnprotected Two-way
(None)
ASM can use variable size data extents to support larger files, reduce memory
requirements, and improve performance.
ASM stripes files using extents with a coarse method for load balancing or a fine method
to reduce latency.
26. How many ASM Diskgroups can be created under one ASM Instance?
$ oifcfg iflist p -n
To determine the public and private interfaces that have been configured:
$ oifcfg getif
To determine the Virtual IP (VIP) host name, VIP address, VIP subnet mask, and VIP
interface name:
VIP exists.:host01
On a single node in the cluster, add the new global interface specification:
Verify the changes with oifcfg getif and then stop Clusterware on all nodes by running the
following command as root on each node:
# oifcfg getif
Assign the network address to the new network adapters on all nodes using ifconfig:
32. Can I stop all nodes in one command? Meaning that stopping whole
cluster ?
33. What is OLR? Which of the following statements regarding the Oracle Local
Registry (OLR) is true?
2.The OLR should be manually created after installing Grid Infrastructure on each node in
the cluster.
3.One of its functions is to facilitate Clusterware startup in situations where the ASM
stores the OCR and voting disks.
With Oracle Clusterware 11g release 2, Oracle Universal Installer (OUI) detects when the
minimum requirements for an installation are not met, and creates shell scripts, called
fixup scripts, to finish incomplete system configuration steps. If OUI detects an
incomplete task, then it generates fixup scripts (runfixup.sh). You can run the fixup script
after you click the Fix and Check Again Button.
36. CRS is not starting automatically after a node reboot, what you do to make
it happen?
to disable
Read here
Read here
Read here
41. What is the difference between TAF and FAN & FCF? at what conditions you
use them?
FAN is a feature of Oracle RAC which stands for Fast Application Notification. This allows
the database to notify the client of any change (Node up/down, instance up/down,
database up/down). For integrated clients, inflight transactions are interrupted and an
error message is returned. Inactive connections are terminated.
FCF is the client feature for Oracle Clients that have integrated with FAN to provide fast
failover for connections. Oracle JDBC Implicit Connection Cache, Oracle Data Provider
for .NET (ODP.NET) and Oracle Call Interface are all integrated clients which provide the
Fast Connection Failover feature.
3) FCF, along with FAN when using connection pools
FCF is a feature of Oracle clients that are integrated to receive FAN events and abort
inflight transactions, clean up connections when a down event is received as well as
create new connections when a up event is received. Tomcat or JBOSS can take
advantage of FCF if the Oracle connection pool is used underneath. This can be either
UCP (Universal Connection Pool for JAVA) or ICC (JDBC Implicit Connection Cache). UCP is
recommended as ICC will be deprecated in a future release.
ONS is part of the clusterware and is used to propagate messages both between nodes
and to application-tiers
ONS is the foundation for FAN upon which is built FCF.
RAC uses FAN to publish configuration changes and LBA events. Applications can react as
those published events in two way :
- by using ONS api (you need to program it)
- by using FCF (automatic by using JDBC implicit connection cache on the application
server)
you can also respond to FAN event by using server-side callout but this on the server side
(as their name suggests it)
42. Can you add voting disk online? Do you need voting disk backup?
Yes, as per documentation, if you have multiple voting disk you can add online, but if
you have only one voting disk , by that cluster will be down as its lost you just need to
start crs in exclusive mode and add the votedisk using
43. You have lost OCR disk, what is your next step?
The cluster stack will be down due to the fact that cssd is unable to maintain the
integrity, this is true in 10g, From 11gR2 onwards, the crsd stack will be down, the hasd
still up and running. You can add the ocr back by restoring the automatic backup or
import the manual backup,
44. What happens when ocssd fails, what is node eviction? how does node
eviction happens? For all answer will be same.
Read here
Read here
48. How do you interpret AWR report in RAC instances, what sections in awr report for rac
instances are most important?
Read here.
a. Case 1: Migrating disk group from one storage to other with same name
1. Consider the disk group is DATA,
2. Create new disks in DATA pointing towards the new storage (EMC),
a) Partioning provisioning done by storage and they give you the
device name or mapper like /dev/mapper/asakljdlas
3. Add the new disk to diskgroup DATA
a) Alter diskgroup data add disk '/dev/mapper/asakljdlas'
3. drop the old disks from DATA with which rebalancing is done
automatically.
If you want you can the rebalance by alter system set asm_power_limit =12
for full throttle.
alter diskgroup data drop disk 'path to hitachi storage'
Note: you can get the device name in v$asm_disk in path column.
4. Request SAN team to detach the old Storage (HITACHI).
b. Case 2: Migrating disk group from one to another with different diskgroup
name.
1) Create the Disk group with new name in the new storage.
2) Create the spfile in new diskgroup and change the parameter scope =
spfile for control files etc.
3) Take a control file backup in format +newdiskgroup
4) Shutdown the db, startup nomount the database
5) restore the control file from backup (now the control will restore to
new diskgroup)
6) Take the RMAN backup as copy of all the databases with new format.
RMAN> backup database as copy format '+newdiskgroup name' ;
3) RMAN> Switch database to copy.
4) Verify dba_data_files,dba_temp_files, v$log that all files are pointing
to new diskgroup name.
8.How to find the database in which particular service is attached to when you have a
large number of databases running in the server, you cannot check one by one manually
Write a shell script to read the database name from oratab and iterate the loop taking
inpt as DB name in srvctl to get the result.
#!/bin/ksh
ORACLE_HOME=
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=${SAVE_LLP}:${ORACLE_HOME}/lib
export TNS_ADMIN ORACLE_HOME PATH LD_LIBRARY_PATH
for INSTANCE in `cat /etc/oratab|grep -v "^#"|cut -f1 -d: -s`
do
export ORACLE_SID=$INSTANCE
echo `srvctl status service -d $INSTANCE -s $1| grep -i "is running"`
done
The base software is installed on each node of the cluster and the
database storage on the shared disks.
3. What kind of storage we can use for the shared Clusterware files?
- OCFS (Release 1 or 2)
- raw devices
- third party cluster file system such as GPFS or Veritas
4. What kind of storage we can use for the RAC database storage?
- OCFS (Release 1 or 2)
- ASM
- raw devices
- third party cluster file system such as GPFS or Veritas
5. 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.
6. What is an OCFS2?
The OCFS2 is the Oracle (version 2) Cluster File System which can be used for the Oracle Real
Application Cluster.
Note: This option is very dependent on the availability of a CFS on your platform.
16. Why we need to have configured SSH or RSH on the RAC nodes?
SSH (Secure Shell,10g+) or RSH (Remote Shell, 9i+) allows oracle UNIX account connecting to
another RAC node and copy/ run commands as the local oracle UNIX account.
19. What are the restrictions on the SID with a RAC database? Is it limited to 5
characters?
The SID prefix in 10g Release 1 and prior versions was restricted to five characters by install/ config
tools so that an ORACLE_SID of up to max of 5+3=8 characters can be supported in a RAC
environment. The SID prefix is relaxed up to 8 characters in 10g Release 2, see bug 4024251 for
more information.
20. Does Real Application Clusters support heterogeneous platforms?
The Real Application Clusters do not support heterogeneous platforms in the same cluster.
21. Are there any issues for the interconnect when sharing the same switch as
the public network by using VLAN to separate the network?
RAC and Clusterware deployment best practices suggests that the interconnect (private connection)
be deployed on a stand-alone, physically separate, dedicated switch. On big network the connections
could be instable.
25. What versions of the database can I use the cluster verification utility
(cluvfy) with?
The cluster verification utility is release with Oracle Database 10g Release 2 but can also be used
with Oracle Database 10g Release 1.
26. If I am using Vendor Clusterware such as Veritas, IBM, Sun or HP, do I still
need Oracle Clusterware to run Oracle RAC 10g?
Yes. When certified, you can use Vendor Clusterware however you must still install and use Oracle
Clusterware for RAC. Best Practice is to leave Oracle Clusterware to manage RAC. For details see
Metalink Note 332257.1 and for Veritas SFRAC see 397460.1.
31. 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).
32. 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.
37. What command would you use to check the availability of the RAC system?
crs_stat -t -v (-t -v are optional)
38. 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.
39. Name two specific RAC background processes
RAC processes are: LMON, LMDx, LMSn, LKCx and DIAG.
40. Can you have many database versions in the same RAC?
Yes, but Clusterware version must be greater than the greater database version.
41. What was RAC previous name before it was called RAC?OPS: Oracle Parallel
Server
44. Which command will we use to manage (stop, start) RAC services in
command-line mode?
srvctl
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.
Single Client Access Name (SCAN) is s 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.
--------------------------------------------------------------------------------------------------------------