Sunteți pe pagina 1din 18

Oracle RAC Overview

AGENDA
What is Real Application Cluster (RAC) ?
Why to use RAC ?
Single instance vs RAC
RAC Architecture
Sharing of Resources
Background processes
Internal structures and services
RAC Administration
ORACLE Clusterware
RAC Mechanism
Failover
Load Balancing
WHAT IS RAC ?
Real Application Clusters (RAC) introduced in oracle 9i, is a technology that enables a single
database to work on multiple instances simultaneously on different nodes.
A RAC database requires three components:
cluster nodes
Shared storage
Oracle Clusterware
To identify RAC instance in a database the following can be used:
Use the DBMS_UTILITY.IS_CLUSTER_DATABASE function
Show parameter CLUSTER_DATABASE
WHY USE RAC ?
High Availability
Failover
Reliability
Scalability
Manageability
Recoverability
Transparency
Row Locking
Error Detection
Buffer Cache Management
Continuous Operations
Load Balancing/Sharing
Reduction in total cost of ownership
SINGLE INSTANCE ~ RAC


RAC ARCHITECTURE:



Public Network:
It is the public IP on which listeners would be listening and clients would contact the listener on this
public IP.
Private Network Interconnect:
It is a network path i.e exclusively used for inter-instance communication used by the cluster and
dedicated to the server nodes of a cluster. It is used for the synchronization of resources and in some
cases for the transfer of data. It has a high bandwidth and low latency.
Storage Network:
It is the network which connects the instances to the database in RAC.
WHATS SHARED, WHATS NOT
SHARED
Disk access
Resources that manage data
All instances have common data & controls files
NOT SHARED
1) Each node has its own dedicated:
System memory
Operating system
Database instance
Application software
2) Each instance has individual
Log files and
Rollback segments
BACKGROUND PROCESSES:




1. Global Cache Service Processes (LMSn)
LMSn handles block transfers between the holding instances buffer cache and requesting foreground
process on the requesting instance.
LMS maintains read consistency by rolling back any uncommitted transactions for blocks that are
being requested by any remote instance.
Even if n value(0-9) varies depending on the amount of messaging traffic amongst nodes in the
cluster, there is default, one LMS process per pair of CPUs.

2. Global Enqueue Service Monitor (LMON)
It constantly handles reconfiguration of locks and global resources when a node joins or leaves the
cluster. Its services are also known as Cluster Group Services (CGS).
3. Global Enqueue Service Daemon (LMD)
It manages lock manager service requests for GCS resources and sends them to a service queue to
be handled by the LMSn process. The LMD process also handles global deadlock detection and
remote resource requests (remote resource requests are requests originating from another instance).
4. Lock Process (LCK)
LCK manages non-cache fusion resource requests such as library and row cache requests and lock
requests that are local to the server. Because the LMS process handles the primary function of lock
management, only a single LCK process exists in each instance.
5. Diagnosability Daemon (DIAG)
This background process monitors the health of the instance and captures diagnostic data about
process failures within instances. The operation of this daemon is automated and updates an alert log
file to record the activity that it performs.

NOTE: In RAC environment, all instances have their separate alert logs.
Global Service Daemon (GSD)
This is a component in RAC that receives requests from the SRVCTL control utility to execute
administrative tasks like startup or shutdown. The command is executed locally on each node and the
results are returned to SRVCTL. The GSD is installed on the nodes by default.
INTERNAL STRUCTURES AND SERVICES
Global Resource Directory (GRD)
Records current state and owner of each resource
Contains convert and write queues
Distributed across all instances in cluster
Maintained by GCS and GES
Global Cache Services (GCS)
Implements cache coherency for database
Coordinates access to database blocks for instances
Global Enqueue Services (GES)
Controls access to other resources (locks) including library cache and dictionary cache
Performs deadlock detection
RAC ADMINISTRATION:
Parameter File
Using a shared SPFILE is recommended while each instance can have its own dedicated parameter
file as well.
SPFILE should be placed on a shareable disk subsystem like a raw device, a clustered file system, or
Automatic Storage Management (ASM).
Oracle instance parameters for the RAC environment can be grouped into three major categories i.e
1.Unique Parameters
2. Identical Parameters
3. Instance-Specific Parameters.
If a parameter appears more than once in a parameter file, the last specified value is the effective
value, unless the values are on consecutive linesin that case values from consecutive lines are
concatenated.
To set the value for a parameter the following syntax is used. An asterisk (*) or no value in place of an
instance_name implies that the parameter value is valid for all the instances.
<instance_name>. <parameter_name>=<parameter_value>*.undo_management=auto
To set the parameter in SPFILE, the following command can be used.
alter system set <parameter>=<value>scope=<memory/spfile/both>comment=<comments>deferred
sid=<sid, *>
When DBCA is used to create an RAC database, by default it creates an SPFILE on the shared disk
subsystem used. Else it can also be created manually.
Undo Management
Oracle stores original values of the data called Before image in undo segments to provide read
consistency and to roll back uncommitted transactions.
In the Oracle RAC environment, each instance stores transaction undo data in its dedicated undo
tablespace. For this we must set undo_tablespace for individual instances as follows.
prod1.undo_tablespace= undo_tbs1 prod2.undo_tablespace=undo_tbs2
Instances in RAC can use either automatic or manual undo management, but the parameter
undo_management as to be the same across all the instances.
To increase the size of an undo tablespace, either of the following can be used.
1. Add another datafile to undo tablespace.
2. Increase the size of the existing datafile(s) belonging to the undo tablespace.
While using Manual Undo Management following considerations are made.
1. Use manual undo management only if you have very good reason for not using automatic undo
management.
2.Do not create other objects such as tables, indexes, and so on in the tablespace used for rollback
segments.
3.Create one rollback segment for every four concurrent transactions.


Temporary Tablespace
In an RAC environment, all instance share the same temporary tablespace with each instance
creating a temporary segment in the tablespace it is using. The size should be at least equal to the
concurrent maximum requirement of all the instances.
The default temporary tablespace cannot be dropped or taken offline; however it can be changed
followed by dropping or taking offline the original default temporary tablespace.
To determine the temporary tablespace used by each instance GV$SORT_SEGMENTand
GV$TEMPSEG_USAGE views can be queried on INST_ID column basis.
In a temporary tablespace group, an user will always use the same assigned temporary tablespace
irrespective of the instance being used. An instance can reclaim the space used by other instances
temporary segments in that tablespace if required for large sorts.
Online Redologs
In an RAC environment, each instance has its own set of online redologfiles and redologs called
Thread.
The size of an online redolog is independent of other instancesredologsizes and is determined by the
local instances workload and backup and recovery considerations.
Each instance has exclusive write access to its own online redologfiles, however it can read another
instances current online redologfile to perform instance recovery if needed. Thus, an online
redologneeds to be located on a shared storage device and cannot be on a local disk.
Similar to single instance database, views V$LOG and V$LOGFILE can be used in RAC for getting
information about redo logs.
Archive Logs
Steps to enable or disable log mode
1.Set cluster_database=false for the instance:
SQL>alter system set cluster_database=false scope=spfile sid= prod1;
2. Shut down all the instances accessing the database:
$srvctl stop database -d prod
3. Mount the database using the local instance:
SQL>startup mount
4. Enable archiving:
SQL>alter database archivelog/ noarchivelog;
5. Change the parameter cluster_database=true for the instance prod1:
SQL>alter system set cluster_database=true scope=spfile sid=prod1;
6. Shut down the local instance:
SQL>shutdown ;
7. Bring up all the instances:
$srvctl start database -d prod
Flashback Area (Enable / Disable )
1. Set cluster_database=false for the instance to perform this operation.
SQL>alter system set cluster_database=false scope=spfile sid= prod1;
2. Set DB_RECOVERY_FILE_DEST_SIZE and DB_RECOVERY_FILE_DEST.
The DB_RECOVERY_FILE_DEST parameter should point to a shareable disk subsystem.
SQL>alter system set db_recovery_file_dest_size=200m scope=spfile;
SQL>alter system set db_recovery_file_dest=/ocfs2/flashback scope=spfile;
3. Shut down all instances accessing the database:
$srvctl stop database -d prod
4. Mount the database using the local instance:
SQL>startup mount
5. Enable the flashback by issuing the following command:
SQL>alter database flashback on/off;
6. Change back the parameter to cluster_database=true for the instance prod1:
SQL>alter system set cluster_database=true scope=spfile sid=prod1
7. Shut down the instance:
SQL>shutdown;
8. Start all the instances:
$srvctl start database -d prod
SRVCTL Utility
To start all instances associated with a database the following command can be executed from any of
the nodes. The command also starts listeners on each node if not already running.
$srvctl start database -d <DB Name>
Similarly, to shut down all instances associated with the database stop command can be used which
does not stop listeners, as they mightbe serving other database instances running on the same
machine.
$srvctl stop database d <DB Name>
Options specified by -o are directly passed on to SQL *Plus as command-line options for start/stop
commands.
$srvctl stop database -d <DB Name> -o immediate
$srvctl start database -d <DB Name> -o force
To perform operation on individual instance level, -I option can be used.
$srvctl stop database -d <DB Name> -i instance <IN name>
ORACLE CLUSTERWARE
It is a cluster manager integrated in the Database to handle the cluster including node membership,
group services, global resource management, and high availability functions. It can also be used with
non-cluster database.
Names as it has evolved -
1.Oracle Cluster Management Services (OCMS) 9.0.1 and 9.2
2.Cluster Ready Services (CRS) ( Generic, portable cluster manager) 10.1
3.Oracle Clusterware (CRS has been renamed) 10.2
Background processes -
1. Cluster Synchronization Service (CSS)
2. Cluster Ready Services (CRS)
3. Event Manager (EVM)
To administer Clusterware, CRSCTL utility can be used i.e present in $ORA_CRS_HOME/bin.
Oracle Clusterware must be installed prior to installing ORACLE database. We need ROOT user
during the installation process to perform various tasks requiring super user privileges.
Being the first Oracle software to be installed on the system, it is susceptible to configuration errors.
So it is recommended to use Cluster Verification Utility (CLUVFY) on all nodes i.e introduced in
Oracle 10.2 but backward compatible with 10.1.
Oracle Clusterware requires two files that must be located on shared storage for its operation.
1. Oracle Cluster Registry (OCR)
2. Voting Disk
Oracle Cluster Registry (OCR)
1) Located on shared storage and in Oracle 10.2 and above can be mirrored to maximum two copies.
2) Defines cluster resources including
Databases and Instances ( RDBMS and ASM)
Services and Node Applications (VIP,ONS,GSD)
Listener Process
Voting Disk (Quorum Disk / File in Oracle 9i)
Manages cluster membership by way of a health check and arbitrates cluster ownership among the
instances in case of network failures. RAC uses the voting disk to determine which instances are
members of a cluster. The voting disk must reside on shared disk. For high availability, Oracle
recommends that you have multiple voting disks. The Oracle Clusterware enables multiple voting
disks and can be mirrored to only Odd number of copies (1, 3, 5 etc)
VIRTUAL IP (VIP)
To make the applications highly available and to eliminate SPOF, Oracle 10g introduced a new
feature called CLUSTER VIPs i.e a virtual IP address different from the set of in cluster IP addresses
that is used by the outside world to connect to the database.
A VIP name and address must be registered in the DNS along with standard static IP information.
Listeners would be configured to listen on VIPs instead of the public IP.
When a node is down, the VIP is automatically failed over to one of the other nodes. The node that
gets the VIP will re-ARP to the world, indicating the new MAC address of the VIP. Clients are sent
error message immediately rather than waiting for the TCP timeout value.
CACHE FUSION:


1) Underlying technology that enables RAC (starting with 9i and improved performance with 10g)
2) Protocol that allows instances to combine their data caches into a shared global cache.
3) Allows any node to get the most up-to-date data information from the cache of any other node in
the cluster without having to access the disk drives again.
4) Needed when Dirty Block of data is created
Data from disk is read into memory on a node
Data is updated on that node
Data hasnt been written to disk yet
Another node requests the data
WHAT IS FAILOVER ?
1) If a node in the shared disk cluster fails, the system dynamically redistributes the workload among
the surviving cluster nodes.
2) RAC checks to detect node and network failures. A disk-based heartbeat mechanism uses the
control file to monitor node membership and the cluster interconnect is regularly checked to determine
correct operation.

3) Enhanced failover reliability in 10g with the use of Virtual IP addresses (VIPs)
4) If one node or instance fails, node detecting failure does the following.
Read redo log of failed instance from last checkpoint
Apply redo to datafiles including undo segments (roll forward)
Rollback uncommitted transactions
Cluster is frozen during part of this process
FAST APPLICATION NOTIFICATION (FAN)
1) FAN is a method introduced in Oracle 10.1, by which application scan be informed of changes in
cluster status for -
Fast node failure detection
Workload balancing
2) Advantageous by preventing applications from -
Waiting for TCP/IP timeouts when a node fails
Trying to connect to currently down database service
Processing data received from failed node
3) Can be notified using -
Server side callouts
Fast Connection Failover (FCF)
ONS API
ORACLE NOTIFICATION SERVICE (ONS)
1) ONS, introduced in Oracle 10.1 is a subscribe service used by Oracle Clusterware to propagate
messages to :
Nodes in cluster
Middle-tier application servers
Clients
2) ONS is automatically launched for RAC on each node as part of the Oracle Clusterware
installation process. However, it can also be configured to run on nodes hosting client or mid-tier
applications.
3) It is an underlying mechanism for Fast Application Notification (FAN).
4) ONS runs independent of Transparent Application Failover (TAF).
TRANSPARENT APPLICATION FAILOVER (TAF)
1) TAF is a client-side feature that allows for clients to reconnect to surviving databases in the event
of a failure of a database instance.
2) Masks failures to end users; they dont need to log back into the system
3) Applications and users are transparently reconnected to another node
4) Applications and queries continue uninterrupted
5) Transactions can failover and replay
6) Login context maintained
7) DML transactions are rolled back
8) Requires configuration in TNSNAMES.ORA
RAC_FAILOVER =
(DESCRIPTION =
(ADDRESS_LIST =
(FAILOVER = ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = node2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = RAC)
(SERVER = DEDICATED) (FAILOVER_MODE
=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=30)(DELAY=5))
) )


Oracle RAC Components
What is RAC?
RAC stands for Real Application cluster. It is a clustering solution from Oracle Corporation that
ensures high availability of databases by providing instance failover,media failover features.
Mention the Oracle RAC software components:-
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:
ACMSAtomic Controlfile to Memory Service (ACMS)
GTX0-jGlobal Transaction Process
LMONGlobal Enqueue Service Monitor
LMDGlobal Enqueue Service Daemon
LMSGlobal Cache Service Process
LCK0Instance Enqueue Process
RMSnOracle RAC Management Processes (RMSn)
RSMNRemote Slave Monitor
What is GRD?
GRD stands for Global Resource Directory. The GES and GCS maintains records of the statuses of
each datafile and each cahed block using global resource directory. This process is referred to as
cache fusion and helps in data integrity.
Give Details on Cache Fusion:-
Oracle RAC is composed of two or more instances. 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. To
enable inter instance communication Oracle RAC makes use of interconnects. The Global Enqueue
Service(GES) monitors and Instance enqueue process manages the cache fusion.
Give Details on ACMS:-
ACMS stands for Atomic Controlfile Memory Service. In an Oracle RAC environment ACMS is an
agent that ensures a distributed SGA memory update (ie) SGA updates are globally committed on
success or globally aborted in event of a failure.
Give details on GTX0-j :-
The process provides transparent support for XA global transactions in a RAC environment. The
database autotunes the number of these processes based on the workload of XA global transactions.
Give details on LMON:-
This process monitors global enques and resources across the cluster and performs global enqueue
recovery operations. This is called as Global Enqueue Service Monitor.
Give details on LMD:-
This process is called as global enqueue service daemon. This process manages incoming remote
resource requests within each instance.
Give details on LMS:-
This process is called as Global Cache service process. This process maintains statuses of datafiles
and each cached block by recording information in a Global Resource Directory (GRD). This process
also controls the flow of messages to remote instances and manages global data block access and
transmits block images between the buffer caches of different instances. This processing is a part of
cache fusion feature.
Give details on LCK0:-
This process is called as Instance enqueue process. This process manages non-cache fusion
resource requests such as library and row cache requests.
Give details on RMSn:-
This process is called as Oracle RAC management process. These pocesses perform managability
tasks for Oracle RAC. Tasks include creation of resources related Oracle RAC when new instances
are added to the cluster.
Give details on RSMN:-
This process is called as Remote Slave Monitor. This process manages background slave process
creation and communication on remote instances. This is a background slave process.This process
performs tasks on behalf of a co-ordinating process running in another instance.
What components in RAC must reside in shared storage?
All datafiles, controlfiles, SPFIles, redo log files must reside on cluster-aware shared storage.
What is the significance of using cluster-aware shared storage in an Oracle RAC environment?
All instances of an Oracle RAC can access all the datafiles, control files, SPFILEs, redolog files when
these files are hosted out of cluster-aware shared storage which are group of shared disks.
Give few examples for solutions that support cluster storage:-
ASM(automatic storage management), raw disk devices, network file system(NFS), OCFS2 and
OCFS(Oracle Cluster Fie systems).
What is an interconnect network?
An interconnect network is a private network that connects all of the servers in a cluster.
The interconnect network uses a switch/multiple switches that only the nodes in the cluster can
access.
How can we configure the cluster interconnect?
Configure User Datagram Protocol(UDP) on Gigabit ethernet for cluster interconnect.
On unix and linux systems we use UDP and RDS (Reliable data socket) protocols to be used by
Oracle Clusterware. Windows clusters use the TCP protocol.
Can we use crossover cables with Oracle Clusterware interconnects?
No, crossover cables are not supported with Oracle Clusterware intercnects.
What is the use of cluster interconnect?
Cluster interconnect is used by the Cache fusion for inter instance communication.
How do users connect to database in an Oracle RAC environment?
Users can access a RAC database using a client/server configuration or through one or more middle
tiers, with or without connection pooling. Users can use oracle services feature to connect to
database.
What is the use of a service in Oracle RAC environemnt?
Applications should use the services feature to connect to the Oracle database. Services enable us to
define rules and characteristics to control how users and applications connect to database instances.
What are the characterises controlled by Oracle services feature?
The characteristics include a unique name, workload balancing and failover options, and high
availability characteristics.
Which enable the load balancing of applications in RAC?
Oracle Net Services enable the load balancing of application connections across all of the instances
in an Oracle RAC database.
What is a virtual IP address or VIP?
A virtl IP address or VIP is an alternate IP address that the client connections use instead of the
standard public IP address. To configure VIP address, we need to reserve a spare IP address for
each node, and the IP addresses must use the same subnet as the public network.
What is the use of VIP?
If a node fails, then the nodes VIP address fails over to another node on which the VIP address can
accept TCP connections but it cannot accept Oracle connections.
Give situations under which VIP address failover happens:-
VIP addresses failover happens when the node on which the VIP address runs fails, all interfaces for
the VIP address fails, all interfaces for the VIP address are disconnected from the network.
What is the significance of VIP address failover?
When a VIP address failover happens, Clients that attempt to connect to the VIP address receive a
rapid connection refused error.They dont have to wait for TCP connection timeout messages.
What are the administrative tools used for Oracle RAC environments?
Oracle RAC cluster can be administered as a single image using OEM (Enterprise Manager),
SQL*PLUS, Servercontrol(SRVCTL), clusterverificationutility(cvu), DBCA, NETCA.
How do we verify that RAC instances are running?
Issue the following query from any one node connecting through SQL*PLUS.
$connect sys/sys as sysdba
SQL>select * from V$ACTIVE_INSTANCES;
The query gives the instance number under INST_NUMBER column, host_: instancename under
INST_NAME column.
What is FAN?
Fast application Notification as it abbreviates to FAN relates to the events related to instances,
services and nodes. This is a notification mechanism that Oracle RAC uses to notify other processes
about the configuration and service level information that includes service status changes such as,
UP or DOWN events. Applications can respond to FAN events and take immediate action.
Where can we apply FAN UP and DOWN events?
FAN UP and FAN DOWN events can be applied to instances, services and nodes.
State the use of FAN events in case of a cluster configuration change?
During times of cluster configuration changes,Oracle RAC high availability framework publishes a
FAN event immediately when a state change occurs in the cluster.So applications can receive FAN
events and react immediately.This prevents applications from polling database and detecting a
problem after such a state change.
Why should we have seperate homes for ASm instance?
It is a good practice to have ASM home seperate from the database home(ORACLE_HOME).This
helps in upgrading and patching ASM and the Oracle database software independent of each
other.Also,we can deinstall the Oracle database software independent of the ASM instance.
What is the advantage of using ASM?
Having ASM is the Oracle recommended storage option for RAC databases as the ASM maximizes
performance by managing the storage configuration across the disks.ASM does this by distributing
the database file across all of the available storage within our cluster database environment.
What is rolling upgrade?
It is a new ASM feature from Database 11g.ASM instances in Oracle database 11g release(from
11.1) can be upgraded or patched using rolling upgrade feature. This enables us to patch or upgrade
ASM nodes in a clustered environment without affecting database availability.During a rolling upgrade
we can maintain a functional cluster while one or more of the nodes in the cluster are running in
differentsoftware versions.
Can rolling upgrade be used to upgrade from 10g to 11g database?
No, it can be used only for Oracle database 11g releases(from 11.1).
State the initialization parameters that must have same value for every instance in an Oracle
RAC database:-
Some initialization parameters are critical at the database creation time and must have same values.
Their value must be specified in SPFILE or PFILE for every instance. The list of parameters that must
be identical on every instance are given below:
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 (RDBMS or ASM)
PARALLEL_MAX_SERVERS
REMOTE_LOGIN_PASSWORD_FILE
UNDO_MANAGEMENT
Can the DML_LOCKS and RESULT_CACHE_MAX_SIZE be identical on all instances?
These parameters can be identical on all instances only if these parameter values are set to zero.
What two parameters must be set at the time of starting up an ASM instance in a RAC
environment?
The parameters CLUSTER_DATABASE and INSTANCE_TYPE must be set.
Mention the components of Oracle clusterware:-
Oracle clusterware is made up of components like voting disk and Oracle Cluster Registry(OCR).
What is a CRS resource?
Oracle clusterware is used to manage high-availability operations in a cluster. Anything that Oracle
Clusterware manages is known as a CRS resource.Some examples of CRS resources are
database,an instance,a service,a listener,a VIP address,an application process etc.
What is the use of OCR?
Oracle clusterware manages CRS resources based on the configuration information of CRS
resources stored in OCR(Oracle Cluster Registry).
How does a Oracle Clusterware manage CRS resources?
Oracle clusterware manages CRS resources based on the configuration information of CRS
resources stored in OCR(Oracle Cluster Registry).
Name some Oracle clusterware tools and their uses?
OIFCFG allocating and deallocating network interfaces
OCRCONFIG Command-line tool for managing Oracle Cluster Registry
OCRDUMP Identify the interconnect being used
CVU Cluster verification utility to get status of CRS resources
What are the modes of deleting instances from ORacle Real Application cluster Databases?
We can delete instances using silent mode or interactive mode using DBCA(Database Configuration
Assistant).
How do we remove ASM from a Oracle RAC environment?
We need to stop and delete the instance in the node first in interactive or silent mode.After that asm
can be removed using srvctl tool as follows:
srvctl stop asm -n node_name
srvctl remove asm -n node_name
We can verify if ASM has been removed by issuing the following command:
srvctl config asm -n node_name
How do we verify that an instance has been removed from OCR after deleting an instance?
Issue the following srvctl command:
srvctl config database -d database_name
cd CRS_HOME/bin
./crs_stat
How do we verify an existing current backup of OCR?
We can verify the current backup of OCR using the following command :
Ocrconfig showbackup
What are the performance views in an Oracle RAC environment?
We have v$ views that are instance specific. In addition we have GV$ views called as global views
that has an INST_ID column of numeric data type.GV$ views obtain information from individual V$
views.
What are the types of connection load-balancing?
There are two types of connection load-balancing:server-side load balancing and clientside load
balancing.
What is the differnece between server-side and client-side connection load balancing?
Client-side balancing happens at client side where load balancing is done using listener.In case of
server-side load balancing listener uses a load-balancing advisory to redirect connections to the
instance providing best service.
Give the usage of srvctl:-
srvctl start instance -d db_name -i inst_name_list [-o start_options]srvctl stop instance -d name -i
inst_name_list [-o stop_options]srvctl stop instance -d orcl -i orcl3,orcl4 -o immediatesrvctl start
database -d name [-o start_options]srvctl stop database -d name
[-o stop_options]srvctl start database -d orcl -o mount
Virtual IP(VIP) in RAC
How new connection establish in Oracle RAC?
For failover configuration we should need to configure our physical ip of host name in listener
configuration. Listener process is accepting new connection request and handover user process to
server process or dispatcher process in Oracle.
Means using listener new connection is being established by Oracle. Once connection gets
established there is no need of listener process. If new connection is trying to get session in database
and listener is down then what will be happening. User process gets error message and connection
fails. Because listener is down in same host or something else problem. But in Oracle RAC database
environment database is in sharing mode. Oracle RAC database is shared by all connected nodes.
Means more than 1 listeners are running in various nodes.
In Oracle RAC database if user process is trying to get connection with some listener and found
listener is down or node is down then Oracle RAC automatically transfer this request to another
listener on another node. Up to Oracle 9i we use physical IP address in listener configuration. Means
if requested connection gets failed then it will be diverting to another node using physical IP address
of another surviving node. But during this automatically transfer, connection should need to wait up to
get error message of node down or listener down using TCP/IP connection timeout. Means session
should need to wait up to getting TCP/IP timeout error dictation. Once error message is received
oracle RAC automatically divert this new connection request to another surviving node.
Using physical IP address there is biggest gap to get TCP/IP timeout for failover suggestion. Session
should need to wait for same timeout. High availability of Oracle RAC depends on this time wasting
error message.
Why VIP (Virtual IP) needs in Oracle RAC?
From Oracle 10g, virtual IP considers to configure listener. Using virtual IP we can save our TCP/IP
timeout problem because Oracle notification service maintains communication between each nodes
and listeners. Once ONS found any listener down or node down, it will notify another nodes and
listeners with same situation. While new connection is trying to establish connection to failure node or
listener, virtual IP of failure node automatically divert to surviving node and session will be
establishing in another surviving node. This process doesnt wait for TCP/IP timeout event. Due to this
new connection gets faster session establishment to another surviving nodes/listener.
Characteristic of Virtual IP in Oracle RAC:
Virtual IP (VIP) is for fast connection establishment in failover dictation. Still we can use physical IP
address in Oracle 10g in listener if we have no worry for failover timing. We can change default
TCP/IP timeout using operating system utilities or commands and kept smaller. But taking advantage
of VIP (Virtual IP address) in Oracle 10g RAC database is advisable. There is utility also provided to
configure virtual IP (vip) with RAC environment called VIPCA. Default path is $ORA_CRS_HOME/bin.
During installation of Oracle RAC, it is executed.
Advantage of Virtual IP deployment in Oracle RAC:
Using VIP configuration, client can be able to get connection fast even fail over of connection request
to node. Because vip automatically assign to another surviving node faster and it cant wait for TNS
timeout old fashion.
Disadvantage of Virtual IP deployment in Oracle RAC:
Some more configurations is needed in system for assign virtual IP address to nodes like in /etc/hosts
and others. Some misunderstanding or confusion may occur due to multiple IP assigns in same node.
Important for VIP configuration:
The VIPs should be registered in the DNS. The VIP addresses must be on the same subnet as the
public host network addresses. Each Virtual IP (VIP) configured requires an unused and resolvable IP
address.

S-ar putea să vă placă și