d50311gc40 Rac Admin SG
d50311gc40 Rac Admin SG
d50311gc40 Rac Admin SG
s a
) ha
o m
y s c e
u n is uid
Oracle Database
b
r 11g: n t GRAC
n t o@ tude
Administration
c i me this S
n as use
e r ton e Student
to Guide
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
D50311GC40
Edition 4.0
December 2012
D78200
Authors Copyright 2012, Oracle and/or its affiliates. All rights reserved.
James Spiller This document contains proprietary information and is protected by copyright and
other intellectual property laws. You may copy and print this document solely for your
own use in an Oracle training course. The document may not be modified or altered
Technical Contributors in any way. Except where your use constitutes "fair use" under copyright law, you
and Reviewers may not use, share, download, upload, copy, print, display, perform, reproduce,
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
publish, license, post, transmit, or distribute this document in whole or in part without
Christopher Andrews the express authorization of Oracle.
Christian Bauwens
The information contained in this document is subject to change without notice. If you
Harald Van Breederode find any problems in the document, please report them in writing to: Oracle University,
David Brower 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Michael Cebulla
Jonathan Creighton Restricted Rights Notice
Al Flournoy If this documentation is delivered to the United States Government or anyone using
Andy Fortunak the documentation on behalf of the United States Government, the following notice is
Mark Fuller
applicable:
s a
Joel Goodman U.S. GOVERNMENT RIGHTS ) ha
o m
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or
Michael Hazel
s c e
disclose these training materials are restricted by the terms of the applicable Oracle
y
Pete Jones
is uid
license agreement and/or the applicable U.S. Government contract.
u n
Mike Leatherman
Trademark Notice
b r n t G
o@ tude
Jerry Lee
Barb Lundhild n t
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names
Markus Michalewicz
c i me this S
may be trademarks of their respective owners.
Peter Sharman
n as use
Ranbir Singh
e r ton e to
Linda Smalley
( e v ens
Janet Stern
o n n e lic
r t
Richard Strohm
e a b l
Ev nsfer
S. Matt Taylor
n
e r to -tra
Branislav Valny
Ev non
Jean-Francois Verrier
Rick Wessman
Doug Williams
Editors
Aju Kumar
Smita Kommini
Daniel Milne
Publishers
Jobi Varghese
Sujatha Nagendra
Contents
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
n Ev nsfer
Single Client Access Name 1-22
e r to -tra
Oracle Automatic Storage Management (ASM) 1-24
Ev non ASM Key Features and Benefits 1-25
ASM and Grid Infrastructure 1-26
Quiz 1-27
Summary 1-30
Practice 1 Overview 1-31
2 RAC Concepts
Objectives 2-2
Overview of Oracle RAC 2-3
RAC One Node Single-Instance High Availability 2-5
Oracle RAC One Node 2-6
Oracle RAC One Node and Oracle Clusterware 2-7
Cluster-Aware Storage Solutions 2-8
Oracle Cluster File System 2-9
Benefits of Using RAC 2-10
iii
Clusters and Scalability 2-11
Levels of Scalability 2-12
Scaleup and Speedup 2-14
Speedup/Scaleup and Workloads 2-15
I/O Throughput Balanced: Example 2-16
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
iv
Cluster Database Instance Home Page 4-5
Cluster Home Page 4-6
Configuration Section 4-7
Topology Viewer 4-9
Enterprise Manager Alerts and RAC 4-10
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
v
Configuring RAC Backup Settings with EM 5-16
Oracle Recovery Manager 5-17
Configuring RMAN Snapshot Control File Location 5-18
Configuring Control File and SPFILE Autobackup 5-19
Crosschecking on Multiple RAC Clusters Nodes 5-20
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
vi
7 RAC Database Monitoring and Tuning
Objectives 7-2
CPU and Wait Time Tuning Dimensions 7-3
RAC-Specific Tuning 7-4
Analyzing Cache Fusion Impact in RAC 7-5
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
vii
Creating Service with Enterprise Manager 8-6
Creating Services with SRVCTL 8-7
Managing Services with Enterprise Manager 8-8
Managing Services with EM 8-9
Managing Services with srvctl 8-10
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
viii
Server-Side ONS 9-17
Optionally Configuring the Client-Side ONS 9-18
UCP JDBC Fast Connection Failover: Overview 9-19
Using Oracle Streams Advanced Queuing for FAN 9-20
JDBC/ODP.NET FCF Benefits 9-21
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
ix
11 Oracle RAC One Node
Objectives 11-2
Verifying an Existing RAC One Node Database 11-3
Oracle RAC One Node Online Migration 11-4
Online Migration Considerations 11-5
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
x
13 Design for High Availability
Objectives 13-2
Causes of Unplanned Down Time 13-3
Causes of Planned Down Time 13-4
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
xi
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EDatabase
n s fe11g Release 2, Automatic Storage Management (ASM) and Oracle
e o
With Oracle
rt n-are trainstalled into a single home directory, collectively called Oracle Grid
v
Clusterware
no This directory is referred to as the Grid Infrastructure home. Configuration
EInfrastructure.
assistants start after the Oracle Universal Installer interview process and binary installation
that configure ASM and Oracle Clusterware. Although the installation is called Oracle Grid
Infrastructure, Oracle Clusterware and Automatic Storage Manager remain separate
components.
Easy installation
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Easy management
Continuing tight integration with Oracle RAC
ASM enhancements with
benefits for all applications
No additional clusterware
required s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nshas febecome the required clusterware for Oracle Real Application Clusters
Oracle
e oClusterware
rt Oracle a
trDatabase
v
(RAC). n - 11g Release 2 builds on the tight integration between Oracle
no and RAC by extending the integration with Automatic Storage Management
EClusterware
(ASM). The result is that now all the shared data in your cluster can be managed using ASM.
This includes the shared data required to run Oracle Clusterware, Oracle RAC, and any other
applications you choose to deploy in your cluster.
In most cases, this capability removes the need to deploy additional clusterware from other
sources, which also removes the potential for integration issues caused by running multiple
clusterware software stacks. It also improves the overall manageability of the cluster.
Although most of the enhancements to ASM are the subject of later lessons, the next part of
this lesson examines a series of additional Oracle Clusterware capabilities and the benefits
they provide.
(primarily from 11.1). GIPC can support multiple communications types: CLSC, TCP, UDP,
IPC and of course the communication type GIPC.
Use high-speed network adapters for the interconnects and switches that support TCP/IP.
Gigabit Ethernet or an equivalent is recommended.
Each node in a cluster requires a supported interconnect protocol to support Cache Fusion
and TCP/IP to support Clusterware polling. Token Ring is not supported for cluster
interconnects on IBM AIX. Your interconnect protocol must be certified by Oracle for your
platform. s a
) ha
Note: Cross-over cables are not supported for use with Oracle Clusterware interconnects.
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Oracle Clusterware
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
init daemon
Oracle Clusterware processes
/sbin/init ohasd.bin cssdmonitor
Clusterware
octssd.bin crsd.bin
startup script
oraagent.bin gipcd.bin
diskmon.bin mdnsd.bin
/etc/init.d/init.ohasd
ocssd.bin gpnpd.bin
evmd.bin evmlogger.bin
s a
cssdagent oraagent.bin
) ha
ologgerd.bin osysmond.bin
o m
ons
s c e
orarootagent.bin
y
Oracle Clusterware installation modifies r/etc/inittab u nis Guid to
restart ohasd in the event of a crash. @ b ent
e n to Stud
# cat /etc/inittab
s c im this
..
n a urun s e>/dev/null 2>&1 </dev/null
ton e to
h1:35:respawn:/etc/init.d/init.ohasd
e r
v ens
( e
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
Duringo n
the
E nsfeof Oracle Clusterware, the init.ohasd startup script is copied to
installation
v e rt n-traThe wrapper script is responsible for setting up environment variables and
/etc/init.d.
no the Oracle Clusterware daemons and processes.
Ethen starting
The Oracle High Availability Services daemon (ohasd) is responsible for starting in proper
order, monitoring, and restarting other local Oracle daemons including the crsd daemon,
which manages clusterwide resources. When init starts ohasd on Clusterware startup,
ohasd starts orarootagent, cssdagent, and oraagent. Some of the high availability
daemons will be running under the root user with real-time priority, and others will be
running under the Clusterware owner with user-mode priorities after they are started. When a
command is used to stop Oracle Clusterware, the daemons will be stopped, but the ohasd
process will remain running.
init
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
ohasd
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
ohasd
s a
) ha
o m
y
ACFS s c e
osysmond ologgerd crsd diskmon
u n is uictssdd
br ent
DriversG
@
e nto Stud
s c im this
n a use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
The OHASD n n fe
Eorarootagent
s
e o
rt n-tra
v
The process is responsible for starting the following processes:
no
E orarootagent
osysmond: The system monitor service (osysmond) is the monitoring and operating
system metric collection service that sends the data to the cluster logger service,
ologgerd. The cluster logger service receives the information from all the nodes and
persists in the Cluster Health Monitor (CHM) repository. There is one system monitor
service on every node.
ologgerd: There is one cluster logger service (ologgerd) on only one node in a
cluster and another node is chosen by the cluster logger service to house the standby
for the master cluster logger service. If the master cluster logger service fails, the node
where the standby resides takes over as master and selects a new node for standby.
The master manages the operating system metric database in the CHM repository and
interacts with the standby to manage a replica of the master operating system metrics
database.
crsd: The Cluster Ready Services (CRS) process is the primary program for managing
high availability operations in a cluster. The CRS daemon (crsd) manages cluster
resources based on configuration information stored in OCR for each resource. This
includes start, stop, monitor, and failover operations. The crsd process generates
events when the status of a resource changes. When Oracle RAC is installed, the crsd
process monitors the Oracle database components and automatically restarts them
when a failure occurs.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
ACFS
osysmond ologgerd crsd diskmon
Drivers ctssd s a
)ha
co m
s
orarootagent oraagent unis
y
u ide
b r nt G
n t o@ tude
c i me this S
Node vip SCAN n as usnetwork
vip e GNS vip
n
rto se t o
v e n and/or its affiliates. All rights reserved.
n (e 2012,
Copyright l i c eOracle
r t o n le
e a b
The CRSD n Ev nsfer
e r to -tra
orarootagent
v crsdoprocess
EThe n starts another orarootagent process and another oraagent process.
n
The new orarootagent process is responsible for starting the following resources:
Node vip: The node vip is a node application (nodeapp) responsible for eliminating
response delays (TCP timeouts) to client programs requesting a connection to the
database. Each node vip is assigned an unused IP address. This is usually done via
DHCP but can be manually assigned. There is initially one node vip per cluster node at
Clusterware startup. When a cluster node becomes unreachable, the node vip is failed
over to a surviving node and redirects connection requests made to the unreachable
node to a surviving node.
SCAN vip: SCAN vips or Single Client Access Name vips are part of a connection
framework that eliminates dependencies on static cluster node names. This framework
allows nodes to be added to or removed from the cluster without affecting the ability of
clients to connect to the database. If GNS is used in the cluster, three SCAN vips are
started on the member nodes by using IP addresses assigned by the DHCP server. If
GNS is not used, SCAN vip addresses for the cluster can be defined in the DNS server
used by the cluster nodes.
Network: Network resources required by the cluster are started.
GNS vip: If GNS is used to resolve client requests for the cluster, a single GNS vip for
the cluster is started. The IP address is assigned in the GNS server used by the cluster
nodes.
Oracle Database 11g: RAC Administration 1 - 17
Clusterware Startup Details:
The CRSD oraagent
ohasd
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
ACFS
osysmond ologgerd crsd diskmon
Drivers ctssd s a
)ha
co m
s
orarootagent oraagent unis
y
u ide
b r nt G
n t o@ tude
i m e is S
ASM SCAN
a s c e thNode Database
ONS
Instances onListener n s
u Listener Instances
r t t o
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
The CRSD n E nsfe
e o
rt n-tra
oraagent
v
As noted
E noin the previous slide, the crsd process starts another orarootagent process and
another oraagent process. The new oraagent process is responsible for starting the
following resources:
ONS: The ONS or Oracle Notification Service is a publishing and subscribing service for
communicating Fast Application Notification (FAN) events.
ASM Instances: The Oracle ASM instances provide disk management for Oracle
Clusterware and Oracle Database. One ASM instance is started on each cluster node.
SCAN Listener: Three SCAN listeners are started on the cluster nodes where the
SCAN vips are started. Oracle Database 11g Release 2 and later instances only register
with SCAN listeners as remote listeners.
Node Listener: If GNS is used to resolve client requests for the cluster, a single GNS
vip for the cluster is started. The IP address is assigned in the GNS server used by the
cluster nodes.
Database Instances: If the cluster nodes are supporting an Oracle RAC database, the
database instances are started.
ohasd
s a
)ha
co m
s
gipcd mdnsd evmd ASM nis
u
y gpnpd
u ide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
The OHASD n Eoraagent
n s fe
e o
rt n-tra
v
The
no process started by ohasd is responsible for starting the following processes:
E oraagent
gipcd: The Grid Interprocess Communication (GIPC) daemon is a support process that
enables Redundant Interconnect Usage. Redundant Interconnect Usage enables load
balancing and high availability across multiple (up to four) private networks (also known
as interconnects).
mdnsd: The Multicast Domain Name Service (mDNS) daemon is used by Grid Plug and
Play to locate profiles in the cluster, as well as by GNS to perform name resolution.
evmd: The Event Management daemon (EVM) is a background process that publishes
events that Oracle Clusterware creates.
ASM: Provides disk management for Oracle Clusterware and Oracle Database
gpnpd: Grid Plug and Play (GPNPD) provides access to the Grid Plug and Play profile
and coordinates updates to the profile among the nodes of the cluster to ensure that all
of the nodes have the most recent profile.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
RAC databases.
OCR and voting disks can be stored in Oracle ASM.
Storing OCR and the voting disk on Oracle ASM eliminates
the need for third-party cluster volume managers.
Only one Oracle ASM instance is supported on a server.
When managing an ASM instance, the administration s a
h
activity must be performed in the Grid Infrastructure home.
) a
c om
i s ys ide
r u n Gu
@ b ent
e nto Stud
s c im this
n a use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfecan be stored in Oracle Automatic Storage Management (Oracle ASM).
e o
OCR tand votingadisks
r the tr ASM partnership and status table is replicated on multiple disks and is
v
Because n -
Oracle
E no
extended to store OCR, the OCR can tolerate the loss of the same number of disks as are in
the underlying disk group and can be relocated in response to disk failures.
Oracle ASM reserves several blocks at a fixed location on every Oracle ASM disk for storing
the voting disk. If the disk holding the voting disk fails, Oracle ASM selects another disk on
which to store this data.
Storing OCR and the voting disk on Oracle ASM eliminates the need for third-party cluster
volume managers and eliminates the complexity of managing disk partitions for OCR and
voting disks in Oracle Clusterware installations.
Only one Oracle ASM instance is supported on a server. When managing an Oracle ASM
instance, the administration activity must be performed in the Oracle Grid Infrastructure home.
responsible for:
a. Starting Oracle Clusterware when the node boots
b. Mounting shared volumes as required by Oracle
Clusterware
c. Managing node evictions
d. Restarting ohasd in the event of a crash s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
Answer:
e o d
rt n-tra
v
E answer
The
no is d. The init.ohasd entry in the /etc/inittab file is responsible for
restarting the Oracle High Availability Services daemon (ohasd) in the event of a crash.
or RDS.
a. True
b. False
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
Answer:
e o b
rt n-tra
v
This
no is false. Actually, each cluster nodes public Ethernet adapter should support
E statement
TCP/IP. The private adapter should support UDP or RDS on Linux/UNIX platforms and
TCP/IP on Windows platforms.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
RAC Concepts
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Windows (OCFS)
Provides open solution on the operating system side
OCFS2 can be downloaded from OTN:
http://oss.oracle.com/projects/ocfs2/ (Linux)
OCFS is included in the installation media for Oracle Grid
Infrastructure and Oracle RAC on Windows platforms. s a
ha
It is installed automatically with Oracle Clusterware. m)
s co
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n s fe (OCFS) is a shared file system designed specifically for Oracle
E FilenSystem
Oracle
e t oCluster
rApplicationtraClusters. OCFS eliminates the requirement that Oracle database files be
v
Real n -
Elinked tonological drives and enables all nodes to share a single Oracle Home (on Windows
2000 and 2003 only), instead of requiring each node to have its own local copy. OCFS
volumes can span one shared disk or multiple shared disks for redundancy and performance
enhancements. The following is a list of files that can be placed on Oracle Cluster File System
version 1:
Oracle software installation: Currently, this configuration is supported only on Windows
2000 and 2003. Oracle Cluster File System 2 1.2.1 provides support for Oracle Home on
Linux as well.
Oracle files (control files, data files, redo logs, bfiles, and so on)
Shared configuration files (spfile)
Files created by the Oracle server during run time
Voting and OCR files
Oracle Cluster File System is free for developers and customers. The source code is provided
under the General Public License (GPL) on Linux. It can be downloaded from the Oracle
Technology Network website.
Note: From OTN, you can specifically download OCFS for Linux. However, when you
download the database software for Windows, OCFS is already included.
Oracle Database 11g: RAC Administration 2 - 9
Benefits of Using RAC
Shared
Memory
storage
s a
Cache Cache SGA SGA ) ha
o m
y s c e
CPU CPU CPU CPU BGP BGP un BGPGu
is BGP id
@ br ent
Cache coherency nto Cache d
tufusion
e S
s c im this
n a use BGP (background process)
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
If yourto n E nscales
application s fe transparently on SMP machines, then it is realistic to expect it to
v e
scale r well on
n - tra without having to make any changes to the application code.
RAC,
no the database instance, and the node itself, as a single point of failure, and
ERAC eliminates
ensures database integrity in the case of such failures.
The following are some scalability examples:
Allow more simultaneous batch processes.
Allow larger degrees of parallelism and more parallel executions to occur.
Allow large increases in the number of connected users in online transaction processing
(OLTP) systems.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s fe of cluster databases requires optimal scalability on four levels:
e t o
Successful implementation
rHardware trascalability: Interconnectivity is the key to hardware scalability, which greatly
v n -
E dependsno on high bandwidth and low latency.
Operating system scalability: Methods of synchronization in the operating system can
determine the scalability of the system. In some cases, potential scalability of the
hardware is lost because of the operating systems inability to handle multiple resource
requests simultaneously.
Database management system scalability: A key factor in parallel architectures is
whether the parallelism is affected internally or by external processes. The answer to
this question affects the synchronization mechanism.
Application scalability: Applications must be specifically designed to be scalable. A
bottleneck occurs in systems in which every session is updating the same data most of
the time. Note that this is not RAC-specific and is true on single-instance systems, too.
It is important to remember that if any of the preceding areas are not scalable (no matter how
scalable the other areas are), then parallel cluster processing may not be successful. A typical
cause for the lack of scalability is one common shared resource that must be accessed often.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Original system
s a
Hardware Time Up to ) ha
200% Hardware o m
of Up to
y s c 100%e
Hardware task 300%
u n is uofidtask
Time of
Hardware b r n t G
task
t o@ tudTime/2 e
n
e is S
Hardware
c i m th
Time
a s e
o n n o us
e r t e t
v
(e 2012, s
n and/or its affiliates. All rights reserved.
eOracle
n n
Copyright l i c
e r t o
a b le
n Evability s f er
Scaleup
r t o is the
t r a n sustain the same performance levels (response time) when both
to
ve oand
Eworkload - resources increase proportionally:
n n Scaleup = (volume parallel) / (volume original)
For example, if 30 users consume close to 100 percent of the CPU during normal processing,
then adding more users would cause the system to slow down due to contention for limited
CPU cycles. However, by adding CPUs, you can support extra users without degrading
performance.
Speedup is the effect of applying an increasing number of resources to a fixed amount of
work to achieve a proportional reduction in execution times:
Speedup = (time original) / (time parallel)
Speedup results in resource availability for other tasks. For example, if queries usually take
ten minutes to process, and running in parallel reduces the time to five minutes, then
additional queries can run without introducing the contention that might occur if they were to
run concurrently.
na uss e
n
e r to e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe delivers the I/O demand that is required, all system components
E thatnassystem
To make
e o sure
rt I/O path a to be orchestrated to work together.
trneed
v
on the n -
no link determines the I/O throughput.
EThe weakest
On the left, you see a high-level picture of a system. This is a system with four nodes, two
Host Bus Adapters (HBAs) per node, two Fibre Channel switches, which are attached to four
disk arrays each. The components on the I/O path are the HBAs, cables, switches, and disk
arrays. Performance depends on the number and speed of the HBAs, switch speed, controller
quantity, and speed of disks. If any one of these components is undersized, the system
throughput is determined by this component. Assuming you have a 2 Gb HBA, the nodes can
read about 8 200 MB/s = 1.6 GB/s. However, assuming that each disk array has one
controller, all eight arrays can also do 8 200 MB/s = 1.6 GB/s. Therefore, each of the Fibre
Channel switches also needs to deliver at least 2 Gb/s per port, to a total of 800 MB/s
throughput. The two switches will then deliver the needed 1.6 GB/s.
Note: When sizing a system, also take the system limits into consideration. For instance, the
number of bus slots per node is limited and may need to be shared between HBAs and
network cards. In some cases, dual port cards exist if the number of slots is exhausted. The
number of HBAs per node determines the maximal number of Fibre Channel switches. And
the total number of ports on a switch limits the number of HBAs and disk controllers.
Throughput Performance
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
1008
1008 1008
1 2
s a
)ha
SGA1 SGA2 SGA1 SGA2
m
co
1009 1008 s
1009
u n isy uide
b r nt G
Lost
n t o@ tude
updates!
1008 c i me th1008 is S
n 4a
s se
o n o u 3
t
er nse t
e v
( 2012,
n n
Copyright l i ceOracle and/or its affiliates. All rights reserved.
e r to able
n s fer
Ev nenvironments,
r t o
In single-instance
t r a locking coordinates access to a common resource such as a
vein a table.
Erow n- Locking prevents two processes from changing the same resource (or row) at
the same notime.
In RAC environments, internode synchronization is critical because it maintains proper
coordination between processes on different nodes, preventing them from changing the same
resource at the same time. Internode synchronization guarantees that each instance sees the
most recent version of a block in its buffer cache.
Note: The slide shows you what would happen in the absence of cache coordination. RAC
prevents this problem.
s a
)ha
co m
s
u n isyExecution
u ide
b t G
r ncoordinator
Shared disks n t o@ tude Parallel
c i me this S execution
n s
a use server
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe
E nsoptimizer
Oracles
r t o cost-based
t r a incorporates parallel execution considerations as a
ve on-component in arriving at optimal execution plans.
Efundamental
In a RAC n environment, intelligent decisions are made with regard to intranode and internode
parallelism. For example, if a particular query requires six query processes to complete the
work and six parallel execution slaves are idle on the local node (the node that the user
connected to), then the query is processed by using only local resources. This demonstrates
efficient intranode parallelism and eliminates the query coordination overhead across multiple
nodes. However, if there are only two parallel execution servers available on the local node,
then those two, and four of another node, are used to process the query. In this manner, both
internode and intranode parallelism are used to speed up query operations.
In real-world decision support applications, queries are not perfectly partitioned across the
various query servers. Therefore, some parallel execution servers complete their processing
and become idle sooner than others. The Oracle parallel execution technology dynamically
detects idle processes and assigns work to these idle processes from the queue tables of the
overloaded processes. In this way, the Oracle server efficiently redistributes the query
workload across all processes. Real Application Clusters further extends these efficiencies to
clusters by enabling the redistribution of work across all the parallel execution slaves of a
cluster.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EUniversals e
fInstaller
r t o
The Oracle
t r a n (OUI) is used to install the Oracle Database 11g Release 2
ve software.
(11.2) - Start the OUI by executing the runInstaller command from the root
noofnthe Oracle Database 11g Release 2 CD-ROM or from the software staging
Edirectory
location. You can use the Configure Security Updates window to specify an email address to
receive security updates directly from Oracle Support as they occur. Alternatively, you can
elect to opt out of these alerts. If you want to receive them, supply your email address and
your Oracle Support password, and click Next.
The Download Software Updates page allows you to include database software updates or
patches in the installation. The page allows you to either download them directly or use pre-
downloaded updates. Alternatively, you can choose to bypass software updates entirely.
The Select Installation Option window enables you to create and configure a database, install
database software only, or upgrade an existing database. Select the Install database
software only option and click Next.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfeOptions window, select Real Application Clusters database
e o
In thetGrid
r nand Installation
traselect all nodes in your cluster on which the software should be installed. If
v
installation -
o oracle user has not been set up, click SSH Connectivity, then provide the
ESSH fornthe
oracle users password and click Setup. If SSH has already been set up, then click Test.
When finished, click Next to continue. In the Select product languages window, select your
desired languages from the Available Languages list and click the right arrow to promote the
selected languages to the Selected Languages list. Click Next to continue.
In the Select database edition window (not shown in the slide), you select whether to install
the Enterprise Edition or the Standard Edition. Select the Enterprise Edition option and click
Next to continue.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Database
n s fe edition page, you can select to install either the Enterprise Edition or
On the
e oSelect
tra Click Next to continue.
rt Edition.
v
Standard n -
no Installation Location window, provide a value for ORACLE_BASE if you have not
EIn the Specify
already done so. The default ORACLE_BASE location is /u01/app/oracle, provided the
RDBMS software is being installed by the oracle account. The Software Location section of
the window enables you to specify a value for the ORACLE_HOME location. The default
ORACLE_HOME location is /u01/app/oracle/product/11.2.0/dbhome_1. Accept the
suggested path or enter your own location. After entering the information, review it for
accuracy, and click the Next button to continue. In the Privileged operating system groups
window, select the operating system group that will act as the OSDBA group. Next, select the
group that will act as the OSOPER group. Click Next to continue.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s fe Checks window verifies the operating system requirements that
E Prerequisite
e o
The Perform
trathe installation to be successful. These requirements include:
t met -for
rbe
v
must n
no operating system check
E Certified
Kernel parameters as required by the Oracle Database software
Required operating system packages and correct revisions
After each successful check, the Status for that check will indicate Succeeded. Any tests that
fail are also reported here. If any tests fail, click the Fix & Check Again button. The Installer
will generate fix-up scripts to correct the system deficiencies if possible. Execute the scripts
as directed by the Installer. The tests will be run again after completing the script executions.
When all tests have succeeded, click the Next button to continue. In the Summary window,
review the Global settings and click Finish.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe the OUI will display another window, prompting you to run the
e o
At thetend of theainstallation,
r scripts tr on the nodes you chose for the installation. Follow the instructions to run the
v
root.sh n -
o finished, click the OK button to close the Execute Configuration Scripts window
Escripts.nWhen
and return to the Finish screen. Click Close to complete the installation and close the OUI.
s a
) ha
o m
y s c e
u n is uid
$ cd /u01/app/oracle/product/11.2.0/dbhome_1/bin b r n t G
$ ./dbca n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
To create nthe cluster
fe
E nsdatabase, change directory to $ORACLE_HOME/bin on the installing
r t o t r a
ve andoexecute
Enode - the database configuration assistant (DBCA) utility as follows:
n n $ cd /u01/app/oracle/product/11.2.0/dbhome_1/bin
$ ./dbca
The Welcome window appears first. You must select the type of database that you want to
install. Select the Oracle Real Application Clusters (RAC) database option, and then click
Next. The Operations window appears. For a first-time installation, you have only two choices:
the first option enables you to create a database and the other option enables you to manage
database creation templates. Select the Create a Database option, and then click Next to
continue.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Templates
n s fe window appears next. The DBCA tool provides several predefined
e o
The Database
rt types trato choose from, depending on your needs. The templates include:
v
database n -
no Purpose or Transaction Processing
E General
Custom Database
Data Warehouse
In the example in the slide, the General Purpose or Transaction Processing option is
chosen. Click Next to continue.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s fe window, you must choose between an administrator-managed
E Identification
e o
In thetDatabase
tra cluster database.
r policy-managed
v
and a n -
no
EAdministrator-managed RAC databases specify a list of cluster nodes where RAC instances
will run. Services may also be specified and associated with preferred and alternative nodes.
There is an explicit association between database services, instances, and cluster nodes.
Policy-based management, a new feature in this release, breaks the explicit association
between services, instances, and cluster nodes. Policy-based management introduces the
concept of server pools, which are logical divisions of a cluster that are dynamically allocated
based on relative importance. Database services are associated with server pools, and RAC
instances are automatically started to satisfy the service to server pool associations. You
specify in which server pool the database resource will run and the number of instances
needed (cardinality). Oracle Clusterware is responsible for placing the database resource on
a server. Server pools are logical divisions of a cluster into pools of servers that are allocated
to host databases or other applications. Server pools are managed using crsctl and
srvctl commands. Names must be unique within the resources defined for the cluster.
You must also choose the global database name and the nodes on which to create the cluster
database. The global database name can be up to 30 characters in length and must begin
with an alphabetical character. When you have finished, click Next to continue.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nOptionss fe window is displayed. For small cluster environments, you may
e o
The Management
tra your cluster with Enterprise Manager Database Control. To do this, select
rt to manage
v
choose n -
no Enterprise Manager check box. If you have Grid Control installed somewhere
Ethe Configure
on your network, you can select the Use Grid Control for Database Management option. If
you select Enterprise Manager with the Grid Control option and the DBCA discovers agents
running on the local node, you can select the preferred agent from a list. Grid Control can
simplify database management in large, enterprise deployments.
You can also configure Database Control to send email notifications when alerts occur. If you
want to configure this, you must supply a Simple Mail Transfer Protocol (SMTP) or outgoing
mail server and an email address. You can also enable daily backups here. You must supply
a backup start time as well as operating system user credentials for this option.
If you want to use Grid Control to manage your database, but have not yet installed and
configured a Grid Control server, do not click either of the management methods. When you
have made your choices, click the Next button to continue.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s fe window appears next. You must supply passwords for the user
E Credentials
e o
The Database
rt createdtraby the DBCA when configuring your database. You can use the same
v
accounts n -
nofor all of these privileged accounts by selecting the Use the Same Administrative
Epassword
Password for All Accounts option. Enter your password in the Password field, and then enter
it again in the Confirm Password field.
Alternatively, you may choose to set different passwords for the privileged users. To do this,
select the Use Different Administrative Passwords option, enter your password in the
Password field, and then enter it again in the Confirm Password field. Repeat this for each
user listed in the User Name column. Click the Next button to continue.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E File n s fe
r o
In thetDatabase
t r a Locations window, you must indicate where the database files are to be
ve You
Estored. - choose your storage type from the drop-down list. Detected (and supported)
oncan
sharedn storage types are available here. You can choose to use a standard template for file
locations, one common location, or Oracle-Managed Files (OMF). This cluster database uses
ASM and Oracle Managed Files. Therefore, select the Use Oracle-Managed Files option, and
enter the disk group name in the Database Area field. Alternatively, you can click the Browse
button to indicate the location where the database files are to be created. When you have
made your choices, click the Next button to continue.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s fe
E Configuration
r o
In thetRecovery
t r a window, you can select redo log archiving by selecting Enable
ve oIfnyou
EArchiving. - are using ASM or cluster file system storages, you can also select the fast
n area size in the Recovery Configuration window. The size of the area defaults to
recovery
2048 megabytes, but you can change this figure if it is not suitable for your requirements. If
you are using ASM and a single disk group, the fast recovery area defaults to the ASM Disk
Group. If more than one disk group has been created, you can specify it here. If you use a
cluster file system, the fast recovery area defaults to
$ORACLE_BASE/flash_recovery_area. You may also define your own variables for the
file locations if you plan to use the Database Storage window to define individual file
locations. Select the Enable Archiving check box to enable archiving immediately for the new
cluster database.
When you have completed your entries, click Next, and the Database Content window is
displayed.
Note: For Oracle Database 11g Release 2 (11.2), the flash recovery area has been renamed
fast recovery area. Oracle Enterprise Manager, however, still uses the older vocabulary on
its webpages.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Content
n s fe window, you can choose to install the Sample Schemas included
e o
In thetDatabase
tra distribution. On the Custom Scripts tabbed page, you can choose to run
rthe database
v
with n -
Eyour ownnoscripts as part of the database creation process. When you have finished, click the
Next button to continue to the next window.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n s fe
E nParameters
r o
In thetInitialization
t r a window, you can set important database parameters. The
ve onare
Eparameters - grouped under four tabs:
n
Memory
Sizing
Character Sets
Connection Mode
On the Memory tabbed page, you can set parameters that deal with memory allocation,
including shared pool, buffer cache, Java pool, large pool, and PGA size. Automatic Memory
Management is the preferred memory management method and can be selected here. On the
Sizing tabbed page, you can adjust the database block size. Note that the default is 8 KB. In
addition, you can set the number of processes that can connect simultaneously to the
database.
By clicking the Character Sets tab, you can change the database character set. You can also
select the default language and the date format. On the Connection Mode tabbed page, you
can choose the connection type that clients use to connect to the database. The default type
is Dedicated Server Mode. If you want to use Oracle Shared Server, click the Shared Server
Mode button. If you want to review the parameters that are not found on the four tabs, click
the All Initialization Parameters button. Click the Use Automatic Memory Management button
and click the Next button to continue.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Storage
n s fewindow provides full control over all aspects of database storage,
e o
The Database
tra data files, and log members. Size, location, and all aspects of extent
rt tablespaces,
v
including n -
no are under your control here.
Emanagement
When you have finished, click the Next button to continue to the next page.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EOptions s e
fwindow
r t o
The Creation
t r a n appears. You can choose to create the database, or save your
ve session
EDBCA - as a database creation script by selecting the corresponding check box. Select
nonDatabase check box, and then click the Finish button. The DBCA displays the
the Create
Summary screen, giving you a last chance to review all options, parameters, and so on that
have been chosen for your database creation.
Review the summary data. When you are ready to proceed, close the Summary window by
clicking the OK button.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Monitor s e
fwindow
r t o
The Progress
t r a n appears next. In addition to informing you about how fast the
ve ocreation
Edatabase - is taking place, it also informs you about the specific tasks being performed
n n in real time. When the database creation progress reaches 100 percent, the
by the DBCA
DBCA displays a dialog box announcing the completion of the creation process. It also directs
you to the installation log file location, parameter file location, and Enterprise Manager URL.
By clicking the Password Management button, you can manage the database accounts
created by the DBCA.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfetask that you should perform if you are using Enterprise Manager
Another
e o postinstallation
rt Controltra or Grid Control is to check whether all the managed nodes and their
v
Database n -
Emanagednoresources are properly registered and available. Open a browser and enter the
address for your Database Control console. Click the Targets tab to verify that all the targets
appear here.
Note: If Enterprise Manager Database Control has not been started on your node, you can
start it with the following commands, logged in as the oracle user, or the account that owns
the database software installation:
$ export ORACLE_UNQNAME=orcl
$ emctl start dbconsole
u n is uid
manageability tasks for Oracle RAC. Tasks accomplished by an RMSn process include
b r n t G
creation of resources related to Oracle RAC when new instances are added to the
clusters.
n t o@ tude
c i me this S
Remote Slave Monitor (RSMN): The RSMN process manages background slave
n as use
process creation and communication on remote instances. These background slave
processes perform tasks on behalf of a coordinating process running in another
instance. e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
takes place.
Archiving in Oracle RAC environments requires a thread
number in the archive file format.
The archived logs from all instances of an Oracle RAC
database are required for media recovery.
By default, all database files are migrated to Oracle s a
Managed Files (OMF). ) ha
c om
i s ys ide
r u n Gu
@ b ent
e nto Stud
s c im this
n a use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nyou s fechoose to use for the conversion, note the following administrative
e o
Whatever method
a converting single-instance databases to Oracle RAC:
rt n-trbefore
v
considerations
E no
Backup procedures should be available before converting from a single-instance Oracle
Database to Oracle RAC. For archiving with Oracle RAC environments, the archive file
format requires a thread number.
The archived logs from all instances of an Oracle RAC database are required for media
recovery. Because of this, if you archive to a file and you do not use a cluster file
system, or some other means to provide shared file systems, then you require a method
of accessing the archive logs from all nodes on which the cluster database has
instances.
By default, all database files are migrated to Oracle Managed Files (OMF). This feature
simplifies tablespace creation, ensures data file location consistency and compliance
with OFA rules, and reduces human error with data file management.
nonclustered hardware:
1. Back up the original single-instance database.
2. Complete the Oracle Grid Infrastructure installation.
3. Validate the cluster.
4. Copy the preconfigured database image.
5. Install the Oracle Database 11g software with RAC. s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n s fe
E ansingle-instance
r t o
To convert from
t r a Oracle database that is on a noncluster computer to a RAC
ve operform
Edatabase, n- the following steps:
n
1. Back up the original single-instance database.
2. Complete the Oracle Grid Infrastructure installation.
3. Validate the cluster.
4. Copy the preconfigured database image.
5. Install the Oracle Database 11g software with RAC.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Ethe Original
n s fe Single-Instance Database.
1. Back
e t
rtheo Up
trtoacreate a preconfigured image of your single-instance database by using the
v
Use n
DBCA -
Efollowingnoprocedure:
1. Navigate to the bin directory in $ORACLE_HOME, and start the DBCA.
2. In the Welcome window, click Next.
3. In the Operations window, select Manage Templates, and click Next.
4. In the Template Management window, select Create a database template and From
an existing database (structure as well as data), and click Next.
5. In the Source Database window, enter the database name in the Database instance
field, and click Next.
6. In the Template Properties window, enter a template name in the Name field. By default,
the template files are generated in $ORACLE_HOME/assistants/dbca/templates.
Enter a description of the file in the Description field, and change the template file
location in the Template data file field if you want. When you have finished, click Next.
7. In the Location of Database Related Files window, select Maintain the file locations, so
that you can restore the database to the current directory structure, and click Finish. The
DBCA generates two files: a database structure file (template_name.ctl) and a
database preconfigured image file (template_name.dfb).
3. In the DBCA Template Selection window, use the template that you copied to a
temporary location in the Copy the Preconfigured Database Image step. Use the
Browse option to select the template location.
4. After creating the RAC database, the DBCA displays the Password Management
window in which you must change the passwords for database privileged users. When
the DBCA exits, the conversion is complete.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
$ORACLE_HOME/assistants/rconfig/sampleXMLs
directory.
2. Modify the ConvertToRAC_AdminManaged.xml or
ConvertToRAC_PolicyManaged.xml file as required
for your system.
3. Save the file under a different name. a
a s
m )h
$ cd $ORACLE_HOME/assistants/rconfig/sampleXMLs
s co
$ vi ConvertToRAC_PolicyManaged.xml
u n isy uide
... Saved as my_rac_conversion.xml b r nt G
$ rconfig my_rac_conversion.xmlto@ tude
i m en is S
a s c e th
o n n o us
e r t e t
v
(e 2012, s
n and/or its affiliates. All rights reserved.
eOracle
n n
Copyright l i c
e r t o
a b le
n
v
Ethe s f er command-line utility to convert a single-instance database to RAC.
You can
Toe r
use
use
- t r an perform the following steps:
tothis feature,rconfig
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
Answer:
e o a
rt n-tra
v
no is true.
E statement
The
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
Answer:
e o a, c
rt n-tra
v
EChoices
noa and c are correct.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EDatabase
n s feHome page serves as a crossroad for managing and monitoring all
e o
The Cluster
traRAC database. From this page, you can access the other main cluster
rt of nyour
v
aspects -
notabs: Performance, Availability, Server, Schema, Data Movement, Software and
Edatabase
Support, and Topology.
On this page, you find General, High Availability, Space Summary, and Diagnostic Summary
sections for information that pertains to your cluster database as a whole. The number of
instances is displayed for the RAC database, in addition to the status. A RAC database is
considered to be up if at least one instance has the database open. You can access the
Cluster Home page by clicking the Cluster link in the General section of the page.
Other items of interest include the date of the last RMAN backup, archiving information, space
utilization, and an alert summary. By clicking the link next to the Flashback Database Logging
label, you can open the Recovery Settings page from where you can change various recovery
parameters.
The Alerts table shows all the recent alerts that are open. Click the alert message in the
Message column for more information about the alert. When an alert is triggered, the name of
the metric for which the alert was triggered is displayed in the Name column.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n s fe provides information about alerts for related targets, such as
EAlertsntable
e o
The Related
rt and ra and contains details about the message, the time the alert was triggered,
tHosts,
v
Listeners n -
noand the time the alert was last checked.
Ethe value,
The Policy Trend Overview page (accessed by clicking the Compliance Score link) provides a
comprehensive view about a group or targets containing other targets with regard to
compliance over a period of time. Using the tables and graphs, you can easily watch for
trends in progress and changes.
The Security At a Glance page shows an overview of the security health of the enterprise for
the targets or specific groups. This helps you to focus on security issues by showing statistics
about security policy violations and noting critical security patches that have not been applied.
The Job Activity table displays a report of the job executions that shows the scheduled,
running, suspended, and problem (stopped/failed) executions for all Enterprise Manager jobs
on the cluster database.
The Instances table lists the instances for the cluster database, their availability, alerts, policy
violations, performance findings, and related ASM Instance. Click an instance name to go to
the Home page for that instance. Click the links in the table to get more information about a
particular alert, advice, or metric.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EDatabase
n s feInstance Home page enables you to view the current state of the
e o
The Cluster
tra a series of metrics that portray its overall health. This page provides a
rt byndisplaying
v
instance -
o for the performance, administration, and maintenance of the instance
Elaunchnpoint
environment.
You can access the Cluster Database Instance Home page by clicking one of the instance
names from the Instances section of the Cluster Database Home page. This page has
basically the same sections as the Cluster Database Home page.
The difference is that tasks and monitored activities from these pages apply primarily to a
specific instance. For example, clicking the Shutdown button on this page shuts down only
this one instance. However, clicking the Shutdown button on the Cluster Database Home
page gives you the option of shutting down all or specific instances.
By scrolling down on this page, you see the Alerts, Related Alerts, Policy Violations, Jobs
Activity, and Related Links sections. These provide information similar to that provided in the
same sections on the Cluster Database Home page.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E youn s fe Cluster Home page, which can be accessed by clicking the Cluster
e o
The slide shows
rt nin-tthe the
ratop-right corner of Enterprise Manager. Even if the database is down, the
v
tab located
o is available to manage resources. The cluster is represented as a composite
EClusternpage
target composed of nodes and cluster databases. An overall summary of the cluster is
provided here. The Cluster Home page displays several sections, including General,
Configuration, Diagnostic Summary, Cluster Databases, Alerts, and Hosts. The General
section provides a quick view of the status of the cluster, providing basic information such as
current Status, Availability, Up nodes, Clusterware Version, and Oracle Home.
The Configuration section enables you to view the operating systems (including hosts and OS
patches) and hardware (including hardware configuration and hosts) for the cluster.
The Cluster Databases table displays the cluster databases (optionally associated with
corresponding services) associated with this cluster, their availability, and any alerts on those
databases. The Alerts table provides information about any alerts that have been issued
along with the severity rating of each.
The Hosts table (not shown in the screenshot) displays the hosts for the cluster, availability,
corresponding alerts, CPU and memory utilization percentage, and total input/output (I/O) per
second.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EHomenpage
s fe is invaluable for locating configuration-specific data. Locate the
e o
The Cluster
ra on the Cluster Home page. The View drop-down list enables you to
rt n-tsection
v
Configuration
o
Einspectnhardware and operating system overview information.
Click the Hosts link, and then click the Hardware Details link of the host that you want. On the
Hardware Details page, you find detailed information about your CPU, disk controllers,
network adapters, and so on. This information can be very useful when determining the Linux
patches for your platform.
Click History to access the hardware history information for the host.
Some hardware information is not available, depending on the hardware platform.
Note: The Local Disk Capacity (GB) field shows the disk space that is physically attached
(local) to the host. This value does not include disk space that may be available to the host
through networked file systems.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E System
n s feDetails General page displays the operating system details for a host,
e o
The Operating
rt n-tra
v
including:
no information, such as the distributor version and the maximum swap space of
E General
the operating system
Information about operating system properties
The Source column displays where Enterprise Manager obtained the value for each operating
system property.
To see a list of changes to the operating system properties, click History.
The Operating System Details File Systems page displays information about one or more file
systems for the selected hosts:
Name of the file system on the host
Type of mounted file systemfor example, ufs or nfs
Directory where the file system is mounted
Mount options for the file systemfor example, ro, nosuid, or nobrowse
The Operating System Details Packages page displays information about the operating
system packages that have been installed on a host.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EEnterprise
n s feManager Topology Viewer enables you to visually see the relationships
e o
The Oracle
rt target a for each host of your cluster database. You can zoom in or out, pan, and
trtypes
v
between n -
no details. These views can also be used to launch various administration
Esee selection
functions.
The Topology Viewer populates icons on the basis of your system configuration. If a listener is
serving an instance, a line connects the listener icon and the instance icon. Possible target
types are:
Interface
Listener
ASM Instance
Database Instance
If the Show Configuration Details option is not selected, the topology shows the monitoring
view of the environment, which includes general information such as alerts and overall status.
If you select the Show Configuration Details option, additional details are shown in the
Selection Details window, which are valid for any topology view. For example, the Listener
component would also show the machine name and port number.
You can click an icon and then right-click to display a menu of available actions.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EEnterprise
n s feManager to administer alerts for RAC environments. Enterprise
You can
e o use
tra between database- and instance-level alerts in RAC environments.
rt distinguishes
v
Manager n -
no Manager also responds to metrics from across the entire RAC database and
EEnterprise
publishes alerts when thresholds are exceeded. Enterprise Manager interprets both
predefined and customized metrics. You can also copy customized metrics from one cluster
database instance to another, or from one RAC database to another. A recent alert summary
can be found on the Database Control Home page. Notice that alerts are sorted by relative
time and target name.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n s fe
E forninstance-level
r t o
Alert thresholds
t r a alerts, such as archive log alerts, can be set at the instance
ve level.
Etarget - enables you to receive alerts for the specific instance if performance
nThis
exceeds noyour threshold. You can also configure alerts at the database level, such as setting
alerts for tablespaces. This enables you to avoid receiving duplicate alerts at each instance.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E ntosview fe the metric across the cluster in a comparative or overlay fashion. To
e o
It is also
rthis possible
tra click the Compare Targets link at the bottom of the corresponding metric
t information,
v
view n -
no the Compare Targets page appears, choose the instance targets that you want
Epage. When
to compare by selecting them and then clicking the Move button. If you want to compare the
metric data from all targets, click the Move All button. After making your selections, click the
OK button to continue.
The Metric summary page appears next. Depending on your needs, you can accept the
default timeline of 24 hours or select a more suitable value from the View Data drop-down list.
If you want to add a comment regarding the event for future reference, enter a comment in the
Comment for Most Recent Alert field, and then click the Add Comment button.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfeyou can see a summary of the alert history for each participating
e o
In a RAC environment,
rt directlytrafrom the Cluster Database Home page. The drilldown process is shown in
v
instance n -
noYou click the Alert History link in the Related Links section of the Cluster Database
Ethe slide.
Home page. This takes you to the Alert History page on which you can see the summary for
both instances in the example. Click the Alert History chart for the instance to go directly to
the Alert History page for that instance. From there, you can access a corresponding alert
page by choosing the alert of your choice.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EEnterprise
n s feManager to define blackouts for all managed targets of your RAC
You can
e o use
tra alerts from being recorded. Blackouts are useful when performing
rt tonprevent
v
database -
no or unscheduled maintenance or other tasks that might trigger extraneous or
Escheduled
unwanted events. You can define blackouts for an entire cluster database or for specific
cluster database instances.
To create a blackout event, click the Setup link at the top of any Enterprise Manager page.
Then click the Blackouts link on the left. The Blackouts page appears.
Click the Create button. The Create Blackout: Properties page appears. You must enter a
name or tag in the Name field. If you want, you can also enter a descriptive comment in the
Comments field. This is optional. Enter a reason for the blackout in the Reason field.
In the Targets area of the Properties page, you must choose a target Type from the drop-
down list. In the example in the slide, the entire cluster database RDBB is chosen. Click the
cluster database in the Available Targets list, and then click the Move button to move your
choice to the Selected Targets list. Click the Next button to continue.
The Member Targets page appears next. Expand the Selected Composite Targets tree and
ensure that all targets that must be included appear in the list. Continue and define your
schedule as you normally would.
Node1 Node2
RAC01 RAC02
Shared storage
Group 1 SPFILE
Group 4
s a
Group 2 RAC01.THREAD=1
RAC02.THREAD=2 Group 5
)ha
co m
Group 3
s
Thread 1 u n isy Thread
u ide2
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n s fe of a server pool in a policy-managed database and a new
E thencardinality
e o
If youtincrease
tra to the server pool, then Oracle Clusterware starts an instance on the new
r is allocated
v
server n -
o have Oracle Managed Files (OMF) enabled. If the instance starts and there is no
Eserver nif you
thread or redo log file available, then Oracle Clusterware automatically enables a thread of
redo and allocates the associated redo log files and undo if the database uses Oracle ASM or
any cluster file system.
You should create redo log groups only if you are using administrator-managed databases.
For administrator-managed databases, each instance has its own online redo log groups.
Create these redo log groups and establish group members. To add a redo log group to a
specific instance, specify the INSTANCE clause in the ALTER DATABASE ADD LOGFILE
statement. If you do not specify the instance when adding the redo log group, the redo log
group is added to the instance to which you are currently connected. Each instance must
have at least two groups of redo log files. You must allocate the redo log groups before
enabling a new instance with the ALTER DATABASE ENABLE INSTANCE instance_name
command. When the current group fills, an instance begins writing to the next log file group. If
your database is in ARCHIVELOG mode, each instance must save full online log groups as
archived redo log files that are tracked in the control file.
Note: You can use Enterprise Manager to administer redo log groups in a RAC environment.
offline
RAC01 RAC02
Consistent reads
Transaction recovery
Shared storage
s a
SPFILE
) ha
undotbs3 m
RAC01.UNDO_TABLESPACE=undotbs1 o
c e
y s
undotbs1
RAC02.UNDO_TABLESPACE=undotbs2
u n is uid
undotbs2
b r n t G
n t o@ tude
c i me this S
ALTER SYSTEM SET UNDO_TABLESPACE=undotbs3
n as use SID='RAC01';
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Edatabase s e
fautomatically
r t o
The Oracle
t r a n manages undo segments within a specific undo
ve onthat
Etablespace - is assigned to an instance. Under normal circumstances, only the instance
assigned n to the undo tablespace can modify the contents of that tablespace. However, all
instances can always read all undo blocks for consistent-read purposes. Also, any instance
can update any undo tablespace during transaction recovery, as long as that undo tablespace
is not currently used by another instance for undo generation or transaction recovery.
You assign undo tablespaces in your RAC database by specifying a different value for the
UNDO_TABLESPACE parameter for each instance in your SPFILE or individual PFILEs. If you do
not set the UNDO_TABLESPACE parameter, each instance uses the first available undo
tablespace. For policy-managed databases, Oracle automatically allocates the undo
tablespace when the instance starts if you have OMF enabled.
You can dynamically switch undo tablespace assignments by executing the ALTER SYSTEM
SET UNDO_TABLESPACE statement. You can run this command from any instance. In the
example in the slide, the previously used undo tablespace assigned to the RAC01 instance
remains assigned to it until RAC01s last active transaction commits. The pending offline
tablespace may be unavailable for other instances until all transactions against that
tablespace are committed. You cannot simultaneously use Automatic Undo Management
(AUM) and manual undo management in a RAC database. It is highly recommended that you
use the AUM mode.
simultaneously.
Shutting down one instance does not interfere with other
running instances.
SHUTDOWN TRANSACTIONAL LOCAL does not wait for
other instances transactions to finish.
RAC instances can be started and stopped by using: s a
) ha
Enterprise Manager m
The Server Control (srvctl) utility
o
c e
y s
SQL*Plus u n is uid
b r n t G
Shutting down a RAC database means n t o@ shutting t u de down all
instances accessing the database. c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfemultiple instances can have the same RAC database open at the
In a RAC
e o environment,
trashutting down one instance does not interfere with the operation of other
rttime.nAlso,
v
same
o -
Erunningninstances.
The procedures for starting up and shutting down RAC instances are identical to the
procedures used in single-instance Oracle, with the following exception:
The SHUTDOWN TRANSACTIONAL command with the LOCAL option is useful to shut down an
instance after all active transactions on the instance have either committed or rolled back.
Transactions on other instances do not block this operation. If you omit the LOCAL option, this
operation waits until transactions on all other instances that started before the shutdown are
issued either a COMMIT or a ROLLBACK.
You can start up and shut down instances by using Enterprise Manager, SQL*Plus, or Server
Control (srvctl). Both Enterprise Manager and srvctl provide options to start up and shut
down all the instances of a RAC database with a single step.
Shutting down a RAC database mounted or opened by multiple instances means that you
need to shut down every instance accessing that RAC database. However, having only one
instance opening the RAC database is enough to declare the RAC database open.
start/stop syntax:
srvctl start|stop instance -d <db_name> -i <inst_name_list>
[-o open|mount|nomount|normal|transactional|immediate|abort>]
Examples: s a
)ha
m
co
$ srvctl start instance -d orcl -i orcl1,orcl2
s
$ srvctl stop instance -d orcl -i orcl1,orcl2
u n isy uide
b r nt G
$ srvctl start database -d orcl -o openo@
n t t u de
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
The srvctln fe
Estartnsdatabase command starts a cluster database, its enabled instances, and
r t o t r a
ve oThe
Eservices. - srvctl stop database command stops a database, its instances, and its
n n
services.
The srvctl start instance command starts instances of a cluster database. This command
also starts all enabled and nonrunning services that have the listed instances either as
preferred or as available instances.
The srvctl stop instance command stops instances, and all enabled and running services
that have these instances as either preferred or available instances.
You must disable an object that you intend to keep stopped after you issue a srvctl stop
command; otherwise, Oracle Clusterware can restart it as a result of another planned
operation. srvctl does not support concurrent executions of commands on the same object.
Therefore, run only one srvctl command at a time for each database, service, or other
object. In order to use the START or STOP options of the SRVCTL command, your service must
be an Oracle Clusterwareenabled, nonrunning service.
Note: For more information, refer to the Oracle Clusterware and Oracle Real Application
Clusters Administration and Deployment Guide.
orcl1
sqlplus / as sysdba
SQL> startup
SQL> shutdown immediate
SCOPE=MEMORY
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E the n s fe
You can
r t o access
t r a Initialization Parameters page by clicking the Initialization Parameters link
vethe Cluster
Eon o n- Database Server page.
n
The Current tabbed page shows you the values currently used by the initialization parameters
of all the instances accessing the RAC database. You can filter the Initialization Parameters
page to show only those parameters that meet the criteria of the filter that you entered in the
Name field.
The Instance column shows the instances for which the parameter has the value listed in the
table. An asterisk (*) indicates that the parameter has the same value for all remaining
instances of the cluster database.
Choose a parameter from the Select column and perform one of the following steps:
Click Add to add the selected parameter to a different instance. Enter a new instance
name and value in the newly created row in the table.
Click Reset to reset the value of the selected parameter. Note that you can reset only
those parameters that do not have an asterisk in the Instance column. The value of the
selected column is reset to the value of the remaining instances.
Note: For both Add and Reset buttons, the ALTER SYSTEM command uses SCOPE=MEMORY.
SCOPE=BOTH
s a
)ha
m
co
SCOPE=SPFILE
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n
The SPFile
Etabbednpage
s fe displays the current values stored in your SPFILE.
e o tra tabbed page, you can add or reset parameters. However, if you select the
rtthe Current
v
As on n -
o in SPFILE mode check box, the ALTER SYSTEM command uses SCOPE=BOTH.
EApply nchanges
If this check box is not selected, SCOPE=SPFILE is used.
Click Apply to accept and generate your changes.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfeEnables a database to be started in cluster mode. Set this to TRUE.
e o
CLUSTER_DATABASE:
rt n-tra
v Sets the number of instances in your RAC environment.
nosetting for this parameter can improve memory use.
EA proper
CLUSTER_DATABASE_INSTANCES:
CLUSTER_INTERCONNECTS: Specifies the cluster interconnect when there is more than one
interconnect. Refer to your Oracle platformspecific documentation for the use of this
parameter, its syntax, and its behavior. You typically do not need to set the
CLUSTER_INTERCONNECTS parameter. For example, do not set this parameter for the
following common configurations:
If you have only one cluster interconnect
If the default cluster interconnect meets the bandwidth requirements of your RAC
database, which is typically the case
If NIC bonding is being used for the interconnect
When OIFCFGs global configuration can specify the right cluster interconnects. It only
needs to be specified as an override for OIFCFG.
DB_NAME: If you set a value for DB_NAME in instance-specific parameter files, the setting must
be identical for all instances.
DISPATCHERS: Set this parameter to enable a shared-server configuration, that is, a server
that is configured to allow many user processes to share very few server processes.
u n is uid
eight CPUs, the number of GCS server processes equals the number of CPUs divided
b r n t G
by 4, dropping any fractions. You can set this parameter to different values on different
instances.
n t o@ tude
me this S
INSTANCE_NAME: The instances SID. The SID identifies the instances shared memory
c i
on a host. Any alphanumeric characters can be used. The value for this parameter is
n as use
automatically set to the database unique name followed by an incrementing number
e r ton e to
during the creation of the database when using DBCA.
( e v ens
INSTANCE_NUMBER: An Oracle RAC parameter that specifies a unique number that
n n e lic
maps the instance to one free list group for each database object. This parameter must
o
e r t a b l
Ev nsfer
be set for every instance in the cluster. It is automatically defined during the creation of
r n
the database when using DBCA.
to -tra
e
REMOTE_LISTENER: This parameter resolves to a SCAN:port, resolving to a SCAN
Ev nonlistener. Oracle Database 11g release 2 (11.2) and later instances only register with
SCAN listeners as remote listeners. Upgraded databases register with SCAN listeners
as remote listeners, and also continue to register with all node listeners.
LOCAL_LISTENER: Specifies a network name that resolves to an address or address
list of Oracle Net local listeners (that is, listeners that are running on the same machine
as this instance). The address or address list is specified in the TNSNAMES.ORA file or
other address repository as configured for your system.
ACTIVE_INSTANCE_COUNT
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
ARCHIVE_LAG_TARGET
COMPATIBLE
CLUSTER_DATABASE/CLUSTER_DATABASE_INSTANCES
CONTROL_FILES
DB_BLOCK_SIZE
DB_DOMAIN
DB_FILES a
DB_NAME ha s
m )
DB_RECOVERY_FILE_DEST/DB_RECOVERY_FILE_DEST_SIZE o
c e
DB_UNIQUE_NAME y s
PARALLEL_EXECUTION_MESSAGE_SIZE run
is uid
b n t G
REMOTE_LOGIN_PASSWORD_FILE o@
n t t u de
RESULT_CACHE_MAX_SIZE
i m e is S
UNDO_MANAGEMENT as c e th n o us
r t o n t
v e s e
n and/or its affiliates. All rights reserved.
n (e 2012,
Copyright l i c eOracle
r t o n le
e a b
n fer
Ev nsparameters
Certain
r t oinitialization
t r a that are critical at database creation or that affect certain
ve ooperations
Edatabase - must have the same value for every instance in RAC. Specify these
n nvalues in the SPFILE, or within each init_dbname.ora file on each instance. In
parameter
the list provided in the slide, each parameter must have the same value on all instances.
Note: The setting for DML_LOCKS and RESULT_CACHE_MAX_SIZE must be identical on every
instance only if set to zero. Disabling the result cache on some instances may lead to
incorrect results.
INSTANCE_NUMBER
UNDO_TABLESPACE
CLUSTER_INTERCONNECTS
ASM_PREFERRED_READ_FAILURE_GROUPS
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n
The Oracle s fethe INSTANCE_NUMBER parameter to distinguish among instances at
Eservernuses
e o tra server uses the THREAD number to assign redo log groups to specific
rt Then-Oracle
startup.
v
no To simplify administration, use the same number for both the THREAD and
Einstances.
INSTANCE_NUMBER parameters.
If you specify UNDO_TABLESPACE with Automatic Undo Management enabled, set this
parameter to a unique undo tablespace name for each instance.
Using the ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter, you can specify a
list of preferred read failure group names. The disks in those failure groups become the
preferred read disks. Thus, every node can read from its local disks. The setting for this
parameter is instance-specific, and the values need not be the same on all instances.
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfaffect e
Most SQL
r t o statements
t r a the current instance. You can use SQL*Plus to start and stop
ve oinnthe
instances
EUNIX-based - RAC database. You do not need to run SQL*Plus commands as root on
n systems or as Administrator on Windows-based systems. You need only the
proper database account with the privileges that you normally use for single-instance Oracle
database administration. The following are some examples of how SQL*Plus commands
affect instances:
The ALTER SYSTEM SET CHECKPOINT LOCAL statement affects only the instance to
which you are currently connected, rather than the default instance or all instances.
ALTER SYSTEM CHECKPOINT LOCAL affects the current instance.
ALTER SYSTEM CHECKPOINT or ALTER SYSTEM CHECKPOINT GLOBAL affect all
instances in the cluster database.
ALTER SYSTEM SWITCH LOGFILE affects only the current instance.
To force a global log switch, use the ALTER SYSTEM ARCHIVE LOG CURRENT
statement.
The INSTANCE option of ALTER SYSTEM ARCHIVE LOG enables you to archive each
online redo log file for a specific instance.
2
Node2 e nto Stud Noden
Node1
s c im this
n aManualucopys e
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Eby RAC s e
finstances
Wallets
r t oused
t r a n for Transparent Database Encryption may be a local copy of
e onwallet
Eaallvcommon - shared by multiple nodes, or a shared copy residing on shared storage that
n nodes can access.
of the
A deployment with a single wallet on a shared disk requires no additional configuration to use
Transparent Data Encryption.
If you want to use local copies, you must copy the wallet and make it available to all of the
other nodes after initial configuration. For systems using Transparent Data Encryption with
encrypted wallets, you can use any standard file transport protocol. For systems using
Transparent Data Encryption with obfuscated wallets, file transport through a secured channel
is recommended. The wallet must reside in the directory specified by the setting for the
WALLET_LOCATION or ENCRYPTION_WALLET_LOCATION parameter in sqlnet.ora. The
local copies of the wallet need not be synchronized for the duration of Transparent Data
Encryption usage until the server key is rekeyed through the ALTER SYSTEM SET KEY SQL
statement. Each time you run the ALTER SYSTEM SET KEY statement at a database
instance, you must again copy the wallet residing on that node and make it available to all of
the other nodes. To avoid unnecessary administrative overhead, reserve rekeying for
exceptional cases where you are certain that the server master key is compromised and that
not rekeying it would cause a serious security problem.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
the following:
The RAC database to use ARCHIVELOG mode and the fast
recovery area
RMAN for the RAC environment
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Use information
Remaster for other caches
enqueue LMS
resources Remaster recovers
1 cache GRD
resources
2
s a
Build re- )ha
SMON covery set m
co
recovers Resource s
the 3 claim
u n isy uide
database 4 b n G
rRoll forward
t
Merge failed
redo threads
n t o@ trecovery u de set
c i me this S 5
n as usetime
Recovery
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
When an n E s
instancenfailsfeand the failure is detected by another instance, the second instance
e o
rt the tra recovery steps:
performs
v n -following
no the first phase of recovery, Global Enqueue Services remasters the enqueues.
E 1. During
2. The Global Cache Services (GCS) remasters its resources. The GCS processes
remaster only those resources that lose their masters. During this time, all GCS
resource requests and write requests are temporarily suspended. However, transactions
can continue to modify data blocks as long as these transactions have already acquired
the necessary resources.
3. After enqueues are reconfigured, one of the surviving instances can grab the Instance
Recovery enqueue. Therefore, at the same time as GCS resources are remastered,
SMON determines the set of blocks that need recovery. This set is called the recovery
set. Because, with Cache Fusion, an instance ships the contents of its blocks to the
requesting instance without writing the blocks to the disk, the on-disk version of the
blocks may not contain the changes that are made by either instance. This implies that
SMON needs to merge the content of all the online redo logs of each failed instance to
determine the recovery set. This is because one failed thread might contain a hole in the
redo that needs to be applied to a particular block. So, redo threads of failed instances
cannot be applied serially. Also, redo threads of surviving instances are not needed for
recovery because SMON could use past or current images of their corresponding buffer
caches.
in other caches in the cluster database, the most recent image is the starting point of
recovery for these particular blocks. If neither the past image buffers nor the current
buffer for a data block is in any of the surviving instances caches, then SMON performs
a log merge of the failed instances. SMON recovers and writes each block identified in
step 3, releasing the recovery resources immediately after block recovery so that more
blocks become available as recovery proceeds.
After all the blocks have been recovered and the recovery resources have been released, the
system is again fully available.
s a
In summary, the recovered database or the recovered portions of the database become )h a
o
available earlier, and before the completion of the entire recovery sequence.cThism makes the
system available sooner and it makes recovery more scalable.
n i sys uide
Note: The performance overhead of a log merge is proportionalrto
b uthe number
t G of failed
redo logs n
@ tude each instance.
instances and to the size of the amount of redo written in the for
t o
i m en is S
a s c e th
o n n o us
e r t e t
v
(e licen s
n n
e r t o
a b le
n Ev nsfer
e r to -tra
Ev non
Full A G H
Partial B F
s a
4 )ha
2 m
co
1 3 s
None C D E
u n isy uide
r nt G
Elapsed time @b de
n t o t u
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n
The graphic
Eillustrates
n s fethe degree of database availability during each step of Oracle instance
e o
rt n-tra
recovery:
v
no Application Clusters is running on multiple nodes.
E A. Real
B. Node failure is detected.
C. The enqueue part of the GRD is reconfigured; resource management is redistributed to
the surviving nodes. This operation occurs relatively quickly.
D. The cache part of the GRD is reconfigured and SMON reads the redo log of the failed
instance to identify the database blocks that it needs to recover.
E. SMON issues the GRD requests to obtain all the database blocks it needs for recovery.
After the requests are complete, all other blocks are accessible.
F. The Oracle server performs roll forward recovery. Redo logs of the failed threads are
applied to the database, and blocks are available right after their recovery is completed.
G. The Oracle server performs rollback recovery. Undo blocks are applied to the database
for all uncommitted transactions.
H. Instance recovery is complete and all data is accessible.
Note: The dashed line represents the blocks identified in step 2 of the previous slide. Also,
the dotted steps represent the ones identified in the previous slide.
Instance startup
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Instance + Instance
crashes crash recovery opens
FAST_START_MTTR_TARGET
Instance
starts
Rolling
Instance forward a
ends a s
Instance recovery
m )h
crashes first pass + lock claim
s co
FAST_START_MTTR_TARGET
u n isy uide
b r nt G
Instance
recovery n t o@ tude
me this S
V$INSTANCE_RECOVERY.ESTD_CLUSTER_AVAILABLE_TIME
starts c i
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe
E nsenvironment,
r t o
In a single-instance
t r a the instance startup combined with the crash recovery time
e on-by the setting of the FAST_START_MTTR_TARGET initialization parameter. You can
isvcontrolled
Eset n if you want incremental checkpointing to be more aggressive than the autotuned
its value
checkpointing. However, this is at the expense of a much higher I/O overhead.
In a RAC environment, including the startup time of the instance in this calculation is useless
because one of the surviving instances is doing the recovery.
In a RAC environment, it is possible to monitor the estimated target, in seconds, for the
duration from the start of instance recovery to the time when GCD is open for lock requests
for blocks not needed for recovery. This estimation is published in the V$INSTANCE_RECOVERY
view through the ESTD_CLUSTER_AVAILABLE_TIME column. Basically, you can monitor the
time your cluster is frozen during instance-recovery situations.
In a RAC environment, the FAST_START_MTTR_TARGET initialization parameter is used to
bound the entire instance-recovery time, assuming it is instance recovery for single-instance
death.
Note: If you really want to have short instance recovery times by setting
FAST_START_MTTR_TARGET, you can safely ignore the alert log messages advising you to
raise its value.
Set PARALLEL_MIN_SERVERS.
Use asynchronous input/output (I/O).
Increase the size of the default buffer cache.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s fe you can use to make sure that instance recovery in your RAC
E guidelines
e o
Here are some a
rt n-istrfaster:
v
environment
E Use noparallel instance recovery by setting RECOVERY_PARALLISM.
Set PARALLEL_MIN_SERVERS to CPU_COUNT-1. This will prespawn recovery slaves at
startup time.
If a system fails when there are uncommitted parallel DML or DDL transactions, you can
speed up transaction recovery during startup by setting the
FAST_START_PARALLEL_ROLLBACK parameter.
Using asynchronous I/O is one of the most crucial factors in recovery time. The first-
pass log read uses asynchronous I/O.
Instance recovery uses 50 percent of the default buffer cache for recovery buffers. If this
is not enough, some of the steps of instance recovery will be done in several passes.
You should be able to identify such situations by looking at your alert.log file. In that
case, you should increase the size of your default buffer cache.
Archived Archived
log files log files
Database s a
Mirrored backups )ha
disks m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E provides
n s feyou with methods to avoid or to reduce down time due to a failure of
e o
Although RAC
tranot all) of your instances, you must still protect the database itself, which is
rt moren-(but
v
one or
Esharednbyoall the instances. This means that you need to consider disk backup and recovery
strategies for your cluster database just as you would for a nonclustered database.
To minimize the potential loss of data due to disk failures, you may want to use disk mirroring
technology (available from your server or disk vendor). As in nonclustered databases, you can
have more than one mirror if your vendor allows it, to help reduce the potential for data loss
and to provide you with alternative backup strategies. For example, with your database in
ARCHIVELOG mode and with three copies of your disks, you can remove one mirror copy and
perform your backup from it while the two remaining mirror copies continue to protect ongoing
disk activity. To do this correctly, you must first put the tablespaces into backup mode and
then, if required by your cluster or disk vendor, temporarily halt disk operations by issuing the
ALTER SYSTEM SUSPEND command. After the statement completes, you can break the mirror
and then resume normal operations by executing the ALTER SYSTEM RESUME command and
taking the tablespaces out of backup mode.
application.
In these situations, use RMAN to restore backups of the
data files and then recover the database.
RMAN media recovery procedures for RAC do not differ
substantially from those for single-instance environments.
The node that performs the recovery must be able to s a
restore all of the required data files. ) h a
c e
That node must also be able to either read all required
om
y s
nis backups.
archived redo logs on disk or restore themufrom uid r nt G
b
When recovering a database with encrypted
n t o@ tudetablespaces,
the Oracle Wallet must be opened
c i me tafter h is Sdatabase mount
and before you open the n s se
adatabase.
o n o u
r t t
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
Mediato n E must
recovery n s fbee user-initiated through a client application, whereas instance recovery
e r n-traperformed by the database. In these situations, use RMAN to restore backups
isvautomatically
no files and then recover the database. The procedures for RMAN media recovery in
Eof the data
Oracle RAC environments do not differ substantially from the media recovery procedures for
single-instance environments.
The node that performs the recovery must be able to restore all of the required data files. That
node must also be able to either read all the required archived redo logs on disk or be able to
restore them from backups. Each instance generates its own archive logs that are copies of
its dedicated redo log group threads. It is recommended that Automatic Storage Management
(ASM) or a cluster file system be used to consolidate these files.
When recovering a database with encrypted tablespaces (for example, after a SHUTDOWN
ABORT or a catastrophic error that brings down the database instance), you must open the
Oracle Wallet after database mount and before you open the database, so the recovery
process can decrypt data blocks and redo.
of parallelism for:
Instance recovery
Crash recovery
Archived redo logs are applied using an optimal number of
parallel processes based on the availability of CPUs.
With RMANs RESTORE and RECOVER commands, the s a
following three stages of recovery can use parallelism: ) ha
Restoring data files c om
i s ys ide
Applying incremental backups
r u n Gu
Applying archived redo logs @ b ent
e nto Stud
To disable parallel instancecand
s im crash
e t his recovery, set the
RECOVERY_PARALLELISM
n na parameter
u s to 0.
rto se t o
v e n and/or its affiliates. All rights reserved.
n (e 2012,
Copyright l i c eOracle
r t o n le
e a b
n s f er
Ev automatically
Oracle
r t o
Database
t r a n selects the optimum degree of parallelism for instance and
ve recovery.
Ecrash on- Oracle Database applies archived redo logs using an optimal number of
parallelnprocesses based on the availability of CPUs. With RMANs RESTORE and RECOVER
commands, Oracle Database automatically uses parallelism for the following three stages of
recovery:
Restoring Data Files: When restoring data files, the number of channels you allocate in
the RMAN recover script effectively sets the parallelism that RMAN uses. For example,
if you allocate five channels, you can have up to five parallel streams restoring data files.
Applying Incremental Backups: Similarly, when you are applying incremental
backups, the number of channels you allocate determines the potential parallelism.
Applying Archived Redo Logs with RMAN: Oracle Database automatically selects
the optimum degree of parallelism based on available CPU resources.
To disable parallel instance and crash recovery on a system with multiple CPUs, set the
RECOVERY_PARALLELISM parameter to 0.
Use the NOPARALLEL clause of the RMAN RECOVER command or ALTER DATABASE
RECOVER statement to force the RAC database to use nonparallel media recovery.
s a
)ha
m
co
s
u n isy uide
Shared storage scheme: Local archive b NFS
rwith n t G
Archive logs from each scheme:
n t o@ u de can
Each tinstance
instance are written to the read
m e mounted i s Sarchive
c i h
t of all instances.
same file location.
n as destinations
u s e
r t o n t o
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n s fe operations involving archived log files, the Oracle server
E andnrecovery
During
e obackup
rt nthe a destinations and names from the control file. If you use RMAN, the
trfile
v
determines -
Earchivednolog file path names can also be stored in the optional recovery catalog. However, the
archived log file path names do not include the node name, so RMAN expects to find the files
it needs on the nodes where the channels are allocated.
If you use a supported shared storage scheme, your instances can all write to the same
archive log destination. Backup and recovery of the archive logs are easy because all logs
are located in the same directory.
If a shared storage location is not available, Oracle recommends that local archive log
destinations be created for each instance with NFS-read mount points to all other instances.
This is known as the local archive with network file system (NFS) scheme. During backup,
you can either back up the archive logs from each host or select one host to perform the
backup for all archive logs. During recovery, one instance may access the logs from any host
without having to first copy them to the local destination. The LOG_ARCHIVE_FORMAT
parameter supports the %t variable that embeds the unique thread number into the name of
the archive logs so that each node generates unique names.
Using either scheme, you may want to provide a second archive destination to avoid single
points of failure.
Fast
recovery
area s a
) ha
o m
y s c e
u
Certifiedn isNFS uid
Cluster file system b
rdirectory
n t G
n t o@ tude
c
ASM i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Erecovery
n s fearea in RAC, you must place it on an ASM disk group, a cluster file
To use
e oa fast
rt or non-tarashared directory that is configured through certified NFS for each RAC
v
system,
noThat is, the fast recovery area must be shared among all the instances of a RAC
Einstance.
database. In addition, set the DB_RECOVERY_FILE_DEST parameter to the same value on all
instances.
Oracle Enterprise Manager enables you to set up a fast recovery area. To use this feature:
1. From the Cluster Database Home page, click the Maintenance tab.
2. Under the Backup/Recovery options list, click Configure Recovery Settings.
3. Specify your requirements in the Flash Recovery Area section of the page.
Note: For Oracle Database 11g Release 2 (11.2), the flash recovery area has been renamed
fast recovery area. Oracle Enterprise Manager, however, still uses the older vocabulary on
its webpages.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E the n s fe Database backup and recoveryrelated tasks by clicking the
You can
e o access
rt ntab Cluster
trona the Cluster Database Home page. On the Availability tabbed page, you can
v
Availability -
Eperformnaorange of backup and recovery operations using RMAN, such as scheduling
backups, performing recovery when necessary, and configuring backup and recovery
settings. Also, there are links related to Oracle Secure Backup and Service management.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EEnterprise
n s feManager to configure important recovery settings for your cluster
You can
e o
rt Onuse
ra Database Home page, click the Availability tab, and then click the Recovery
tthe
v
database. n -
ESettingsnolink. From here, you can ensure that your database is in ARCHIVELOG mode and
configure flash recovery settings.
With a RAC database, if the Archive Log Destination setting is not the same for all instances,
the field appears blank, with a message indicating that instances have different settings for
this field. In this case, entering a location in this field sets the archive log location for all
instances of the database. You can assign instance-specific values for an archive log
destination by using the Initialization Parameters page.
Note: You can run the ALTER DATABASE SQL statement to change the archiving mode in
RAC as long as the database is mounted by the local instance but not open in any instances.
You do not need to modify parameter settings to run this statement. Set the initialization
parameters DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE to the same
values on all instances to configure a fast recovery area in a RAC environment.
s a
%S Log sequence number, left-zero-padded log_0000000251
)ha
m
co
s
%r Resetlogs identifier log_23452345
u n isy uide
b r nt G
%R Padded resetlogs identifier
n t o@ tudelog_0023452345
i m e is S
%t_%s_%r Using multiple variables s
a c e th log_1_251_23452345
o n n o us
e r t e t
v
(e 2012, s
n and/or its affiliates. All rights reserved.
eOracle
n n
Copyright l i c
e r t o
a b le
n Ev redo s f er
For any
r t oarchived
t r a n log configuration, uniquely identify the archived redo logs with the
ve on-
ELOG_ARCHIVE_FORMAT parameter. The format of this parameter is operating system specific
n include text strings, one or more variables, and a file name extension.
and it can
All of the thread parameters, in either uppercase or lowercase, are mandatory for RAC. This
enables the Oracle database to create unique names for archive logs across the incarnation.
This requirement is in effect when the COMPATIBLE parameter is set to 10.0 or greater. Use
the %R or %r parameter to include the resetlogs identifier to avoid overwriting the logs from a
previous incarnation. If you do not specify a log format, the default is operating system
specific and includes %t, %s, and %r.
As an example, if the instance associated with redo thread number 1 sets
LOG_ARCHIVE_FORMAT to log_%t_%s_%r.arc, then its archived redo log files are named
as:
log_1_1000_23435343.arc
log_1_1001_23452345.arc
log_1_1002_23452345.arc
...
Note: The LOG_ARCHIVE_FORMAT parameter will have no effect if Oracle Managed Files
(OMF) has been implemented for the Oracle RAC database.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsettings
s fe can be configured using Enterprise Manager. On the Database
e o
Persistent backup
rt Home ra click the Availability tab, and then click the Backup Settings link. You can
tpage,
v
Control n -
nodisk settings, such as the directory location of your disk backups and level of
Econfigure
parallelism. You can also choose the default backup type:
Backup set
Compressed backup set
Image copy
You can also specify important tape-related settings, such as the number of available tape
drives and vendor-specific media management parameters.
Note: RMAN has no control over the selection of the instances. If you require a guaranteed
connection to an instance, you should provide a connect string that can connect only to the
required instance.
Backup pieces
Archived redo logs during backup
Data file or control file copies
If local archiving is used, a node can read only those
archived logs that were generated on that node.
When restoring, a channel connected to a specific node s a
h a
m)
restores only those files that were backed up to the node.
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe
E nsautomatically
Recovery
r t o Manager
t r a discovers which nodes of a RAC configuration can access
vefiles thatn-you want to back up or restore. Recovery Manager autolocates the following
Ethe
files: no
Backup pieces during backup or restore
Archived redo logs during backup
Data file or control file copies during backup or restore
If you use a noncluster file system local archiving scheme, a node can read only those
archived redo logs that were generated by an instance on that node. RMAN never attempts to
back up archived redo logs on a channel that it cannot read.
During a restore operation, RMAN automatically performs the autolocation of backups. A
channel connected to a specific node attempts to restore only those files that were backed up
to the node. For example, assume that log sequence 1001 is backed up to the drive attached
to node 1, whereas log 1002 is backed up to the drive attached to node 2. If you then allocate
channels that connect to each node, the channel connected to node 1 can restore log 1001
(but not 1002), and the channel connected to node 2 can restore log 1002 (but not 1001).
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe scheme, each node in the cluster has read access to all the data
Estoragensbackup
e t o
In a shared
rarchived ra logs, and SPFILEs. This includes Automated Storage Management
tredo
v
files, n -
o file systems, and Network Attached Storage (NAS).
E(ASM),ncluster
When backing up to only one local drive in the cluster file system backup scheme, it is
assumed that only one node in the cluster has a local backup appliance such as a tape drive.
In this case, run the following one-time configuration commands:
CONFIGURE DEVICE TYPE sbt PARALLELISM 1;
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
Because any node performing the backup has read/write access to the archived redo logs
written by the other nodes, the backup script for any node is simple:
BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;
In this case, the tape drive receives all data files, archived redo logs, and SPFILEs.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe drives in the shared storage backup scheme, it is assumed that
E up ntosmultiple
e o
Whentbacking
tracluster has its own local tape drive. Perform the following one-time
rnodenin-the
v
each
no so that one channel is configured for each node in the cluster. For example,
Econfiguration
enter the following at the RMAN prompt:
CONFIGURE DEVICE TYPE sbt PARALLELISM 2;
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
CONFIGURE CHANNEL 1 DEVICE TYPE sbt CONNECT 'user1/passwd1@node1';
CONFIGURE CHANNEL 2 DEVICE TYPE sbt CONNECT 'user2/passwd2@node2';
Similarly, you can perform this configuration for a device type of DISK. The following backup
script, which you can run from any node in the cluster, distributes the data files, archived redo
logs, and SPFILE backups among the backup drives:
BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
Answer:
e o a
rt n-tra
v
no above is true.
E statement
The
following:
The RAC database to use ARCHIVELOG mode and the fast
recovery area
RMAN for the RAC environment
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
user system.
Single-instance Oracle provides concurrency control:
Latches or mutexes for memory structures
Enqueues for resource control
Buffer cache pins for cache management
In RAC, structures and resources may be accessed by or s a
modified by a session running on any database instance. ) ha
c om
ys ide
RAC, therefore, requires additional global concurrency
i s
run t Gu
controls to mediate access across instances.
b n
Global locks control library and row
n t o@ de
cacheuaccess.
t
Global enqueues control resource
c i is S
me thaccess.
Cache fusion controls n as ucache
buffer s e access.
n r to e to
e e
v ens
(
n e2012,
Copyright licOracle and/or its affiliates. All rights reserved.
o n
rt rab l
v e
Emutexes e
n n s fmay
Latches
r t o and
t r a only protect access to memory structures if they are accessed by
ve onin-the same instance.
Eprocesses
In RAC,nlatches and mutexes are still used, but for global concurrency control, some
additional global enqueues are used to provide protection across instances.
resource.
Resource metadata is held in the Global Resource
Directory (GRD).
Global enqueue resources are used for enqueues and locks.
Global cache resources are used for buffer cache control.
The GRD is distributed among all active instances of each s a
database or ASM environment. ) ha
Each currently managed GRD resource has: ysc e
om
n is id
A master metadata structure r
b ent u Gu
@
One or more shadow metadata structures
to ud t
e n S
The GRD uses memory from
s c m shared
ithe
e t his pool.
n na us
e r to e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsstructure fe contains information about the state of the related resource for
A master
e t o metadata
rinstance tinrawhich that resource resides. A shadow metadata structure only contains
v
each n -
no about the state of the related resource in the instance containing the shadow
Einformation
metadata.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Econtroln s fe situations where the same block has multiple images in the
e o
Concurrency handles
trabuffer caches.
rtor different
v
same n -
no in physical I/O is achieved by having a global view of buffer cache resources and
EReduction
potentially satisfying I/O requests from any instances cache, rather than reading from disk or
writing the same buffer multiple times to disk from different buffer caches
Parallel queries may result in caching parts of a table in each buffer cache and using cache
fusion to avoid repeatedly doing direct reads from disk. This is known as In Memory Parallel
Query. Parts of the table are cached in separate buffer caches, rather than having the blocks
cached multiple times in different caches due to cache fusion block transfer. The parallel
execution servers in the different instances serve results over the interconnect for the part of
the table in their respective instance caches.
Buffers
Buffer headers
Global Cache Master Resources
Global Cache Shadow Resources
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
Multiple n Eprocesses
n s femay be used by Oracle RAC depending on the workload size. There
e o
rt headers
LMS
tra for each buffer in each buffer cache. There may be multiple block images
v
are buffer n -
o database block in the same or different buffer caches.
Efor the nsame
The mastering instance for a specific database block will have master metadata in the GRD,
maintained by LMSn, describing all block images, specifying the instance and state of each
image. The shadow metadata in the GRD, is maintained by LMSn in the same instance,
describing the state of each image
i m e is S
a c
Multiple PI images maysexist for same
e th block in different buffer
caches.
o n n o us
e r t e t
v
(e 2012, s
n and/or its affiliates. All rights reserved.
eOracle
n n
Copyright l i c
e r t o
a b le
n Ev states s f eforr cache fusion in V$BH.STATUS are:
e r to -tran
Important buffer
v
EShared on may
nCurrent:
more instances
The buffer contains a block image that matches the one on disk. One or
have images for the same block in SCUR state. After an instance has one
in this state, cache fusion is used if another instance reads the same block for read purposes.
Exclusive Current: The buffer contains a block image that is about to be updated, or has
been updated. It may or may not have been written by the database writer. Only one instance
may have an XCUR image for a block
Consistent Read: The buffer contains a block image that is consistent with an earlier point in
time. This image may have been created in the same way as in single-instance databases,
but copying a block into an available buffer and using undo to roll back the changes in order
to create the older image. It may also get created by converting a block image from SCUR or
PI.
Past Image: The buffer contains a block image that was XCUR but then shipped to another
instance using cache fusion. A later image of this block now exists in another buffer cache.
Once DBWn writes the later image to disk from the other instance, the PI image becomes a CR
image.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Instance C
s a
) ha
o m
y s c e
u n is uid
b r n t G
Resource
t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E slides,
n s fea four-instance database is used to demonstrate various scenarios
e o
In thetfollowing
r cache trafusion processing for a single block.
v
involving n -
no instance for this block is D, and the block in the database is at SCN 1008 on
EThe mastering
disk but with no images in any buffer cache.
Note that the status listed in the boxes representing the instances in the status column from
V$BH and not the GRD metadata, which has its own statuses.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Request to Instance C
obtain a shared
resource on C s a
) ha
1 o m
y s c e
u n is uid
b r n t G
Resource
t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Scenario
n s fe
e o
Read from Disk
rt n-tra
v
E noC wishes to read a block in shared mode. The foreground process passes the
Instance
request to a local LMS process, which passes it over the interconnect to an LMS process in the
mastering instance for this block.
At the moment, there is no buffer in the buffer cache on instance C, nor in any other instance,
containing a block image for the block.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Instance C
SCUR
s a
) ha
1 o m
y s c e
is id
The request is granted,run t Gu
Resource and the requesting @ b en
master
2
instance is e nt o
informed. S tud1008
s c im this
Instance D n a use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
The LMS n E insthe
process n
femastering instance updates master metadata in instance D and
e o trato LMS on the requesting instance C, which creates a shadow metadata
rt a grant
issues
v n -
Eresourcenoand notifies the foreground.
The buffer header status column shows SCUR for shared current.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Instance C
SCUR s a
) ha
1 o m
y s c e
u n is uid
b r n t G
Resource 2 Read nto
@ tude
master
m
request
i e is S 1008
a s c e th 3
Instance D
o n n o us
e r t e t
v
(e 2012, s
n and/or its affiliates. All rights reserved.
eOracle
n n
Copyright l i c
e r t o
a b le
n Ev process s f er
r t o
The foreground
t r a n on instance C then obtains an available buffer, and issues the I/O
ve on-
Erequest.n
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Instance C
SCUR Block image a
4 delivered a s
1008 m )h
1
s co
u n isy uide
b r nt G
Resource 2 t o@ tud1008 e
n
me thi3s S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
The statusn E block
of this n s feimage after I/O completes will be SCUR even though, currently,
e o traonly instance with an image of this block.
rt Cnis-the
v
instance
o
EIf otherninstances wish to read the same block for read access, then the block image may be
sent to them via cache fusion, and two or more instances may then have images of the same
block in their buffer caches. If this occurs, then they will all be SCUR.
Note that the SCN for the block image in instance C matches the SCN of the block on disk.
exclusive resource on
instance B
Instance C
SCUR s a
)ha
1008 m
s co
u n isy uide
b r nt G
Resource
t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe Scenario
ECachensFusion
e o
Read-Write
rt n-tra
v
Now
no B wishes to read the same block. The server process passes the request to a
E instance
local LMS process, which passes it over the interconnect to an LMS process in the mastering
instance for this block.
At the moment, there is no buffer in the buffer cache on instance B containing a block image
for the block, and there is no shadow metadata for this block in the GRD in instance B.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Instance C
SCUR s a
)ha
1008 m
s co
u n isy uide
b r nt G
Resource Instruction to transfer @ e
master
2
the block to Befor nto Stud1008
exclusive c m this
iaccess
n s
a use
Instance D
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n
The mastering
E instance
n s fehas master metadata, which indicates that instance C has an SCUR
e o tra that may be sent to the requesting instance B.
rt of then-block
v
image
ESo LMSnono instance D sends a request to LMS on instance C, to send an image of the block to
instance B over the interconnect.
Note that the instance chosen to serve the block image is determined internally if two or more
instances have SCUR images for the same block.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
1008
1
Instance C sends block
Instance C image to instance B
SCUR>CR
s a
3
)ha
1008 m
s co
u n isy uide
b r nt G
Resource 2 t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s fean image of the block to instance B over the interconnect. The shadow
e o
Instance C now
rt innthe sends
traGRD in instance C is changed to CR, to reflect that the block image is no
metadata
v o -
Elonger nshared.
Note that if two or more instances have SCUR images for the same block, then they will all be
messaged to downgrade them to CR by LMS on the mastering instance D.
Both images have show an SCN of 1008, but this will change when the block image is updated
in instance B.
Resource assumption
Instance A 4 Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Instance C
CR
s a
3
)ha
1008 m
s co
u n isy uide
b r nt G
Resource 2 t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Bnnow
LMS onoinstance s fesends a status message to mastering instance D, over the
e rt n-The
interconnect.
v tra shadow metadata in the GRD in instance B reflects that the block image is
o
Eowned nexclusive.
The mastering instance can update the master metadata because there will be two images of
the block in different instances in different states.
The image in instance B will be exclusive from the point of view of the GRD and that in
instance C will be null, because CR images do not represent blocks that reside on disk
currently or that will get written to disk. They are only used for read-consistency purposes.
LMS on instance B now posts the foreground process, and the block is updated. The SCN is
now 1009 in instance B but is still 1008 in instance C.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
XCUR
1009
1
Instance C
Request to obtain CR a
resource in a s
exclusive mode 1008 m )h
s co
u n isy uide
b r nt G
Resource
t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe Scenario
ECachensFusion
e o
Write-Write
rt n-tra
v
E a nforeground
Now o process on instance A requests the local LMS on instance A to access the
block for write.
LMS on instance A sends a request to LMS on mastering instance D for access to the block in
exclusive mode.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
XCUR
1009
1
Instance C
CR
s a
)ha
1008 m
s co
u n isy uide
b r nt G
Resource 2 Instruction to transfer t o@ tud1008 e
master exclusive resource n
e to is S
instancesA c i m th
Instance D a
n o us e
r t o n t
v e s e
n and/or its affiliates. All rights reserved.
n (e 2012,
Copyright l i c eOracle
r t o n le
e a b
n
LMS onomastering s fer D examines the mastering metadata in the GRD, which indicates
Ev ninstance
e rt n-Btrhasa exclusive ownership of the resource for this block.
v
that instance
o
ELMS onnmastering instance D then sends a request to LMS on instance B, requesting that the
XCUR image of the block be sent to LMS on instance A, but to keep the past image (PI) of the
block.
Instance B must flush redo buffers, if not already written, that contain the change vectors
describing the changes made to this block, before sending the block image over the
interconnect. This is not reflected in the slide, which only shows the cache fusion. Sending the
image to another instance is treated, for recovery purposes, in the same way as writing the
block to disk, and the log buffer must be written to permit recovery to work.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Exclusive-keep XCUR>PI
3 copy of buffer
1009 1009
1
Instance C
CR
s a
)ha
1008 m
s co
u n isy uide
b r nt G
Resource 2 t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Bnthen
LMS onoinstance s fesends the block image to LMS on instance A, but retains the PI image
e
invits
t buffer
rown n - tracache. The past image of the block is held until one of the following occurs:
o version of the of the block is written by DBWn from an instance, at which time the
EA later nXCUR
PI image becomes a CR image.
LMS instructs DBWn on instance B to write the PI image, due to instance recovery. After
recovery is finished, the PI image becomes a CR image.
Note that at the moment, the SCN for the block images in instance A and B are both 1009, but
this will change when the transaction in instance A updates the block image
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
XCUR PI
3
1013 1009
1 4
Instance C
Resource
assumption
CR
s a
and status )ha
1008 m
message
s co
u n isy uide
b r nt G
Resource 2 t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Annow
LMS onoinstance s fesends a status message to the mastering instance D over the
v e rt n-tra
interconnect.
EThe LMSnoon instance A updates the shadow metadata and posts the foreground process. The
status is set to XCUR in the buffer header in instance A.
The foreground updates the block and the SCN changes to 1013.
Note that this process may be repeated in a daisy-chain fashion, resulting in an XCUR image
in one instance and two or more PI images for the same block in other instances at different
points in time.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
XCUR PI
1013 1009
Instance C
Request to obtain
resource in s a
shared mode 1
) ha
o m
y s c e
u n is uid
b r n t G
Resource
t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe Scenario
ECachensFusion
e o
Write-Read
rt n-tra
v
E a nforeground
Now o process on instance C requests local LMS on instance C to access the
block for read. LMS on instance C sends a request to LMS on mastering instance D for access
to the block in shared mode.
Note that the PI image in instance B may or may not have aged out at this point. This
depends on whether DBWn in instance A has written the XCUR image to disk. If the XCUR
image for the block in instance A, or a later XCUR image in any instance for the same block is
written by DBWn, then the PI block image becomes a CR block image, and it might age out of
the cache due to pressure on the replacement list for available buffers. This transition is
controlled by the LMSn processes in the affected instances communicating with the LMSn
process on the resource mastering instance.
Note: To simplify the slide, the CR image in instance C has aged out of the buffer cache and,
therefore, is not present.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
XCUR PI
1013 1009
2
Instance C
Instruction
to transfer s a
shared 1
)ha
resource m
co
s
to C
u n isy uide
b r nt G
Resource
t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E ninstance
LMS onomastering s fe D examines the mastering metadata in the GRD, which indicates
e
that rt n-Atrhas
instance
a exclusive ownership of the resource for this block.
v o
ELMS onnmastering instance D then sends a request to LMS on instance A, requesting that an
image of the block satisfying the SCN of the query on instance C be sent to instance C.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
XCUR Shared-keep PI
3
copy of buffer
1013 1009
2
Instance C
s a
1
)ha
1013 m
s co
u n isy uide
b r nt G
Resource
t o@ tud1008 e
n
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
Normally,n E instance
LMS on n s fe A builds a CR image by using undo and sends it to instance C. The
e o tra XCUR in the buffer cache on instance A, even if the XCUR image satisfies
rtthennremains
buffer
v -
no
Ethe read-consistency requirements. This saves downgrading to SCUR and having to obtain the
image in XCUR again if another update occurs in instance A.
But if the block also has PI images, caused by multiple updates on the same block from
different instances, it may require multiple rollbacks of undo to create a consistent read image
that satisfies the request. If so, then another instance might be requested to build the CR
image by the mastering instance.
Please note that in this slide, the SCN for the block images in instance A and C are both 1013,
because in this example the XCUR image did not require rolling back to an earlier version of
the block.
Note also that the old CR image of this block could still be in the buffer cache of instance C, if
it had not aged out yet due to pressure on the replacement list.
Instance A Instance B
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
XCUR or SCUR PI
3
1013 1009
2
Instance C
CR or SCUR
s a
1
) ha
1013 m
o
c e
y s
Resource u n is uid
b r n t G
Resource assumption e
4 information n t o@ tud1008
me this S
master
c i
Instance D n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Cnnow
LMS onoinstance s fesends a status message to mastering instance D over the
v e
interconnect, tra updates the mastering metadata.
rt n-which
o
ELMS onninstance C updates the shadowing metadata and posts the foreground process.
If no downgrade occurs, then the status is set to CR in the buffer header in instance C and
remains XCUR in instance A.
Note that CR images may age out of buffer caches, and if the block remains XCUR in instance
A, repeated cache fusion requests may occur, resulting in repeated construction and shipping
of CR images to other instances for the same block. When enough such requests occur, LMS
on the mastering instance D would request that instance A downgrade the block ownership to
SCUR and ship the image to the other instance(s). The block would also be SCUR in the other
instances.
The instance doing the I/O must acquire resources for each
block in the correct state
This is done by LMSn coordination from the requesting
instance to the LMSn on the mastering instance(s)
Different blocks in the same multi-block read may have
different mastering instances
s a
) ha
Dynamic remastering, described earlier, may help reduce the
performance overhead om c e
s
isy
There are several scenarios for multi-block reads:
u n u id
No resource masters exist for any block.
br ent G
@ tudSCUR.
Resource masters for some block(s)
e nto allSare
Resource masters for some s c im block(s)
e t hissome are XCUR.
n na us
e r to e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Emasters
n s ffore any block in a particular multi-block read request: In this case, a
e o
No resource
rt is madetrato the specific mastering instance for each block in the multi-block read and
v
request n -
no granted permission by LMSn, the server process does the multi-block read from
Eafter being
disk.
Resource masters exist for at least one block in a particular multi-block read request, but it or
they are Shared Current (SCUR): This means that the block has not been modified. In this
case, a request is made to the specific mastering instance for each block in the multi-block
read and, after being granted, the processing reads from disk.
Resource Masters exist for at least one block in a particular multi-block read request, but at
least one is Exclusive Current (XCUR) and, therefore, a newer version may exist in a buffer
cache than on disk. In this case, a request is made to the specific mastering instance for each
block in the multi-block read and, after being granted, the XCUR images are transferred by
cache fusion, as described earlier, and the remaining images are read from disk in smaller
multi-block reads.
GV$SESSION_WAIT
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
GV$SYSSTAT
GV$GES_STATISTICS
V$RESOURCE_LIMIT
V$BH
V$CR_BLOCK_SERVER
V$CURRENT_BLOCK_SERVER s a
) ha
V$INSTANCE_CACHE_TRANSFER o m
y s c e
V$DYNAMIC_REMASTER_STATS
u n is uid
V$GCSPFMASTER_INFO b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
true?
a. Resource metadata is held in the Global Resource
Directory (GRD).
b. An object under global concurrency control is called an
asset.
c. Global enqueue resources are used for enqueues and s a
locks. ) ha
o m
d. Global cache resources are used for buffer cache y s ccontrol.
e
i s
n Gofu each i d
r
b ent u
e. The GRD is distributed among all active instances
database or ASM environment. to @ tud
i m en is S
a s c e th
o n n o us
e r t e t
v
(e 2012, s
n and/or its affiliates. All rights reserved.
eOracle
n n
Copyright l i c
e r t o
a b le
n E v
s f er
Answer:
e r tob -tran
v
nonb is incorrect.
EStatement
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
CPU
time
Possibly Scalable
needs SQL application
tuning
s a
)ha
Scalable Needs No gain achieved
m
application instance/RAC s co
by adding
tuning
u n
y
isCPUs/nodes
u ide
b r nt G
n t o@ Wait t u de
c i me this Stime
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n s fe it is important that you compare the CPU time with the wait time of
Eyournsystem,
e o
Whenttuning
rsystem. tra
v
your n -Comparing CPU time with wait time helps to determine how much of the
Eresponsenotime is spent on useful work and how much on waiting for resources potentially held
by other processes.
As a general rule, the systems where CPU time is dominant usually need less tuning than the
ones where wait time is dominant. Alternatively, heavy CPU usage can be caused by badly
written SQL statements.
Although the proportion of CPU time to wait time always tends to decrease as load on the
system increases, steep increases in wait time are a sign of contention and must be
addressed for good scalability.
Adding more CPUs to a node, or nodes to a cluster, would provide very limited benefit under
contention. Conversely, a system where the proportion of CPU time to wait time does not
decrease significantly as load increases can scale better, and would most likely benefit from
adding CPUs or Real Application Clusters (RAC) instances if needed.
Note: Automatic Workload Repository (AWR) reports display CPU time together with wait
time in the Top 5 Timed Events section, if the CPU time portion is among the top five events.
represented by:
Global Cache Services statistics
Global Cache Services wait events
The response time for cache fusion transfers is determined
by:
Overhead of the physical interconnect components
s a
IPC protocol ) ha
o m
GCS protocol sc
The response time is not generally affected u nby diskuI/Oisy ide
r
b en t G
factors. t o @ ud t
e n S
s c im this
n a use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Eaccessing
n s feblocks in the global cache and maintaining cache coherency is
e o
The effect of
rt n-by: tra
v
represented
E The noGlobal Cache Services statistics for current and cr blocksfor example, gc current
blocks received, gc cr blocks received, and so on
The Global Cache Services wait events for gc current block 3-way, gc cr grant 2-way,
and so on
The response time for cache fusion transfers is determined by the messaging time and
processing time imposed by the physical interconnect components, the IPC protocol, and the
GCS protocol. It is not affected by disk input/output (I/O) factors other than occasional log
writes. The cache fusion protocol does not require I/O to data files in order to guarantee
cache coherency, and RAC inherently does not cause any more I/O to disk than a
nonclustered instance.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E report,
n s fethere is a table in the RAC Statistics section containing average times
In a RAC
e o AWR
ra Global Cache Services and Global Enqueue Services operations. This
rt nfor-tsome
v
(latencies)
o in the slide and is called Global Cache and Enqueue Services: Workload
Etable isnshown
Characteristics. Those latencies should be monitored over time, and significant increases in
their values should be investigated. The table presents some typical values, based on
empirical observations. Factors that may cause variations to those latencies include:
Utilization of the IPC protocol. User-mode IPC protocols are faster, but only Tru64s
RDG is recommended for use.
Scheduling delays, when the system is under high CPU utilization
Log flushes for current blocks served
Other RAC latencies in AWR reports are mostly derived from V$GES_STATISTICS and may
be useful for debugging purposes, but do not require frequent monitoring.
Note: The time to process consistent read (CR) block request in the cache corresponds to
(build time + flush time + send time), and the time to process current block
request in the cache corresponds to (pin time + flush time + send time).
i m e is S
Identify SQL statements impacted
a s c e th V$SQLSTATS
by interconnect latencies
o n n o us
e r t e t
v
(e 2012, s
n and/or its affiliates. All rights reserved.
eOracle
n n
Copyright l i c
e r t o
a b le
n Evsome s f erto acquire resources because of the total path length and latency for
When itotakes
e r t processes
requests, - t r an sleep to avoid spinning for indeterminate periods of time. When the
time
v
Eprocess on to wait, it wakes up either after a specified timer value expires (timeout) or
n decides
when the event it is waiting for occurs and the process is posted. The wait events are
recorded and aggregated in the views shown in the slide. The first three are aggregations of
wait times, timeouts, and the number of times waited for a particular event, whereas the rest
enable the monitoring of waiting sessions in real time, including a history of recent events
waited for.
The individual events distinguish themselves by their names and the parameters that they
assume. For most of the global cache wait events, the parameters include file number, block
number, the block class, and access mode dispositions, such as mode held and requested.
The wait times for events presented and aggregated in these views are very useful when
debugging response time performance issues. Note that the time waited is cumulative, and
that the event with the highest score is not necessarily a problem. However, if the available
CPU power cannot be maximized, or response times for an application are too high, the top
wait events provide valuable performance diagnostics.
Note: Use the CLUSTER_WAIT_TIME column in V$SQLSTATS to identify SQL statements
impacted by interconnect latencies, or run an ADDM report on the corresponding AWR
snapshot.
(placeholder)
n athan buffer
Block arrival
u s etime
r t o nless
t o pin time
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
The mainn E nsfewait events are described briefly in the slide:
global cache
o
rt n-tra
ve gc current/cr These wait events are relevant only while a gc request for
E ancroblock or currentrequest:buffer is in progress. They act as placeholders until the request
completes.
gc [current/cr] block [2/3]-way: A current or cr block is requested and
received after two or three network hops. The request is processed immediately; the
block is not busy or congested.
gc [current/cr] block busy: A current or cr block is requested and received, but
is not sent immediately by LMS because some special condition that delayed the
sending was found.
gc [current/cr] grant 2-way: A current or cr block is requested and a grant
message received. The grant is given without any significant delays. If the block is not in
its local cache, a current or cr grant is followed by a disk read on the requesting
instance.
gc current grant busy: A current block is requested and a grant message
received. The busy hint implies that the request is blocked because others are ahead of
it or it cannot be handled immediately.
Note: For dynamic remastering, two events are of most importance: gc remaster and gc
quiesce. They can be symptoms of the impact of remastering on the running processes.
buffer is pinned in memory, the buffer containing a block is said to become busy and as
a result interested users may have to wait for it to be unpinned.
Note: For more information, refer to Oracle Database Reference.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
TX TM
s a
) ha
US HW o m
y s c e
u n is uid
r t G
TA SQ @b n
n t o t u de
i m e is S
The waits may constituteaserious s c e th
serialization points.
n n u s
r t o t o
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n
An enqueue
Ewait isnsnotfeRAC specific, but involves a global lock operation when RAC is
e o
rt Most trofathe global requests for enqueues are synchronous, and foreground
enabled.
v n -
no wait for them. Therefore, contention on enqueues in RAC is more visible than in
Eprocesses
single-instance environments. Most waits for enqueues occur for enqueues of the following
types:
TX: Transaction enqueue; used for transaction demarcation and tracking
TM: Table or partition enqueue; used to protect table definitions during DML operations
HW: High-water mark enqueue; acquired to synchronize a new block operation
SQ: Sequence enqueue; used to serialize incrementing of an Oracle sequence number
US: Undo segment enqueue; mainly used by the Automatic Undo Management (AUM)
feature
TA: Enqueue used mainly for transaction recovery as part of instance recovery
In all of the preceding cases, the waits are synchronous and may constitute serious
serialization points that can be exacerbated in a RAC environment.
Note: The enqueue wait events specify the resource name and a reason for the waitfor
example, TX Enqueue index block split. This makes diagnostics of enqueue waits easier.
numbers is not recommended because it may cause severe contention even for a
single-instance system.
Indexes that are not selective do not improve query performance, but can degrade DML
performance. In RAC, unselective index blocks may be subject to inter-instance
contention, increasing the frequency of cache transfers for indexes belonging to insert-
intensive tables.
Always verify that you use a private network for your interconnect, and that your private
network is configured properly. Ensure that a network link is operating in full duplex
s
mode. Ensure that your network interface and Ethernet switches support MTU size of 9
a
) ha
KB. Note that a single-gigabit Ethernet interface can scale up to ten thousand 8 KB
o m
blocks per second before saturation.
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Wait events
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Index
enq: TX - index
contention
block
Split in
gc buffer busy
progress
gc current block busy
gc current split
s a
System statistics )ha
m
co
Leaf node splits
s
Branch node splits
u n isy uide
Exchange deadlocks b r nt G
n t o@ tude
me this S
gcs refuse xid
gcs ast xid c i
n as use RAC01 RAC02
ton e to
Service ITL waits
e r
v ens
( e
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E systems
In application n s fewhere the loading or batch processing of data is a dominant business
e o
rt there a be performance issues affecting response times because of the high
trmay
function,
v n -
Evolumenofodata inserted into indexes. Depending on the access frequency and the number of
processes concurrently inserting data, indexes can become hot spots and contention can be
exacerbated by:
Ordered, monotonically increasing key values in the index (right-growing trees)
Frequent leaf block splits
Low tree depth: All leaf block access goes through the root block.
A leaf or branch block split can become an important serialization point if the particular leaf
block or branch of the tree is concurrently accessed. The tables in the slide sum up the most
common symptoms associated with the splitting of index blocks, listing wait events and
statistics that are commonly elevated when index block splits are prevalent. As a general
recommendation, to alleviate the performance impact of globally hot index blocks and leaf
block splits, a more uniform, less skewed distribution of the concurrency in the index tree
should be the primary objective. This can be achieved by:
Global index hash partitioning
Increasing the sequence cache, if the key value is derived from a sequence
Using natural keys as opposed to surrogate keys
Using reverse key indexes
150000 50001100000
s a
)ha
m
co
s
CACHE 50000 NOORDER
u n isy uide
b r nt G
RAC01 t o@ tudRAC02 e
n
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Ekey values
n s fe generated by sequences tend to be subject to leaf block contention
Indexes
e o with
rtthe inserttrarate is high. That is because the index leaf block holding the highest key
v
when
o n -
Evalue isnchanged for every row inserted, as the values are monotonically ascending. In RAC,
this may lead to a high rate of current and CR blocks transferred between nodes.
One of the simplest techniques that can be used to limit this overhead is to increase the
sequence cache, if you are using Oracle sequences. Because the difference between
sequence values generated by different instances increases, successive index block splits
tend to create instance affinity to index leaf blocks. For example, suppose that an index key
value is generated by a CACHE NOORDER sequence and each index leaf block can hold 500
rows. If the sequence cache is set to 50000, while instance 1 inserts values 1, 2, 3, and so on,
instance 2 concurrently inserts 50001, 50002, and so on. After some block splits, each
instance writes to a different part of the index tree.
So, what is the ideal value for a sequence cache to avoid inter-instance leaf index block
contention, yet minimizing possible gaps? One of the main variables to consider is the insert
rate: The higher it is, the higher must be the sequence cache. However, creating a simulation
to evaluate the gains for a specific configuration is recommended.
Note: By default, the cache value is 20. Typically, 20 is too small for the preceding example.
Index Changes
Reads
s a
SGA1 SGA2
)ha
m
co
Undo Undo s
u n isy uide
b r nt G
n t o@ tude
i me this S
Additional
c
n as usetraffic
interconnect
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
Excessiven E nsfeshipment and contention for undo buffers usually happens when index
undo block
e o tra active transactions from multiple instances are read frequently.
rt containing
blocks
v o n
EWhen anSELECT-
statement needs to read a block with active transactions, it has to undo the
changes to create a CR version. If the active transactions in the block belong to more than
one instance, there is a need to combine local and remote undo information for the consistent
read. Depending on the amount of index blocks changed by multiple instances and the
duration of the transactions, undo block shipment may become a bottleneck.
Usually this happens in applications that read recently inserted data very frequently, but
commit infrequently. Techniques that can be used to reduce such situations include the
following:
Shorter transactions reduce the likelihood that any given index block in the cache
contains uncommitted data, thereby reducing the need to access undo information for
consistent read.
As explained earlier, increasing sequence cache sizes can reduce inter-instance
concurrent access to index leaf blocks. CR versions of index blocks modified by only
one instance can be fabricated without the need of remote undo information.
Note: In RAC, the problem is exacerbated by the fact that a subset of the undo information
has to be obtained from remote instances.
Wait events
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
enq: HW -
contention
gc current grant Heavy
inserts
HWM
Heavy
s a
inserts )ha
m
co
s
u n isy uide
b r nt G
New extent n t o@ tude
c i me this S
RAC01 n as use RAC02
n
rto se t o
v e n and/or its affiliates. All rights reserved.
n (e 2012,
Copyright l i c eOracle
r t o n le
e r a b
A certain n Ev nsfe
combination of wait events and statistics presents itself in applications where the
r t o t r a
ve oton-a segment. If databusiness
insertion
Efrequently
of data is a dominant function and new blocks have to be allocated
n is inserted at a high rate, new blocks may have to be made
available after unfruitful searches for free space. This has to happen while holding the high-
water mark (HWM) enqueue.
Therefore, the most common symptoms for this scenario include:
A high percentage of wait time for enq: HW contention
A high percentage of wait time for gc current grant events
The former is a consequence of the serialization on the HWM enqueue, and the latter is
because of the fact that current access to the new data blocks that need formatting is required
for the new block operation. In a RAC environment, the length of this space management
operation is proportional to the time it takes to acquire the HWM enqueue and the time it
takes to acquire global locks for all the new blocks that need formatting. This time is small
under normal circumstances because there is never any access conflict for the new blocks.
Therefore, this scenario may be observed in applications with business functions requiring a
lot of data loading, and the main recommendation to alleviate the symptoms is to define
uniform and large extent sizes for the locally managed and automatic space-managed
segments that are subject to high-volume inserts.
Dirty
block
SGA1 SGA2
Table1 Table1
CKPT CKPT
Table2 Table2
s a
)ha
m
co
1
s
u n isy 2 uide
3 4 b r nt G
Truncate Table1 n t o@ Truncate t u de Table2
c
Cross-instance i me callthis S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nand
In dataowarehouse s fedata mart environments, it is not uncommon to see a lot of TRUNCATE
v e rt nThese
operations. - tra essentially happen on tables containing temporary data.
noenvironment, truncating tables concurrently from different instances does not scale
EIn a RAC
well, especially if, in conjunction, you are also using direct read operations such as parallel
queries.
As shown in the slide, a truncate operation requires a cross-instance call to flush dirty blocks
of the table that may be spread across instances. This constitutes a point of serialization. So,
while the first TRUNCATE command is processing, the second has to wait until the first one
completes.
There are different types of cross-instance calls. However, all use the same serialization
mechanism.
For example, the cache flush for a partitioned table with many partitions may add latency to a
corresponding parallel query. This is because each cross-instance call is serialized at the
cluster level, and one cross-instance call is needed for each partition at the start of the parallel
query for direct read purposes.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EDatabase
n s fePerformance page provides a quick glimpse of the performance
e o
The Cluster
ra
rt forna-tdatabase.
v
statistics Enterprise Manager accumulates data from each instance over
noperiods of time, called collection-based data. Enterprise Manager also provides
Especified
current data from each instance, known as real-time data.
Statistics are rolled up across all the instances in the cluster database. Using the links next to
the charts, you can get more specific information and perform any of the following tasks:
Identify the causes of performance issues.
Decide whether resources need to be added or redistributed.
Tune your SQL plan and schema for better optimization.
Resolve performance issues.
The screenshot in the slide shows a partial view of the Cluster Database Performance page.
You access this page by clicking the Performance tab from the Cluster Database Home page.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EHost Load
n s feAverage chart in the Cluster Database Performance page shows
e o
The Cluster
tra that are outside the database. The chart shows maximum, average, and
rt problems
v
potential n -
Eminimumnoload values for available nodes in the cluster for the previous hour.
If the load average is higher than the average of the total number of CPUs across all the hosts
in the cluster, then too many processes are waiting for CPU resources. SQL statements that
are not tuned often cause high CPU usage. Compare the load average values with the values
displayed for CPU Used in the Average Active Sessions chart. If the sessions value is low
and the load average value is high, this indicates that something else on the host, other than
your database, is consuming the CPU.
You can click any of the load value labels for the Cluster Host Load Average chart to view
more detailed information about that load value. For example, if you click the Average label,
the Hosts: Average Load page appears, displaying charts that depict the average host load
for up to four nodes in the cluster.
You can select whether the data is displayed in a summary chart, combining the data for each
node in one display, or using tile charts, where the data for each node is displayed in its own
chart. You can click Customize to change the number of tile charts displayed in each row or
the method of ordering the tile charts.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n
The Global
E s
CachenBlock
fe Access Latency chart shows the latency for each type of data block
e o
rt currenttraand consistent-read (CR) blocks. That is the elapsed time it takes to locate
request:
v n -
no consistent-read and current blocks between the buffer caches.
Eand transfer
You can click either metric for the Global Cache Block Access Latency chart to view more
detailed information about that type of cached block.
If the Global Cache Block Access Latency chart shows high latencies (high elapsed times),
this can be caused by any of the following:
A high number of requests caused by SQL statements that are not tuned
A large number of processes in the queue waiting for the CPU, or scheduling delays
Slow, busy, or faulty interconnects. In these cases, check your network connection for
dropped packets, retransmittals, or cyclic redundancy check (CRC) errors.
Concurrent read and write activity on shared data in a cluster is a frequently occurring activity.
Depending on the service requirements, this activity does not usually cause performance
problems. However, when global cache requests cause a performance problem, optimizing
SQL plans and the schema to improve the rate at which data blocks are located in the local
buffer cache, and minimizing I/O is a successful strategy for performance tuning. If the latency
for consistent-read and current block requests reaches 10 milliseconds, then see the Cluster
Cache Coherency page for more detailed information.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n EActive n s fe
r t o
The Average
t r a Sessions chart on the Cluster Database Performance page shows
ve oproblems
Epotential - inside the database. Categories, called wait classes, show how much of
n n is using a resource, such as CPU or disk I/O. Comparing CPU time with wait
the database
time helps to determine how much of the response time is consumed with useful work rather
than waiting for resources that are potentially held by other processes.
At the cluster database level, this chart shows the aggregate wait class statistics across all
the instances. For a more detailed analysis, you can click the Clipboard icon at the bottom of
the chart to view the ADDM analysis for the database for that time period.
If you click the wait class legends beside the Average Active Sessions chart, you can view
instance-level information stored in Active Sessions by Instance pages. You can use the
Wait Class action list on the Active Sessions by Instance page to view the different wait
classes. The Active Sessions by Instance pages show the service times for up to four
instances. Using the Customize button, you can select the instances that are displayed. You
can view the data for the instances separately by using tile charts, or you can combine the
data into a single summary chart.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E on the n s fe
The last
r t o chart
t r a Performance page monitors the usage of various database resources.
ve theoThroughput
EClick n- tab at the top of this chart to view the Database Throughput chart.
Compare n the peaks on the Average Active Sessions chart with those on the Database
Throughput charts. If internal contention is high and throughput is low, consider tuning the
database.
The Database Throughput charts summarize any resource contention that appears in the
Average Active Sessions chart, and also show how much work the database is performing on
behalf of the users or applications. The Per Second view shows the number of transactions
compared to the number of logons, and (not shown here) the number of physical reads
compared to the redo size per second. The Per Transaction view shows the number of
physical reads compared to the redo size per transaction. Logons is the number of users that
are logged on to the database.
To obtain information at the instance level, access the Database Throughput by Instance
page by clicking one of the legends to the right of the charts. This page shows the breakdown
of the aggregated Database Throughput chart for up to four instances. You can select the
instances that are displayed. You can drill down further on the Database Throughput by
Instance page to see the sessions of an instance consuming the greatest resources. Click an
instance name legend under the chart to go to the Top Sessions subpage of the Top
Consumers page for that instance.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E on then s fe
The last
r t o chart
t r a Performance page monitors the usage of various database resources.
veclicking
EBy - Instances tab at the top of this chart, you can view the Active Sessions by
nthe
Instancenochart.
The Active Sessions by Instance chart summarizes any resource contention that appears in
the Average Active Sessions chart. Using this chart, you can quickly determine how much of
the database work is being performed on each instance.
You can also obtain information at the instance level by clicking one of the legends to the right
of the chart to access the Top Sessions page. On the Top Sessions page, you can view real-
time data showing the sessions that consume the greatest system resources. In the graph in
the slide, the orac2 instance after 8:20 PM is consistently showing more active sessions than
the orac1 instance.
Block
Class
Segment s a
name )ha
m
co
s
u n isy uide
Segment b r nt G
name
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Cluster
n s feCache Coherency page, click the Performance tab on the Cluster
e o
To access
rt Homethe
trapage, and click Cluster Cache Coherency in the Additional Monitoring Links
v
Database n -
Esectionnatothe bottom of the page. Alternatively, click either of the legends to the right of the
Global Cache Block Access Latency chart.
The Cluster Cache Coherency page contains summary charts for cache coherency metrics for
the cluster:
Global Cache Block Access Latency: Shows the total elapsed time, or latency, for a
block request. Click one of the legends to the right of the chart to view the average time
it takes to receive data blocks for each block type (current or CR) by instance. On the
Average Block Receive Time by Instance page, you can click an instance legend
under the chart to go to the Block Transfer for Local Instance page, where you can
identify which block classes, such as undo blocks, data blocks, and so on, are subject to
intense global cache activity. This page displays the block classes that are being
transferred, and which instances are transferring most of the blocks. Cache transfer
indicates how many current and CR blocks for each block class were received from
remote instances, including how many transfers incurred a delay (busy) or an
unexpected longer delay (congested).
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n ECache n s fe Transfer Rate: Shows the total aggregated number of blocks
e t o
Global
rreceived Block
trbyaall instances in the cluster by way of an interconnect. Click one of the
v n -
no to the right of the chart to go to the Global Cache Blocks Received by Instance
E legends
page for that type of block. From there, you can click an instance legend under the chart
to go to the Segment Statistics by Instance page, where you can see which segments
are causing cache contention.
Global Cache Block Transfers and Physical Reads: Shows the percentage of logical
read operations that retrieved data from the buffer cache of other instances by way of
Direct Memory Access and from disk. It is essentially a profile of how much work is
performed in the local buffer cache, rather than the portion of remote references and
physical reads, which both have higher latencies. Click one of the legends to the right of
the chart to go to the Global Cache Block Transfers vs. Logical Reads by Instance and
Physical Reads vs. Logical Reads by Instance pages. From there, you can click an
instance legend under the chart to go to the Segment Statistics by Instance page,
where you can see which segments are causing cache contention.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
The Clustern n fe page is useful for monitoring the interconnect interfaces,
EInterconnects
s
e o tra
rt nconfiguration
determining
v o
Etraffic. This - issues, and identifying transfer raterelated issues including excess
n page helps to determine the load added by instances and databases on the
interconnect. Sometimes you can quickly identify interconnect delays that are due to
applications outside Oracle.
You can use this page to perform the following tasks:
View all interfaces that are configured across the cluster.
View statistics for the interfaces, such as absolute transfer rates and errors.
Determine the type of interfaces, such as private or public.
Determine whether the instance is using a public or private network.
Determine which database instance is currently using which interface.
Determine how much the instance is contributing to the transfer rate on the interface.
The Private Interconnect Transfer Rate value shows a global view of the private interconnect
traffic, which is the estimated traffic on all the private networks in the cluster. The traffic is
calculated as the summary of the input rate of all private interfaces known to the cluster.
From the Cluster Interconnects page, you can access the Hardware Details page, on which
you can get more information about all the network interfaces defined on each node of your
cluster.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nLocks s fe page to determine whether multiple instances are holding locks for
Use the
e oDatabase
rt object.traThe page shows user locks, all database locks, or locks that are blocking
v
the same n -
no or applications. You can use this information to stop a session that is
Eother users
unnecessarily locking an object.
To access the Database Locks page, select Performance on the Cluster Database Home
page, and click Database Locks in the Additional Monitoring Links section at the bottom of the
Performance subpage.
MMON Coordinator
In-memory
statistics
SYSAUX
SGA (Inst1)
AWR tables
6:00 a.m.
9:00 a.m. s a
7:00 a.m.
)ha
8:00 a.m. m
co
MMON s
isy uide
9:00 a.m.
In-memory
statistics u n
r nt G
b
n t o@ tude
SGA (Instn)
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe
E nsgenerates
r o
AWR tautomatically
t r a snapshots of the performance data once every hour and
ve the
Ecollects -
nstatistics in the workload repository. In RAC environments, each AWR snapshot
nodata
captures from all active instances within the cluster. The data for each snapshot set that
is captured for all active instances is from roughly the same point in time. In addition, the data
for each instance is stored separately and is identified with an instance identifier. For
example, the buffer_busy_wait statistic shows the number of buffer waits on each
instance. The AWR does not store data that is aggregated from across the entire cluster. That
is, the data is stored for each individual instance.
The statistics snapshots generated by the AWR can be evaluated by producing reports
displaying summary data such as load and cluster profiles based on regular statistics and wait
events gathered on each instance.
The AWR functions in a similar way as Statspack. The difference is that the AWR
automatically collects and maintains performance statistics for problem detection and self-
tuning purposes. Unlike in Statspack, in the AWR, there is only one snapshot_id per
snapshot across instances.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E statistics
n s fe in an AWR report are organized in different sections. A RAC
e o
The RAC-related
rt section traappears after the Top 5 Timed Events. This section contains:
v
statistics n -
E The nonumber of instances open at the time of the begin snapshot and the end snapshot
to indicate whether instances joined or left between the two snapshots
The Global Cache Load Profile, which essentially lists the number of blocks and
messages that are sent and received, as well as the number of fusion writes
The Global Cache Efficiency Percentages, which indicate the percentage of buffer gets
broken up into buffers received from the disk, local cache, and remote caches. Ideally,
the percentage of disk buffer access should be close to zero.
GCS and GES Workload Characteristics, which gives you an overview of the more
important numbers first. Because the global enqueue convert statistics have been
consolidated with the global enqueue get statistics, the report prints only the average
global enqueue get time. The round-trip times for CR and current block transfers follow,
as well as the individual sender-side statistics for CR and current blocks. The average
log flush times are computed by dividing the total log flush time by the number of actual
log flushes. Also, the report prints the percentage of blocks served that actually incurred
a log flush.
s a
)ha
m
co
s
u n isy uide
Two ASH report sections b r nt G
specific to Oracle RAC are n t o@ tude
e S
Top Cluster Events and scim this
Top Remote Instance. n a use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
Activeto n E History
Session n s fe(ASH) is an integral part of the Oracle Database self-management
v e r nand
framework - trisauseful for diagnosing performance problems in Oracle RAC environments.
no statistics provide details about Oracle Database session activity. Oracle Database
EASH report
records information about active sessions for all active Oracle RAC instances and stores this
data in the System Global Area (SGA). Any session that is connected to the database and
using CPU is considered an active session. The exception to this is sessions that are waiting
for an event that belongs to the idle wait class.
ASH reports present a manageable set of data by capturing only information about active
sessions. The amount of the data is directly related to the work being performed, rather than
the number of sessions allowed on the system. ASH statistics that are gathered over a
specified duration can be put into ASH reports.
Each ASH report is divided into multiple sections to help you identify short-lived performance
problems that do not appear in the ADDM analysis. Two ASH report sections that are specific
to Oracle RAC are Top Cluster Events and Top Remote Instance.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Self-diagnostic engine
s a
)ha
Instance ADDM m
co
s
u n isy uide
b r nt G
t o @ tude
AWR
ime is S n
a s c e th
Inst1
o n n o us Instn
r t t
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe
E nsDatabase
r o
Usingtthe Automatic
t r a Diagnostic Monitor (ADDM), you can analyze the information
ve obynAWR
Ecollected - for possible performance problems with your Oracle database. ADDM
presentsn performance data from a clusterwide perspective, thus enabling you to analyze
performance on a global basis. In an Oracle RAC environment, ADDM can analyze
performance using data collected from all instances and present it at different levels of
granularity, including:
Analysis for the entire cluster
Analysis for a specific database instance
Analysis for a subset of database instances
To perform these analyses, you can run the ADDM Advisor in Database ADDM for RAC mode
to perform an analysis of the entire cluster, in Local ADDM mode to analyze the performance
of an individual instance, or in Partial ADDM mode to analyze a subset of instances.
Database ADDM for RAC is not just a report of reports but has independent analysis that is
appropriate for RAC. You activate ADDM analysis using the advisor framework through
Advisor Central in Oracle Enterprise Manager, or through the DBMS_ADVISOR and
DBMS_ADDM PL/SQL packages.
Note: Database ADDM report is generated on AWR snapshot coordinator.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E 11g s e
fEnterprise
Oracle
r t o
Database
t r a n Manager displays the ADDM analysis on the Cluster
ve oHome
EDatabase n- page.
n
On the Automatic Database Diagnostic Monitor (ADDM) page, the Database Activity chart
(not shown here) plots the database activity during the ADDM analysis period. Database
activity types are defined in the legend based on its corresponding color in the chart. Each
icon below the chart represents a different ADDM task, which in turn corresponds to a pair of
individual Oracle Database snapshots saved in the Workload Repository.
In the ADDM Performance Analysis section, the ADDM findings are listed in descending
order, from highest impact to least impact. For each finding, the Affected Instances column
displays the number (m of n) of instances affected. Drilling down further on the findings takes
you to the Performance Findings Detail page. The Informational Findings section lists the
areas that do not have a performance impact and are for informational purpose only.
The Affected Instances chart shows how much each instance is impacted by these findings.
The display indicates the percentage impact for each instance.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
Answer:
e o a
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
administrator-managed databases.
Services for a policy-managed database are defined to a
server pool where the database is running.
Services for policy-managed databases can be defined as:
UNIFORM (running on all instances in the server pool)
SINGLETON (running on only one instance in the pool)
For singleton services, RAC chooses on which instance in theha
sa
)
server pool the service is active. om c
Services for an administrator-managed database i s ys define
i d e
r u n Gu
which instances normally support that service.
b nt
@ e
These are known as the PREFERRED
e tud
nto Sinstances.
c
Instances defined to support
s e t his if the preferred
ima service
a us
nn as AVAILABLE
instance fails are known
r to e to
instances.
e e
v ens
(
n e2012,
Copyright licOracle and/or its affiliates. All rights reserved.
o n
rt rab l
v e
n E nthat s feall users who share a service have the same service-level
e o
It is recommended
rt n-tYou ra can define specific characteristics for services and each service can be a
v
requirements.
Eseparate nounit of work. There are many options that you can take advantage of when using
services. Although you do not have to implement these options, they help optimize application
performance. You can define services for both policy-managed and administrator-managed
databases.
Policy-managed database: When you define services for a policy-managed database,
you define the service to a server pool where the database is running. You can define
the service as either uniform (running on all instances in the pool) or singleton (running
on only one instance in the pool). For singleton services, RAC chooses on which
instance in the server pool the service is active. If that instance fails, then the service
fails over to another instance in the pool. A service can run in only one server pool.
Administrator-managed database: When you define a service for an administrator-
managed database, you define which instances support that service. These are known
as the PREFERRED instances. You can also define other instances to support a service
if the services preferred instance fails. These are known as AVAILABLE instances.
Note: Failback is not implemented by default because it is a disruptive operation. If you
require failback, you can always try to implement it as a callout that relocates the service.
Application services:
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Administration-Managed
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Policy-Managed
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
From yourn E s fe home page, click the Availability tab, and then click Cluster
ClusternDatabase
e o tra Services. On the Cluster Managed Database Services page, click Create
rt Database
Managed
v
EService.no n -
Use the Create Service page to configure a new service in which you do the following:
Select the desired service policy for each instance configured for the cluster database.
Select the desired service properties.
If your database is administration managed, the High Availability Configuration section allows
you to configure preferred and available servers. If your database employs policy-managed
administration, you can configure the service cardinality to be UNIFORM or SINGLETON and
assign the service to a server pool.
You can also define the management policy for a service. You can choose either an
automatic or a manual management policy.
Automatic: The service always starts when the database starts.
Manual: Requires that the service be started manually. Prior to Oracle RAC 11g
Release 2, all services worked as though they were defined with a manual management
policy.
Note: Enterprise Manager now generates the corresponding entries in your tnsnames.ora
files for your services. Just click the Update local naming parameter (tnsnames.ora) file
check box when creating the service.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s feManager to manage services within a GUI framework. The
EEnterprise
You can
e o use
raslide shows the main page for administering services within RAC. It shows
rt nin-tthe
v
screenshot
nobasic status information about a defined service.
Eyou some
To access this page, click the Cluster Managed Database Services link on the Cluster
Database Availability page.
You can perform simple service management such as enabling, disabling, starting, stopping,
and relocating services. All possible operations are shown in the slide.
If you choose to start a service on the Cluster Managed Database Services page, then EM
attempts to start the service on every preferred instance. Stopping the service stops it on all
instances that it is currently running.
To relocate a service, select the service that you want to administer, select the Manage option
from the Actions drop-down list, and then click Go.
Note: On the Cluster Managed Database Services page, you can test the connection for a
service.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Cluster
n s feManaged Database Service page for an individual service, you must
e o
To access the
trafrom the Cluster Managed Database Services page, select the Manage
rta service
v
select n -
no the Actions drop-down list, and then click Go.
Eoption from
This is the Cluster Managed Database Service page for an individual service. It offers you the
same functionality as the previous page, except that actions performed here apply to specific
instances of a service.
This page also offers you the added functionality of relocating a service to an available
instance. Relocating a service from one instance to another stops the service on the first
instance and then starts it on the second.
Stop a service:
$ srvctl stop service d orcl s AP I orcl3,orcl4
(ADDRESS=(PROTOCOL=TCP)(HOST=cluster01-scan)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=ERP)))
ton e to
(CONNECT_DATA=(SERVICE_NAME=ERP)))"
e r
v ens
( e
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E ninsthe feslide shows the TNS connect descriptor that can be used to access
e o
The first example
rt service.traIt uses the clusters Single Client Access Name (SCAN). The SCAN provides
the
v ERP n -
o to the clients connecting to Oracle RAC that does not change throughout the
Ea singlenname
life of the cluster, even if you add or remove nodes from the cluster. Clients connecting with
SCAN can use a simple connection string, such as a thin JDBC URL or EZConnect, and still
achieve the load balancing and client connection failover. The second example uses virtual IP
addresses as in previous versions of the Oracle Database.
The third example shows the thick JDBC connection description using the previously defined
TNS connect descriptor.
The third example shows the thin JDBC connection description using the same TNS connect
descriptor as the first example.
Note: The LOAD_BALANCE=ON clause is used by Oracle Net to randomize its progress
through the protocol addresses of the connect descriptor. This feature is called client
connection load balancing.
The two load balancing methods that you can implement are:
Client-side load balancing: Balances the connection
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
v e rto se t
(e 2012, c n and/or its affiliates. All rights reserved.
eOracle
n n
Copyright l i
e r t o
a b le
n E v
s f er the ability to balance client connections across the instances in
Oracleo
r Net
t RAC Services
t r a n provides
an
v e
Oracle
o
Eserver-side.n - configuration. You can implement two types of load balancing: client-side and
n Client-side load balancing balances the connection requests across the listeners.
With server-side load balancing, the listener directs a connection request to the best instance
currently providing the service by using the load balancing advisory. In a RAC database,
client connections should use both types of connection load balancing.
FAN, Fast Connection Failover, and the load balancing advisory depend on an accurate
connection load balancing configuration that includes setting the connection load balancing
goal for the service. You can use a goal of either LONG or SHORT for connection load
balancing. These goals have the following characteristics:
LONG: Use the LONG load balancing method for applications that have long-lived
connections. This is typical for connection pools and SQL*Forms sessions. LONG is the
default connection load balancing goal. The following is an example of modifying a
service, POSTMAN, with the srvctl utility to define the connection load balancing goal
for long-lived sessions: srvctl modify service -s POSTMAN -j LONG
SHORT: Use the SHORT connection load balancing method for applications that have
short-lived connections. The following example modifies the ORDER service, using
srvctl to set the goal to SHORT: srvctl modify service -s ORDER -j SHORT
Instance resources s a
AP
)ha
m
co
s
Connections AP
u n isy uide
75%
b r nt G
t o @ tude
n S 25%
BATCH
c i meBATCH h i s
n as use t
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Resource
n s fe Manager (also called Resource Manager) enables you to identify
e o
The Database
ra
t using-tservices.
rby
v
work
o n
Ebindingnservices It manages the relative priority of services within an instance by
directly to consumer groups. When a client connects by using a service, the
consumer group is assigned transparently at connect time. This enables the Resource
Manager to manage the work requests by service in the order of their importance.
For example, you define the AP and BATCH services to run on the same instance, and assign
AP to a high-priority consumer group and BATCH to a low-priority consumer group. Sessions
that connect to the database with the AP service specified in their TNS connect descriptor get
priority over those that connect to the BATCH service.
This offers benefits in managing workloads because priority is given to business functions
rather than the sessions that support those business functions.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E ns(EM) fe presents a GUI through the Consumer Group Mapping page to
e o
Enterprise Manager
rt n-tmap ra sessions to consumer groups. You can access this page by clicking the
v
automatically
no Group Mappings link on the Server page.
EConsumer
Using the General tabbed page of the Consumer Group Mapping page, you can set up a
mapping of sessions connecting with a service name to consumer groups as illustrated in the
right half of the slide.
With the ability to map sessions to consumer groups by service, module, and action, you have
greater flexibility when it comes to managing the performance of different application
workloads.
Using the Priorities tabbed page of the Consumer Group Mapping page, you can change
priorities for the mappings that you set up on the General tabbed page. The mapping options
correspond to columns in V$SESSION. When multiple mapping columns have values, the
priorities you set determine the precedence for assigning sessions to consumer groups.
Note: You can also map a service to a consumer group directly from the Create Service page
as shown in the left half of the slide.
s a
Job coordinator Job coordinator Job coordinator
) ha
Job slaves Job slaves Job slaves c o m
i s ys ide
Database r u n Gu
@ b ent
Job table
e nto Stud
his
Job1 HOT_BATCH_CLASS HOT_BATCH_SERV
Job2 HOT_BATCH_CLASS
s c imHOT_BATCH_SERV
t
na us
Job3 LOW_BATCH_CLASS
e
LOW_BATCH_SERV
r n
to e to
e e
v ens
(
n e2012,
Copyright licOracle and/or its affiliates. All rights reserved.
o
rt rabn l
v e
n n s fe
E environments,
Just as
r t oin other
t r a the Scheduler in a RAC environment uses one job table for
ve database
Eeach - and one job coordinator (CJQ0 process) for each instance. The job
non communicate with each other to keep information current.
coordinators
The Scheduler can use the services and the benefits they offer in a RAC environment. The
service that a specific job class uses is defined when the job class is created. During
execution, jobs are assigned to job classes and job classes run within services. Using
services with job classes ensures that the work of the Scheduler is identified for workload
management and performance tuning. For example, jobs inherit server-generated alerts and
performance thresholds for the service they run under.
For high availability, the Scheduler offers service affinity instead of instance affinity. Jobs are
not scheduled to run on any specific instance. They are scheduled to run under a service. So,
if an instance dies, the job can still run on any other instance in the cluster that offers the
service.
Note: By specifying the service where you want the jobs to run, the job coordinators balance
the load on your system for better performance.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe under a specific service, click the Job Classes link in the Database
Ea jobntosrun
e o
To configure
tra of the Server page. This opens the Scheduler Job Classes page. On the
rt nsection
v
Scheduler -
no Job Classes page, you can see services assigned to job classes.
EScheduler
When you click the Create button on the Scheduler Job Classes page, the Create Job Class
page is displayed. On this page, you can enter details of a new job class, including which
service it must run under.
Note: Similarly, you can map a service to a job class on the Create Service page as shown at
the bottom of the slide.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n e
E classnsisfset
r t o
After your job
t r a up with the service that you want it to run under, you can create the
veTo create
Ejob. - the job, click the Jobs link on the Server page. The Scheduler Jobs page
appears, noonnwhich you can click the Create button to create a new job. When you click the
Create button, the Create Job page is displayed. This page has different tabs: General,
Schedule, and Options. Use the General tabbed page to assign your job to a job class.
Use the Options page (displayed in the slide) to set the Instance Stickiness attribute for your
job. Basically, this attribute causes the job to be load balanced across the instances for which
the service of the job is running. The job can run only on one instance. If the Instance
Stickiness value is set to TRUE, which is the default value, the Scheduler runs the job on the
instance where the service is offered with the lightest load. If Instance Stickiness is set to
FALSE, then the job is run on the first available instance where the service is offered.
Note: It is possible to set job attributes, such as INSTANCE_STICKINESS, by using the
SET_ATTRIBUTE procedure of the DBMS_SCHEDULER PL/SQL package.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s fe of distributed transactions, you can use services to manage
Ethe performance
e t o
To enhance
tra By defining the DTP property of a service, the service is guaranteed to
renvironments.
v
DTP n -
o instance at a time in an Oracle RAC database. All global distributed transactions
Erun on none
performed through the DTP service are ensured to have their tightly coupled branches
running on a single Oracle RAC instance. This has the following benefits:
The changes are available locally within one Oracle RAC instance when tightly coupled
branches need information about changes made by each other.
Relocation and failover of services are fully supported for DTP.
By using more DTP services than there are Oracle RAC instances, Oracle Database
can balance the load by services across all the Oracle RAC database instances.
To leverage all the instances in a cluster, create one or more DTP services for each Oracle
RAC instance that hosts distributed transactions. Choose one DTP service for one distributed
transaction. Choose different DTP services for different distributed transactions to balance the
workload among the Oracle RAC database instances.
Because all the branches of a distributed transaction are on one instance, you can leverage
all the instances to balance the load of many DTP transactions through multiple singleton
services, thereby maximizing application throughput.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Ethresholds
n s fe enable you to compare achieved service levels against accepted
e o
Service-level
tra levels. This provides accountability for the delivery or the failure to deliver
rt required
v
minimum n -
noservice level. The end goal is a predictable system that achieves service levels.
Ean agreed
There is no requirement to perform as fast as possible with minimum resource consumption;
the requirement is to meet the quality of service.
You can explicitly specify two performance thresholds for each service: the response time for
calls, or SERVICE_ELAPSED_TIME, and the CPU time for calls, or SERVICE_CPU_TIME. The
response time goal indicates that the elapsed time should not exceed a certain value, and the
response time represents wall clock time. Response time is a fundamental measure that
reflects all delays and faults that might be blocking the call from running on behalf of the user.
Response time can also indicate differences in node power across the nodes of an Oracle
RAC database.
The service time and CPU time are calculated as the moving average of the elapsed, server-
side call time. The AWR monitors the service time and CPU time and publishes AWR alerts
when the performance exceeds the thresholds. You can then respond to these alerts by
changing the priority of a job, stopping overloaded processes, or by relocating, expanding,
shrinking, starting, or stopping a service. This permits you to maintain service availability
despite changes in demand.
EXECUTE DBMS_SERVER_ALERT.SET_THRESHOLD(
METRICS_ID => DBMS_SERVER_ALERT.ELAPSED_TIME_PER_CALL
, warning_operator => DBMS_SERVER_ALERT.OPERATOR_GE
, warning_value => '500000'
, critical_operator => DBMS_SERVER_ALERT.OPERATOR_GE
, critical_value => '750000'
, observation_period => 30
, consecutive_occurrences => 5
s a
, instance_name => NULL
) ha
o
, object_type => DBMS_SERVER_ALERT.OBJECT_TYPE_SERVICE
c m
, object_name => 'servall'); ys e is uid
r u n G
b n t
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
To check n E nsfe for the servall service, use the AWR report. You should record
the thresholds
e o
rt fromnthe a over several successive intervals during which time the system is
trreport
v
output -
E no
running optimally. For example, assume that for an email server, the AWR report runs each
Monday during the peak usage times of 10:00 AM to 2:00 PM. The AWR report would contain
the response time, or DB time, and the CPU consumption time, or CPU time, for calls for each
service. The AWR report would also provide a breakdown of the work done and the wait times
that are contributing to the response times.
Using DBMS_SERVER_ALERT, set a warning threshold for the servall service at 0.5
seconds and a critical threshold for the payroll service at 0.75 seconds. You must set these
thresholds at all instances within an Oracle RAC database. The parameter instance_name
can be set to a NULL value to indicate database-wide alerts. You can schedule actions using
Enterprise Manager jobs for alerts, or you can schedule actions to occur programmatically
when the alert is received. In this example, thresholds are added for the servall service and
set as shown in the slide.
Verify the threshold configuration by using the following SELECT statement:
SELECT metrics_name, instance_name, warning_value,
critical_value, observation_period FROM dba_thresholds;
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfepage, you can access the Top Consumers page by clicking the Top
e o
From tthe Performance
r nlink. tra
v
Consumers -
EThe TopnoConsumers page has several tabs for displaying your database as a single-system
image. The Overview tabbed page contains four pie charts: Top Clients, Top Services, Top
Modules, and Top Actions. Each chart provides a different perspective regarding the top
resource consumers in your database.
The Top Services tabbed page displays performance-related information for the services that
are defined in your database. Using this page, you can enable or disable tracing at the service
level, as well as view the resulting SQL trace file.
For the ERP service, enable monitoring for all the actions in
the PAYROLL module: a
EXEC DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE(service_name) h
as
=>
'ERP', module_name=> 'PAYROLL', action_name => NULL); c om
i s ys ide
For the HOT_BATCH service, enable monitoring r u n for G uall
b en t
actions in the posting module: o @ tud
e nt S
EXEC DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE(service_name
s c im this =>
'HOT_BATCH', module_name =>'POSTING',
na us e action_name => NULL);
n
rto se t o
v e n and/or its affiliates. All rights reserved.
n (e 2012,
Copyright l i c eOracle
r t o n le
e a b
n Ev performance
s f er data tracing for important modules and actions within each
You can
e r
service.
enable
t an
toThe -performance
r statistics are available in the V$SERV_MOD_ACT_STATS view.
v
EConsider o n
n the following actions, as implemented in the slide:
For the ERP service, enable monitoring for the exceptions pay action in the payroll
module.
Under the ERP service, enable monitoring for all the actions in the payroll module.
Under the HOT_BATCH service, enable monitoring for all actions in the posting module.
Verify the enabled service, module, action configuration with the SELECT statement below:
COLUMN AGGREGATION_TYPE FORMAT A21 TRUNCATED HEADING 'AGGREGATION'
COLUMN PRIMARY_ID FORMAT A20 TRUNCATED HEADING 'SERVICE'
COLUMN QUALIFIER_ID1 FORMAT A20 TRUNCATED HEADING 'MODULE'
COLUMN QUALIFIER_ID2 FORMAT A20 TRUNCATED HEADING 'ACTION'
SELECT * FROM DBA_ENABLED_AGGREGATIONS ;
The output might appear as follows:
AGGREGATION SERVICE MODULE ACTION
--------------------- -------------------- ---------- -------------
SERVICE_MODULE_ACTION ERP PAYROLL EXCEPTIONS
PAY
SERVICE_MODULE_ACTION ERP PAYROLL
SERVICE_MODULE_ACTION HOT_BATCH POSTING
V$SESSION
V$ACTIVE_SESSION_HISTORY
Service performance in:
V$SERVICE_STATS
V$SERVICE_EVENT
V$SERVICE_WAIT_CLASS a
V$SERVICEMETRIC ha s
m )
V$SERVICEMETRIC_HISTORY o
c e
y s
V$SERV_MOD_ACT_STATS
u n is uid
DBA_ENABLED_AGGREGATIONS b r n t G
@ e
DBA_ENABLED_TRACES nto Stud
c i me this
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Emodule,s e action information are visible in V$SESSION and
fand
The service,
o
rt n-tra n
v e
V$ACTIVE_SESSION_HISTORY.
E no
The call times and performance statistics are visible in V$SERVICE_STATS,
V$SERVICE_EVENT, V$SERVICE_WAIT_CLASS, V$SERVICEMETRIC, and
V$SERVICEMETRIC_HISTORY.
When statistics collection for specific modules and actions is enabled, performance measures
are visible at each instance in V$SERV_MOD_ACT_STATS.
More than 600 performance-related statistics are tracked and visible in V$SYSSTAT. Of these,
28 statistics are tracked for services. To see the statistics measured for services, run the
following query: SELECT DISTINCT stat_name FROM v$service_stats
Of the 28 statistics, DB time and DB CPU are worth mentioning. DB time is a statistic that
measures the average response time per call. It represents the actual wall clock time for a call
to complete. DB CPU is an average of the actual CPU time spent per call. The difference
between response time and CPU time is the wait time for the service. After the wait time is
known, and if it consumes a large percentage of response time, then you can trace at the
action level to identify the waits.
Note: DBA_ENABLED_AGGREGATIONS displays information about enabled on-demand
statistic aggregation. DBA_ENABLED_TRACES displays information about enabled traces.
not correct?
a. You can group work by type under services.
b. Users who share a service should have the same service-
level requirements.
c. You use DBMS_SERVICE to manage services, not srvctl
or Enterprise Manager. s a
) ha
c om
i s ys ide
r u n Gu
@ b ent
e nto Stud
s c im this
n a use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
Answer:
e o c
rt n-tra
v
E no c is not correct.
Statement
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
ERP =
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=node1vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=node2vip)(PORT=1521))
)
(CONNECT_DATA=(SERVICE_NAME=ERP)))
s a
)ha
Random m
co
s
access
u n isy uide
b r nt G
n t o@ tude
me is S
node1 sci node2th
n a use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s fe load balancing feature enables clients to randomize connection
E connect-time
e o
The client-side
rt among traa list of available listeners. Oracle Net progresses through the list of protocol
v
requests n -
no in a random sequence, balancing the load on the various listeners. Without this
Eaddresses
feature, Oracle Net always takes the first protocol address to attempt a connection.
You enable this feature by setting the LOAD_BALANCE=ON clause in the corresponding client-
side TNS entry.
Note: For a small number of connections, the random sequence is not always even.
ERP =
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE=ON)
(FAILOVER=ON) 3
(ADDRESS=(PROTOCOL=TCP)(HOST=node1vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=node2vip)(PORT=1521))
) 4
(CONNECT_DATA=(SERVICE_NAME=ERP))) s a
)ha
m
co
s
u n isy uide
b r nt G
1 n t o@ tude
c
node2vipi me this S
as use
2 nnode1vip
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n
This feature
Eenablesn s fe
clients to connect to another listener if the initial connection to the first
e o
rt fails. tranumber of listener protocol addresses in the connect descriptor determines
listener
v n -The
no listeners are tried. Without client-side connect-time failover, Oracle Net attempts a
Ehow many
connection with only one listener. As shown by the example in the slide, client-side connect-
time failover is enabled by setting FAILOVER=ON in the corresponding client-side TNS entry.
In the example, you expect the client to randomly attempt connections to either NODE1VIP or
NODE2VIP, because LOAD_BALANCE is set to ON. In the case where one of the nodes is
down, the client cannot know this. If a connection attempt is made to a down node, the client
needs to wait until it receives the notification that the node is not accessible, before an
alternate address in the ADDRESS_LIST is tried.
Therefore, it is highly recommended to use virtual host names in the ADDRESS_LIST of your
connect descriptors. If a failure of a node occurs (1), the virtual IP address assigned to that
node is failed over and brought online on another node in the cluster (2). Thus, all client
connection attempts are still able to get a response from the IP address, without the need to
wait for the operating system TCP/IP timeout (3). Therefore, clients get an immediate
acknowledgement from the IP address, and are notified that the service on that node is not
available. The next address in the ADDRESS_LIST can then be tried immediately with no
delay (4).
Note: If you use connect-time failover, do not set GLOBAL_DBNAME in your listener.ora
file.
ERP = (DESCRIPTION=
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
(ADDRESS_LIST=(LOAD_BALANCE=ON)(FAILOVER=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=node1vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=node2vip)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=ERP)))
6 4 3 2
ERP started on both instances
Listener Listener
1
5 s a
1 1
)ha
PMON PMON m
co
s
ide
isy uNode2
*.REMOTE_LISTENER=RACDB_LISTENERS
Node1
u n
r nt G
b
RACDB_LISTENERS=
n t o@ tude
me this S
(DESCRIPTION=
c i
(ADDRESS=(PROTOCOL=tcp)(HOST=node1vip)(PORT=1521))
n as use
(ADDRESS=(PROTOCOL=tcp)(HOST=node2vip)(PORT=1521)))
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E you n s fe listeners distribute service connection requests across a RAC
e o
The slide shows
rt Here, how
raclient application connects to the ERP service. On the server side, the
tthe
v
cluster. n -
nois using the dynamic service registration feature. This allows the PMON process of
Edatabase
each instance in the cluster to register service performance information with each listener in
the cluster (1). Each listener is then aware of which instance has a particular service started,
as well as how that service is performing on each instance.
You configure this feature by setting the REMOTE_LISTENER initialization parameter of each
instance to a TNS name that describes the list of all available listeners. The slide shows the
shared entry in the SPFILE as well as its corresponding server-side TNS entry.
Depending on the load information, as computed by the Load Balancing Advisory, and sent
by each PMON process, a listener redirects the incoming connection request (2) to the
listener of the node where the corresponding service is performing the best (3).
In the example, the listener on NODE2 is tried first. Based on workload information
dynamically updated by PMON processes, the listener determines that the best instance is
the one residing on NODE1. The listener redirects the connection request to the listener on
NODE1 (4). That listener then starts a dedicated server process (5), and the connection is
made to that process (6).
Note: For more information, refer to the Net Services Administrators Guide.
ONS ONS
AQ
s a
HA )ha
Proxy ONS m
app
Events
s co
n i sy DB u i de
Callout HA
CRS
HA
EMDr
b u t G
script Events Events
n Control
n t o@ tude
Callout
i m e is S
exec HA s
a c e th
n n
Events u s Node1
rto se t o
v e n and/or its affiliates. All rights reserved.
n (e 2012,
Copyright l i c eOracle
r t o n le
e a b
n Ev Notification
s f er
r t o
Fast Application
t r a n (FAN) enables end-to-end, lights-out recovery of applications and
ve balancing
Eload - based on real transaction performance in a RAC environment. With FAN, the
nonservice built in to Oracle Real Application Clusters 11g is extended to applications
continuous
and mid-tier servers. When the state of a database service changes, (for example, up, down,
or not restarting), the new status is posted to interested subscribers through FAN events.
Applications use these events to achieve very fast detection of failures, and rebalancing of
connection pools following failures, recovery, or planned changes. The easiest way to receive
all the benefits of FAN, with no effort, is to use a client that is integrated with FAN:
Oracle Universal Connection Pool (UCP) for Java
User extensible callouts
Connection Manager (CMAN)
Listeners
Oracle Notification Service (ONS) API
OCI Connection Pool or Session Pool
Transparent Application Failover (TAF)
ODP.NET Connection Pool
Note: Not all the preceding applications can receive all types of FAN events.
i m en is S
discrete number of retries.
Unknown
a s c e th
Status is unrecognized.
o n n o us
e r t e t
v
(e 2012, s
n and/or its affiliates. All rights reserved.
eOracle
n n
Copyright l i c
e r t o
a b le
n Ev nsthe ferevent status for each of the managed cluster resources seen
e r to -tra
This table describes
Ev non
previously.
<Event_Type>
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
VERSION=<n.n>
[service=<serviceName.dbDomainName>]
[database=<dbName>] [instance=<sid>]
[host=<hostname>]
status=<Event_Status>
reason=<Event_Reason>
[card=<n>]
timestamp=<eventDate> <eventTime> s a
) ha
o m
SERVICE VERSION=1.0 service=ERP.oracle.com
y s c e
database=RACDB status=up reason=user card=4
u n is uid
timestamp=16-Mar-2004 19:08:15 b r n t G
n t o@ tude
NODE VERSION=1.0 host=strac-1
c i me this S
status=nodedown timestamp=16-Mar-2004
n as use 17:35:53
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Eits type, s e
fstatus,
r t o
In addition to
t r a n and reason, a FAN event has other payload fields to further
ve othen-unique cluster resource whose status is being monitored and published:
Edescribe
The n event payload version, which is currently 1.0
The name of the primary or shadow application service. This name is excluded from
NODE events.
The name of the RAC database, which is also excluded from NODE events
The name of the RAC instance, which is excluded from SERVICE, DATABASE, and
NODE events
The name of the cluster host machine, which is excluded from SERVICE and
DATABASE events
The service cardinality, which is excluded from all events except for SERVICE status=up
events
The server-side date and time when the event is detected
The general FAN event format is described in the slide along with possible FAN event
examples. Note the differences in event payload for each FAN event type.
Parameter Description
Version Version of the event payload
Event type SERVICEMETRICS
<Grid Home>/racg/usrco
Can store more than one callout
Grants execution on callout directory and callouts only to the
Oracle Clusterware user
Callout execution order is nondeterministic.
Writing callouts involves: s a
)ha
1. Parsing callout arguments: The event payload m
2. Filtering incoming FAN events s co
3. Executing event-handling programs u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E event s e
fdetected
r o
Each tdatabase
t r a n by the RAC High Availability (HA) framework results in the
ve oofn-each executable script or program deployed in the standard Oracle Clusterware
Eexecution
callout n
directory. On UNIX, it is <Grid Home>/racg/usrco. Unless your Oracle
Clusterware home directory is shared across the network, you must deploy each new callout
on each RAC node. The order in which these callouts are executed is nondeterministic.
However, RAC guarantees that all callouts are invoked once for each recognized event in an
asynchronous fashion. Thus, it is recommended to merge callouts whose executions need to
be in a particular order.
You can install as many callout scripts or programs as your business requires, provided each
callout does not incur expensive operations that delay the propagation of HA events. If many
callouts are going to be written to perform different operations based on the event received, it
might be more efficient to write a single callout program that merges each single callout.
Writing server-side callouts involves the steps shown in the slide. In order for your callout to
identify an event, it must parse the event payload sent by the RAC HA framework to your
callout. After the sent event is identified, your callout can filter it to avoid execution on each
event notification. Then, your callout needs to implement a corresponding event handler that
depends on the event itself and the recovery process required by your business.
Note: As a security measure, make sure that the callout directory and its contained callouts
have write permissions only to the system user who installed Oracle Clusterware.
[ $NOTIFY_EVENTTYPE = "DATABASE" ] || \
[ $NOTIFY_EVENTTYPE = "NODE" ] \
) && \
( [ $NOTIFY_STATUS = "not_restarting" ] || \
[ $NOTIFY_STATUS = "restart_failed" ] \
)) && \
( [ $NOTIFY_DATABASE = "HQPROD" ] || \
[ $NOTIFY_SERVICE = "ERP" ] \
s a
))
) ha
then o m
/usr/local/bin/logTicket $NOTIFY_LOGDATEys\ c e
$NOTIFY_LOGTIME u n is \ uid
b r n t G
$NOTIFY_SERVICE
o @ d e \
e nt
$NOTIFY_DBNAME
S tu \
s c e t his
im$NOTIFY_HOST
fi na sn u
r t o t o
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe shows you a way to filter FAN events from a callout script. This
Ein thensslide
e o
The example
tra on the example in the previous slide.
rt isnbased
v
example -
E no
Now that the event characteristics are identified, this script triggers the execution of the
trouble-logging program /usr/local/bin/logTicket only when the RAC HA framework
posts a SERVICE, DATABASE, or NODE event type, with a status set to either
not_restarting or restart_failed, and only for the production HQPROD RAC database
or the ERP service.
It is assumed that the logTicket program is already created and that it takes the arguments
shown in the slide.
It is also assumed that a ticket is logged only for not_restarting or restart_failed
events, because they are the ones that exceeded internally monitored timeouts and seriously
need human intervention for full resolution.
s a
)h a
ONS ONS om
y s c e
OCR u n is uid
b
r ons.config
n t G
ons.config
n t o@ tude
Node1
c i me thNode2 is S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
The ONS n E nsfeis controlled by the <Grid HOME>/opmn/conf/ons.config
configuration
e o traThis file is automatically created during installation. Starting with Oracle
rt n-file.
v
configuration
no11g Release 2 (11.2) it is automatically maintained by the CRS ONS agent using
EDatabase
information stored in the OCR. There are three important parameters that are always
configured for each ONS:
The first is localport, the port that ONS uses to talk to local clients.
The second is remoteport, the port that ONS uses to talk to other ONS daemons.
The third parameter is called nodes. It specifies the list of other ONS daemons to talk
to. This list includes all RAC ONS daemons, and all mid-tier ONS daemons. Node
values are given as either host names or IP addresses followed by their remoteport.
This information is stored in Oracle Cluster Registry (OCR).
In the slide, it is assumed that ONS daemons are already started on each cluster node. This
should be the default situation after a correct RAC installation.
Mid-tier1
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
localport=6100
remoteport=6200 1
nodes=node1:6200,node2:6200
s a
)ha
co m
s
ONS
u n
y
isONS u ide
b r nt G
OCR
t o @ tude
n
ons.config
c i me this S ons.config
Node1
n as use Node2
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E 11g s e
fRelease
Oracle
r t o
Database
t r a n 2 introduces a new set of APIs for Oracle RAC Fast
ve onNotification
EApplication - (FAN) events. These APIs provide an alternative for taking advantage
n
of the high-availability (HA) features of Oracle Database, if you do not use Universal
Connection Pool or Oracle JDBC connection caching. These APIs are not a part of Oracle
JDBC APIs. For using Oracle RAC Fast Application Notification, the simplefan.jar file
must be present in the CLASSPATH, and either the ons.jar file must be present in the
CLASSPATH or an Oracle Notification Services (ONS) client must be installed and running in
the client system. To use ONS on the client side, you must configure all the RAC nodes in the
ONS configuration file. A sample configuration file might look like the one shown in the slide.
After configuring ONS, you start the ONS daemon with the onsctl start command. It is
your responsibility to make sure that an ONS daemon is running at all times. You can check
that the ONS daemon is active by executing the onsctl ping command.
Note: With Oracle Database 10g Release 2 and later, there is no requirement to use ONS
daemons on the mid-tier when using the Oracle Universal Connection Pool. To configure this
option, use either the OracleDataSource property or a setter API setONSConfiguration
(configStr). The input to this API is the contents of the ons.config file specified as a
string. The ons.jar file must be on the clients CLASSPATH. There are no daemons to start
or manage.
Service Mid-tier1
Service or node
UP event ONS
DOWN event
UCP JDBC
Event
handler
Connections Connections
reconnected Connection Cache marked down &
s a
cleaned up
) ha
Connections Connections om
using Listeners usingysc e
service names service i s
n names u i d
Connections r
b en u t G
load balancing
t o @ ud
ONS en ONSSt
s c im this
Node1 n a use Noden
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
Oracleo n
Universal n fe Pool (UCP) provides a tight integration with Oracle RAC
E Connection
s
e
database
v n - tra like Fast Connection Failover (FCF). Basically, FCF is a FAN client
rt features
no through the connection pool. FCF quickly and automatically recovers lost or
Eimplemented
damaged connections. This automatic connection management results from FAN events
received by the local ONS daemon, or by a remote ONS if a local one is not used, and
handled by a special event handler thread. Both JDBC thin and JDBC OCI drivers are
supported.
Therefore, if UCP and FCF are enabled, your Java program automatically becomes an ONS
subscriber without having to manage FAN events directly.
Whenever a service or node down event is received by the mid-tier ONS, the event handler
automatically marks the corresponding connections as down and cleans them up. This
prevents applications that request connections from the cache from receiving invalid or bad
connections.
Whenever a service up event is received by the mid-tier ONS, the event handler recycles
some unused connections, and reconnects them using the event service name. The number
of recycled connections is automatically determined by the connection cache. Because the
listeners perform connection load balancing, this automatically rebalances the connections
across the preferred instances of the service without waiting for connection requests or
retries.
For more information see Oracle Universal Connection Pool for JDBC Developers Guide.
Note: Similarly, ODP.NET also allows you to use FCF using AQ for FAN notifications.
ton e to
reason code: user
e r
v ens
( e
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E Clusters
n s fe publish FAN events to a system alert queue in the database using
e o
Real Application
rt StreamstraAdvanced Queuing (AQ). ODP.NET and OCI client integration uses this
v
Oracle n -
Emethodntoosubscribe to FAN events.
To have FAN events for a service posted to that alert queue, the notification must be turned
on for the service using either the DBMS_SERVICE PL/SQL package as shown in the slide, or
by using the Enterprise Manager interface.
To view FAN events that are published, you can use the DBA_OUTSTANDING_ALERTS or
DBA_ALERT_HISTORY views. An example using DBA_OUTSTANDING_ALERTS is shown in
the slide.
Connection Cache
10%
?
s a
60%
30%
)h a
m
co
s
u n isy uide
b r nt G
RAC RAC en
to@ Stude RAC
i m
c e th i s
Inst1 CRM is CRM is
n a s
Inst2
s CRM is Inst3
very busy.
o n
not busy.
o u busy.
r t t
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E the nLoad
s feBalancing Advisory, work requests to RAC instances are assigned on
Without
e o using
rt basis, trawhich is suitable when each instance is performing equally well. However, if
avrandom n -
Eone of ntheoinstances becomes more burdened than the others because of the amount of work
resulting from each connection assignment, the random model does not perform optimally.
The Runtime Connection Load Balancing feature provides assignment of connections based
on the Load Balancing Advisory information from the instances in the RAC cluster. The
Connection Cache assigns connections to clients on the basis of a relative number indicating
what percentage of work requests each instance should handle.
In the diagram in the slide, the feedback indicates that the CRM service on Inst1 is so busy
that it should service only 10% of the CRM work requests; Inst2 is so lightly loaded that it
should service 60%; and Inst3 is somewhere in the middle, servicing 30% of requests. Note
that these percentages apply to, and the decision is made on, a per-service basis. In this
example, CRM is the service in question.
Note: Runtime Connection Load Balancing is a feature of Oracle connection pools.
Uses DBMS_SERVICE.GOAL
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
ENQ_TIME USER_DATA
-------- -----------------------------------------------------
04:19:46 SYS$RLBTYP('JFSERV', 'VERSION=1.0 database=xwkE
s a
service=JFSERV { {instance=xwkE2 percent=50
flag=UNKNOWN}{instance=xwkE1 percent=50 flag=UNKNOWN} )ha
m
co
} timestamp=2006-01-02 06:19:46')
s
04:20:16 SYS$RLBTYP('JFSERV', 'VERSION=1.0 database=xwkE
u n isy uide
service=JFSERV { {instance=xwkE2 percent=80
b r nt G
o@ tude
flag=UNKNOWN}{instance=xwkE1 percent=20 flag=UNKNOWN}
} timestamp=2006-01-02 06:20:16') n t
SQL>
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Ethe SQL s e
fquery
You can
r t o use
t r a n shown in the slide to monitor the Load Balancing Advisory FAN
ve foroeach
Eevents - of your services.
n n
2 Application 2 Application
OCI Library 6 OCI Library 6
3 7 3
5 5
s a
)ha
8 m
co
7
AP 3 ERP 3 s
u n is3 y uide
1
7
1
b r nt G
n t o@ tude
AP
c i sS
meERPthiERP_PRECONNECT
n as use 1
t o n t o
e v er nse
n ( 2012,
Copyright l i ceOracle and/or its affiliates. All rights reserved.
r n
to able
e
Ev nsferof the OCI driver. It enables your application to automatically
TAF istoanruntimeafeature
v e r ton-the
reconnect tr service if the initial connection fails. During the reconnection, although your
no
Eactive transactions are rolled back, TAF can optionally resume the execution of a SELECT
statement that was in progress. TAF supports two failover methods:
With the BASIC method, the reconnection is established at failover time. After the
service has been started on the nodes (1), the initial connection (2) is made. The listener
establishes the connection (3), and your application accesses the database (4) until the
connection fails (5) for any reason. Your application then receives an error the next time
it tries to access the database (6). Then, the OCI driver reconnects to the same service
(7), and the next time your application tries to access the database, it transparently uses
the newly created connection (8). TAF can be enabled to receive FAN events for faster
down events detection and failover.
The PRECONNECT method is similar to the BASIC method except that it is during the
initial connection that a shadow connection is also created to anticipate the failover. TAF
guarantees that the shadow connection is always created on the available instances of
your service by using an automatically created and maintained shadow service.
Note: Optionally, you can register TAF callbacks with the OCI layer. These callback functions
are automatically invoked at failover detection and allow you to have some control of the
failover process. For more information, refer to the Oracle Call Interface Programmers Guide.
apsvc =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = cluster01-scan)
(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = apsvc)))
s a
)ha
m
co
$ sqlplus AP/AP@apsvc
s
SQL> select inst_id,username,service_name,failover_type,
u n isy uide
failover_method from gv$session where username='AP';
b r nt G
n t o@ tuFAILOVER_M de
me this S ----------
INST_ID USERNAME SERVICE_NAME FAILOVER_TYPE
------- -------- ------------ c------------- i
1 AP n
apsvcas use SELECT BASIC
n
rto se t o
v e n and/or its affiliates. All rights reserved.
n (e 2012,
Copyright l i c eOracle
r t o n le
e a b
n
v
ETAF, s f er
Before
r t o
using
t r a n recommended that you create and start a service that to be used when
it is
ve onconnections.
Eestablishing - By doing so, you benefit from the integration of TAF and services.
When youn wish to use BASIC TAF with a service, you should use the -P BASIC option when
creating the service. After the service is created, you simply start it on your database. TAF
can be configured at the client side in tnsnames.ora or at the server side using the srvctl
utility as shown above. Configuring it at the server is preferred as it is convenient to put the
configuration in a single place (the server).
Your application needs to connect to the service by using a connection descriptor similar to
the one shown in the slide. In the example above, notice that the cluster SCAN is used in the
descriptor. Once connected, the GV$SESSION view will reflect that the connection is TAF-
enabled. The FAILOVER_METHOD and FAILOVER_TYPE column reflects this and confirms
the TAF configuration is correct.
execute dbms_service.modify_service ( ,-
service_name => 'AP' ,-
aq_ha_notifications => true ,-
failover_method => dbms_service.failover_method_basic ,-
s a
failover_type => dbms_service.failover_type_session
failover_retries => 180, failover_delay => 5
,-
,- )ha
clb_goal => dbms_service.clb_goal_long); m
co
s
u n isy uide
AP =
b r nt G
o@ tude
(DESCRIPTION =(FAILOVER=ON)(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=N1VIP)(PORT=1521)) n t
(ADDRESS=(PROTOCOL=TCP)(HOST=N2VIP)(PORT=1521))
c i me this S
(CONNECT_DATA = (SERVICE_NAME
n as =uAP))) s e
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E 10g s e
fRelease
Oracle
r t o
Database
t r a n 2 supports server-side TAF with FAN. To use server-side TAF,
ve and
Ecreate - your service using SRVCTL, then configure TAF in the RDBMS by using the
start
non package as shown in the slide. When done, make sure that you define a
DBMS_SERVICE
TNS entry for it in your tnsnames.ora file. Note that this TNS name does not need to
specify TAF parameters as with the previous slide.
> -P PRECONNECT
$ srvctl start service -d RACDB -s ERP
ERP =
(DESCRIPTION =(FAILOVER=ON)(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=N1VIP)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=N2VIP)(PORT=1521))
a
has
(CONNECT_DATA = (SERVICE_NAME = ERP)
(FAILOVER_MODE = (BACKUP=ERP_PRECONNECT)
m )
c o
(TYPE=SESSION)(METHOD=PRECONNECT))))
de n i sys ui
ERP_PRECONNECT =
b ru nt G
(DESCRIPTION =(FAILOVER=ON)(LOAD_BALANCE=ON)
t o @ tude
(ADDRESS=(PROTOCOL=TCP)(HOST=N1VIP)(PORT=1521)) n
e is S
c i m th
(ADDRESS=(PROTOCOL=TCP)(HOST=N2VIP)(PORT=1521))
a s e
(CONNECT_DATA = (SERVICE_NAME
o n n o us = ERP_PRECONNECT)))
e r t e t
v
(e 2012, s
n and/or its affiliates. All rights reserved.
eOracle
n n
Copyright l i c
e r t o
a b le
n EvPRECONNECT
s f er TAF, it is recommended that you create a service with preferred
In order
e r to use
an Also, in order for the shadow service to be created and managed
to -tinstances.
r
v
and available
non by Oracle Clusterware, you must define the service with the P PRECONNECT
Eautomatically
option. The shadow service is always named using the format
<service_name>_PRECONNECT.
As with the BASIC method without FAN, you need to use a special connection descriptor to
use the PRECONNECT method while connecting to the service. One such connection
descriptor is shown in the slide.
The main differences with the previous example are that METHOD is set to PRECONNECT and
an addition parameter is added. This parameter is called BACKUP and must be set to another
entry in your tnsnames.ora file that points to the shadow service.
Note: In all cases where TAF cannot use the PRECONNECT method, TAF falls back to the
BASIC method automatically.
FROM v$session
GROUP BY machine, failover_method, failover_type,
failed_over, service_name;
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
RDBMS patchset:
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
In January, 2005, the Critical Patch Update (CPU) became Oracles primary mechanism for
the release of security patches for all its products. CPUs are released on a quarterly basis.
The CPU schedule for the next year is posted on the Critical Patch Updates and Security
Alerts page on Oracle Technology Network (OTN). CPUs are cumulative for many Oracle
products. This means that, for these products, a CPU includes new security fixes as well as
all previously released CPU fixes for this particular platform and version combination. The
main benefit of cumulative CPUs is that they allow customers to quickly and easily catch up
to current security release level by applying only the most recent CPU.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s fe patches can have different methods and utilities for installation.
e o
Depending
rt canon their type,
trbea installed as a rolling patch, with the Oracle Universal Installer (OUI).
v
Patchsets n -
noare installed out-of-place.
EPatchsets
Patch bundles can be installed with either Enterprise Manager (EM) or OPatch. Even EM
Database Control can be used to patch Oracle Clusterware and the RDBMS software. Patch
bundles are installed in-place and most bundles can be installed as a rolling patch, but check
the README.txt file that comes with the patch, or the patch metadata.
One-off patches can only be installed in-place with EM or OPatch. Just like patch bundles,
most one-off patches can be installed as a rolling patch, if they were created to be rolling. If
the patch or patch bundle were not labeled as rolling, it cannot be used in a rolling manner.
Any one-off patch or patch bundle may use the minimum down-time method.
The use of Enterprise Manager to install patches is covered in detail in the Oracle Database 2
Day + Real Application Clusters Guide 11g Release 2.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe of Enterprise Manager, you configure a software library location.
E nsfeatures
To use
e o
rcanthe patching
ra or more library locations. This will be the directory that patches will be
t have-tone
v
You n
Estored ninowhen they are transferred to the local cluster.
To navigate to the Provisioning page from the Database home page:
1. Click the Software and Support tab.
2. In the Deployment Procedure Manager section, click the Deployment and Provisioning
Software Library link.
On the Provisioning page, you will find Software Library Configuration at the bottom of the
page. The software library directory location must reference an existing directory.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s fifethe Enterprise Manager is configured to connect to My Oracle Support
e o
Patching is simplified
tra Available patches can be downloaded and deployed through Enterprise
rt MetaLink).
v
(formerly, n -
noThe Patching Setup page can be accessed by a superuser by using the setup
EManager.
button. The patching configuration can also be supplied during installation.
To complete the patching configuration, you must supply the credentials to connect to My
Oracle Support. This assumes that your cluster has access to the Patch Search URL:
http://updates.oracle.com either directly or through a proxy. The Proxy & Connections
Settings tab allows you to configure the Internet connection.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsand fe recommended BPs can be downloaded from the My Oracle Support
e o
The latest patchsets
t at the
rsite a
trfollowing
v
Web n - URL:
E no http://support.oracle.com/
After signing in to the Web site, click the Patches & Updates tab. For the latest patch sets
and patch bundles, click the Latest Patchsets link under Oracle Servers and Tools. You can
choose from patch sets for product bundles or patch bundles for individual products.
If you know the patchset number, you can click the Number/Name Sun CR ID link. You can
enter a single patch set number or a comma-separated list. Select your platform and click the
Search button.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n e
E listnofsfpatchsets
r o
For a tcomplete
t r a available for your version and platform, click the Product or
ve link.
EFamily o n-
n
After specifying Product, Release, and Platform, click the Search button. The patch search
results are displayed.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe patch sets, start from the Patches & Updates tab and click the
e o
To locate recommended
rt n-traPatch Advisor link. Select Oracle Clusterware from the Product pull-down
v
Recommended
o then select the release number and platform. Click the Search button for a list of
Emenu, nand
recommended patchsets.
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfethe patch you need, you can download it. Click the patch link on the
e o
Once tyou have located
r results ra Locate and click the Download link on the patch summary page, and
tpage.
v
search n -
nothe patch link in the File Download dialog box. Click the Save File button, and then
Ethen click
click OK. Specify the directory location for the file, and then click Save.
s a
)ha
m
co
s
ORACLE HOME Node1 GRID HOME
Node2
Node1
u n isy uide
ORACLE HOME
Node2
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n ERolling n s fe
Installing
e r t o a
t r a Patchset with OUI
-
v mustoinstall
EYou n n the software for the new Oracle Database release before you can perform
the upgrade of Oracle Database. The installation procedure for the new Oracle Database 11g
Release 2 installs the Oracle software into a new Oracle home. This is referred to as an out-
of-place upgrade and is different from patch set releases for earlier releases of Oracle
Database, where the patch set was always installed in place. The new Oracle Database
software is installed using the Oracle Universal Installer. The upgrade process is completed
by the Oracle Database Upgrade Assistant.
commands:
$ export ORACLE_HOME=/u01/app/11.2.0/grid
$ opatch command [options]
or
$ opatch command oh /u01/app/11.2.0/grid [options]
EInvgeneral,
nonORACLE_HOME refers to the home for the product to be patched. The utility
contains help for its syntax by using the help option as follows:
'opatch -help -fmw
'opatch auto -help'
'opatch apply -help'
'opatch lsinventory -help'
'opatch lspatches -help'
'opatch napply -help
'opatch nrollback -help
'opatch rollback -help'
'opatch prereq -help
In general, BPs and MLR patches can be applied in a rolling fashionthat is, one node at a
time. However, it is still important to check each patch for exceptions to this rule. To verify that
a patch supports rolling applications, unzip the downloaded patch into a directory of your
choosing and, from that directory, issue the following command:
$ORACLE_HOME/OPatch/opatch query -is_rolling_patch <patch_location>
To roll back the patch from the Oracle RAC database home:
# opatch auto <UNZIPPED_PATCH_LOCATION> -oh <path to RAC database
home> -rollback -ocmrf <ocm_response_file>
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
Answer:
e o a, c
rt n-tra
v
EIn
no11g Release 2, the Oracle Universal Installer or Enterprise Manager Database
Oracle
Console can be used.
The practices for this lesson covers using OPatch to patch your
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
e r
v ens
( e
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
Executingn E nsfeconfig database command displays Oracle RAC One Node
the srvctl
e o tra
rt configuration
v
database n - data. The data in the output specific to Oracle RAC One Node
EincludesnoType, Online relocation timeout, and candidate servers. As you can see in the
example in the slide, the RAC One Node database orcl can run on host01 or host02 and the
online relocation timeout value is 30 minutes.
Executing the srvctl config database command without the d option returns a list of
all databases that are registered with Oracle Clusterware.
Client connections
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
)ha
m
co
Shared s
storage
u n isy uide
b r nt G
n t o@ tude
Single
c i me this S
n as use
cluster
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s fe in the slide, you have five single-instance Oracle RAC One Node
E configuration
e o
In thetexample
tra in a cluster of three servers. Server 1 is hosting Oracle RAC One Node
r nrunning
v
databases -
no DB-A (database A) and DB-B (database B), server 2 is hosting database DB-C
Edatabases
(database C) and server 3 is hosting databases DB-D (database D) and DB-E (database E).
Each server runs one OS. In servers 1 and 3, multiple databases are consolidated onto a
single OS. This deployment itself provides many consolidation benefits. However, online
database relocation, a unique feature of Oracle RAC One Node that provides live migration of
databases across nodes in the cluster, enables many additional benefits.
Client connections
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
)ha
m
co
Shared s
storage
u n isy uide
b r nt G
n t o@ tude
Single
c i me this S
n as use
cluster
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
Onlineto n
database n fe allows an online migration of a database from one server to
E relocation
s
e r server.- a database relocation leverages the ability of Oracle Real Application
trOnline
v
another n
EClustersnoto simultaneously run multiple instances servicing a single database. In the figure in
the slide, the database B RAC One Node database on server 1 is migrated to server 2. Oracle
RAC One Node starts up a second DB-B instance on server 2, and for a short period of time
runs in an active-active configuration.
As connections complete their transactions on server 1, they are migrated to the instance on
server 2.
Client connections
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
)ha
m
co
Shared s
storage
u n isy uide
b r nt G
n t o@ tude
Single
c i me this S
n as use
cluster
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe have migrated to the database B instance on server 2, the instance
e o
Once tall the connections
ra down and the migration is complete. To sum up, you have migrated
r 1nis-tshut
v
on server
noB from server 1 to server 2 while the database was online and performing work. To
Edatabase
extend the example, you could initiate an operating system upgrade or patch including a
reboot of server 1 by simply migrating database A (DB-A).
Client connections
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Patch
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s fe
E administrators
RAC One
r t o Node
t r a can online migrate the databases off the server to a spare
ve and
Eserver, - perform all types of maintenance on the idle server, including hardware
then
non OS upgrades, OS patches, and database patches. With online database
maintenance,
relocation, a new database instance is created on a new server (running in a different
operating system), and work is online migrated to the new instance. Thus, the old operating
system and database home remain on the former host server, and can be upgraded (OS) or
patched (DB).
Lets continue with our deployment example from the previous slide. The illustration in the
slide depicts a RAC One Node deployment after using online database relocation to move
database B from server 1 to server 2. After the migration, the database binaries that had
hosted the instance formerly running on server 1 remain available for patching.
s a
)ha
m
co
Shared s
storage
u n isy uide
b r nt G
n t o@ tude
Single
c i me this S
n as use
cluster
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsbinariesfe on server 1 have been patched, database B can be migrated via
e o
Once tthe database
r databasetrarelocation back to server 1. Because online database relocation supports
v
online n -
nobetween instances at different patch levels, the operation is completely online and
Emigration
requires no disruption to end users. In this case, the online database migration migrates the
connections back to server 1, then the instance on server 2 is shut down, completing the
migration. Similarly, online database relocation can be used to move all databases off a node
in preparation for an online operating system upgrade.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
Answer:
e o a
rt n-tra
v
no answer is True.
E correct
The
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Lesson Objectives
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s fe releases, you could use services for workload management and
e o
In previous
rt For Oracle Database
tra a group of servers might be dedicated to data warehouse work, while
v
isolation. n -example,
Eanothernisodedicated to your sales application, a third group is used for ERP processing, and a
fourth group to a custom application. Using services, the database administrator can allocate
resources to specific workloads by manually changing the number of servers on which a
database service is allowed to run. The workloads are isolated from each other, so that
demand spikes, failures and other problems in one workload do not affect the other
workloads. The problem with this type of deployment is that each workload needs to be
separately provisioned for peak demand because resources are not shared.
You could also define services that shared resources by overlapping server allocations.
However, even with this capability, you had to manually manage the server allocations and
each service was mapped to a fixed group of servers.
Starting with Oracle Database 11g, you can use server pools to logically partition a cluster
and provide workload isolation. Server pools provide a more dynamic and business-focused
way of allocating resources because resource allocations are not dependant on which servers
are up. Rather, the server pool allocations dynamically adjust when servers enter and leave
the cluster to best meet the priorities defined in the server pool policy definitions.
)ha
Classes Business Rankings
m
co
Server Pool Allocations
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n
Implement
asanduControl s e
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E are s e
fconsolidating
r o
Manytcompanies
t r a n and standardizing their data center computer systems. In
ve with
Eparallel - the migration of applications to the Internet has introduced the problem of
nthis,
nodemand
managing surges that cannot be fully anticipated. In this type of environment, it is
necessary to pool resources and have management tools that can detect and resolve
bottlenecks in real time. Policy-managed server pools provide a foundation for dynamic
workload management. However, they can only adjust resource allocations in response to
server availability changes.
QoS Management is an automated, policy-based workload management (WLM) system that
monitors and adjusts the environment to meet business level performance objectives. Based
on resource availability and workload demands, QoS Management identifies resource
bottlenecks and provides recommendations for how to relieve them. It can make
recommendations for the system administrator to move a server from one server pool to
another, or to adjust access to CPU resources using the Database Resource Manager, in
order to satisfy the current performance objectives. Using QoS Management enables the
administrator to ensure the following:
When sufficient resources are available to meet the demand, business level
performance objectives for each workload are met, even if the workloads change.
When sufficient resources are not available to meet all demands, QoS Management
attempts to satisfy more critical business objectives at the expense of less critical ones.
Pools n
Server isAfter HoursuPolicy
Weekend
Policy-Driven
u id
The first step along the road r
bArchitecture
n G
t Policy
Business Hours
@ e
towards a broader solution tud
nto Performance
Performance Objectives
me this S
Classes Business Rankings
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfofe QoS Management is as a feature of the Oracle Database product
e o
The initial incarnation
tra with Oracle Real Application Clusters (RAC) software. It was first
rtin association
v
family n -
E no
introduced in Oracle Database 11g release 2.
The initial set of features and benefits associated with QoS Management are exclusively
available to Exadata Database Machine customers and are best suited to customers using
Database Machine predominantly as a consolidation platform for OLTP applications.
QoS Management software can operate on non-Exadata environments where Oracle
Database 11g release 2 is available. Commencing with version 11.2.0.3, a subset of QoS
Management functionality has been released that enables non-Exadata users to monitor
performance classes, but not to generate and implement changes in response to the currently
observed workload.
In its current form, QoS Management provides a powerful database-focused capability that
represents the first step along the road towards a broader workload management solution.
Code Development
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
or runaway workloads. Running out of memory can result in failed transactions or, in extreme
cases, a reboot of the server and loss of valuable resources for your applications. QoS
Management eases memory pressure by temporarily shutting down the services for database
instances on a server suffering from memory stress. This causes new sessions to be directed
to lighter loaded servers. Rerouting new sessions protects the existing workloads and the
availability of the memory-stressed server.
When QoS Management is enabled and managing an Oracle Clusterware server pool, it
receives a metrics stream from Cluster Health Monitor that provides real-time information
s a
ha
about memory resources for a server, including the amount of available memory, the amount
)
o m
of memory currently in use, and the amount of memory swapped to disk for each server. If
s c e
QoS Management determines that a node is under memory stress, the Oracle Clusterware
y
n is uid
managed database services are stopped on that node preventing new connections from being
u
b r n t G
created. After the memory stress is relieved, the services are restarted automatically and the
t o@ tude
listener can send new connections to the server. The memory pressure can be relieved in
n
c i me this S
several ways (for example, by closing existing sessions or by user intervention).
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Maintenance Policy
Weekend Policy
Server
Pools After Hours Policy
Business Hours Policy a
ha s
m )
Performance Objectives o
c e
Performance y s
u n is uid
Classes Business
b r Rankings
t G
n
n t o@ tude
meServer i s S Allocations
Pool
c i h
n as use t
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E ninsQoS fe Management is the policy set. A policy set allows you to specify
A central
e t o concept
rresources, traperformance classes (workloads), and a collection of performance policies
v
your n -
no the performance objective for each performance class and sets constraints for
Ethat specify
resource availability. QoS Management uses a system-wide policy set that defines
performance objectives based upon the classes of work and the availability of resources.
Specific performance policies can be enabled based upon a calendar schedule, maintenance
windows, events, and so on. Only one performance policy can be in effect at any time.
To maintain the current performance objectives, QoS Management makes resource
reallocation recommendations and predicts their effect. The recommendations can be easily
implemented with a single button click.
A policy set consists of the following:
The server pools that are being managed by QoS Management
Performance classes, which are work requests with similar performance objectives
Performance policies, which describe how resources should be allocated to the
performance classes by using performance objectives and server pool directive
overrides. Within a performance policy, performance objectives are ranked based on
business importance, which enables QoS Management to focus on specific objectives
when the policy is active.
ERP HR Batch
Service Service Service
SALES Service
s a
)h a
m
Online Server Pool (SP) BackOffice SP Batchy s
SP
co Free
e SP
Min=3, Max=4, Min=2, Max=2, i s i d
n Max=1,Gu Min=0,
Min=1,
Importance=30 Importance=20 r
b ent u
Importance=10 Imp=0
@ tud
SALES Database APPS
e nto Database S
s c im this
Oracle
n a Clusterware
u s e
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n s fe division of a cluster. Server pools facilitate workload isolation within
E is a nlogical
e o
A server pool
rt while a
trmaintaining
avcluster n - agility and allowing users to derive other benefits associated with
no Administrators can define server pools, which are typically associated with
Econsolidation.
different applications and workloads. An example is illustrated in the slide. QoS Management
can assist in managing the size of each server pool and also by managing the allocation of
resources within a server pool.
When Oracle Grid Infrastructure is first installed, a default server pool, called the Free pool, is
created. All servers are initially placed in this server pool. Specific server pools can then be
created for each of the workloads that needs to be managed. When a new server pool is
created, the servers assigned to that server pool are automatically moved out of the Free pool
and placed into the newly created server pool.
After a server pool is created, a database can be configured to run on the server pool, and
cluster-managed services can be established for applications to connect to the database.
For an Oracle RAC database to take advantage of the flexibility of server pools, the database
must be created using the policy-managed deployment option, which places the database in
one or more server pools.
servers in the Free pool and another server pool falls below its maximum value, a free server
is allocated to the affected server pool. If there are no free servers, then server reallocation
takes place only if a server pool falls below its minimum level. If that occurs, a server will be
sourced from one of the following locations in the following order:
1. The server pool with the lowest importance that has more than its minimum number of
servers
2. The server pool with the lowest importance that has at least one server and has lower
importance than the affected server pool s a
) ha
Using these mechanisms, server pools can maintain an optimal level of resources based on
o m
the current number of servers that are available.
y s c e
u n is uid
Consider the example shown in the slide. If one of the servers in the Online server pool failed,
b r n t G
the server currently residing in the Free server pool would automatically move to the Online
server pool.
n t o@ tude
Now, if one of the servers from the BackOffice server pool failed, there would be no servers to
i me this S
allocate from the Free server pool. In this case, the server currently servicing the Batch server
c
n as use
pool would be dynamically reallocated to the BackOffice server pool, because the failure
e r ton e to
would cause the BackOffice server pool to fall below its minimum and it has a higher
( e v ens
importance than the Batch server.
o n n e lic
If one node is later returned to the cluster, it will be allocated to the Batch pool in order to
e r t a b l
satisfy the minimum for that server pool.
Ev nsfer
Any additional nodes added to the cluster after this point will be added to the Free pool,
n
e r to -tra
because all the other pools are filled to their maximum level.
Ev non
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe
Evariousnsperformance
To manage
r t o t r a objectives, a QoS Management administrator defines one or
ve performance
Emore - policies. For example, the administrator might define a performance policy
nonbusiness hours, another for weekday non-business hours, one for weekend
for normal
operations, and another to be used during processing for the quarter-end financial closing.
Note that at any time, only one performance policy is in effect.
A performance policy has a collection of performance objectives in effect; one or more for
each application that is being managed on the system. Some performance objectives are
always more critical to the business than others, while other performance objectives might be
more critical at certain times, and less critical at other times. The ability to define multiple
performance policies inside the policy set provides QoS Management with the flexibility
required to implement different priority schemes when they are required.
They specify:
A business requirement
The performance class to which the business requirement
applies
Average response time per database call is currently the
only performance objective type. a
a s
Response time is the total time from the time the database
m )h
receives the request to when the response leaves the co server.
Response time does not include network traffic i s ytime. ide
s
r u n Gu
@ b ent
e nto Stud
s c im this
n a use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s fe objective for each performance class to specify the desired
e o
You create a performance
tra for that performance class. A performance objective specifies both a
rt n-level
v
performance
norequirement, and the work to which it applies (the performance class). For example,
Ebusiness
a performance objective might say that database work requests that use the SALES service
should have an average response time of less than 60 milliseconds.
Each performance policy includes a performance objective for each and every performance
class, unless the performance class is marked measure-only. In this release, QoS supports
only one type of performance objective, average response time.
Response time is based upon database client calls from the point that the database server
receives the request over the network until the request leaves the server. Response time
does not include the time it takes to send the information over the network to or from the
client. The response time for all database client calls in a performance class is averaged and
presented as the average response time.
100%
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me thi-100% sS
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfeobjectives are used to measure the performance of different workloads.
e t o
Different performance
rManagementtra currently supports only OLTP workloads and uses only the average
v
QoS n -
Eresponsenotime performance objective. When configuring QoS Management, you can have
very different performance objectives for each performance class. For example, one
performance objective may specify that a Checkout call should complete within 1 millisecond,
while another performance objective may specify that a Browse call should complete within 1
second. As more performance objectives are added to a system, it can be difficult to compare
them quickly.
Because of this, it is useful to have a common and consistent numeric measure indicating
how the current workload for a performance class is measuring up against its current
performance objective. This numeric measure is called the Performance Satisfaction Metric.
The Performance Satisfaction Metric is thus a normalized numeric value (between +100%
and -100%) that indicates how well a particular performance objective is being met, and which
allows QoS Management to compare the performance of the system for widely differing
performance objectives.
s a
)ha
Batch SP o m
Online SP Back Office SP
y s c e
End Of Quarter Policy
u n is uid
b r n t G
n t o@ tude
c i me this S
n a s se
Online SP
o
n Back Office
o uSP Batch SP
r t t
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E policy s e
fcan
r t o
A performance
t r a n also include a set of server pool directive overrides. A server pool
ve ooverride
Edirective - sets the minimum server count, maximum server count, and importance
n forn a server pool when the performance policy is in effect. Server pool directive
attributes
overrides serve as constraints on the recommendations proposed by QoS Management,
because the server pool directive overrides are honored while the performance policy is
active. For example, QoS Management will never recommend moving a server out of a server
pool if doing so will leave the server pool below its minimum server count value.
Server pool directive overrides can be used to define the normal state of server pools at
different points in time. The slide illustrates an example. Under normal conditions, these
server pool settings would be expected to handle the prevailing workload. If there is a sudden
increase in the workload requests for a performance class, then the associated server pool
might require additional resources beyond what is specified in the performance policy.
performance objective, the bottleneck for that performance class is the resource that
contributes the largest average wait time for each work request in that performance class.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
Server Manager
Oracle
Policy Set
Wizard
Oracle
Clusterware Policy Engine s a
11.2 SRVM
Performance
History)ha
Oracle Business Rules
m
co&
s
Operating u n isyActions
Alerts
u ide
System b r nt G
CHM Persistence@
Manager n t o t u de
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n s fe metrics data from each database instance running in managed
E nretrieves
e o
QoS Management
tracorrelates the data by performance class every 5 seconds. The data
rt poolsn-and
v
server
Eincludesnomany metrics; for example, call arrival rate and CPU, I/O and Global Cache use, and
wait times. The data is combined with the current topology of the cluster and the health of the
servers in the Policy Engine to determine the overall performance profile of the system with
regard to the current performance objectives established by the active performance policy.
The performance evaluation occurs once a minute and results in a recommendation if there is
a performance class not meeting its objective. The recommendation specifies what resource
is bottlenecked. Specific corrective actions are included, if possible, along with the projected
impact on all performance classes in the system. The slide shows the collection of data from
various data sources by the data connectors component of QoS Management:
Oracle RAC 11.2 communicates with the data connector using JDBC.
Oracle Clusterware 11.2 communicates with the data connector using the SRVM
component of Oracle Clusterware.
The server operating system communicates with the data connector using Cluster
Health Monitor (CHM).
Enterprise Manager displays the information in a variety of ways (for example, on the
Management Dashboard, Policy Set Wizard, Performance History, and Alerts and Actions
pages).
demands.
@ tudeb
Moving CPUs between databases n t owithin
i m e is S a server pool
Reprioritize CPU resources s c within e h
texisting server pool
boundaries. n a u s
r t o n t o
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
If yourto n
business n fe periodic demand surges, then to retain performance levels for
E experiences
s
v
youre n - trayou can acquire additional hardware to be available when needed, and sit
rapplications
nonot needed. Rather than have extra servers sit idle for most of the time, you might
Eidle when
decide to use those servers to run other application workloads. However, if the servers are
busy running other applications when a demand surge hits, your main business applications
are not able to perform as expected. QoS Management helps to manage such situations.
When you implement a performance policy, QoS Management continuously monitors the
system and manages it using an iterative process. When one or more performance objectives
are not being met, each iteration seeks to improve the performance of a single performance
objective; the highest ranked performance objective that is currently not being met. When all
performance objectives are being met, QoS Management makes no further
recommendations.
The recommendations take the form of moving servers between server pools, changing
consumer group mappings, or moving CPUs between databases within a server pool.
Changing consumer group mappings may involve promoting a specific workload so that it
gets a greater share of resources, or it may involve demoting a competing workload as a way
of making additional resources available to the target performance class. In both cases,
workloads are reprioritized within existing resource boundaries.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s fe is working to improve the performance of a particular performance
e o
WhentQoS Management
tra to add more of the bottleneck resource (such as CPU time) for that
r it recommends
v
class, n -
no class, or to make the bottleneck resource available more quickly to work
Eperformance
requests in the performance class.
Implementing a recommendation makes the resource less available to other performance
classes. The negative impact on the performance classes from which the resource is taken
may be significantly smaller than the positive impact on the service that is getting better
access, resulting in a net win for the system as a whole. Alternatively, the performance class
being penalized may be less business critical than the one being helped.
When generating recommendations, QoS Management evaluates the impact to the system
performance as a whole. If the improvement for one performance class is rather small, but the
negative impact on another performance class is large, then QoS Management might report
that the performance gain is too small, and not recommended. If there is more than one way
to resolve the bottleneck, then QoS Management advises the best overall recommendation
factoring in variables such as the calculated impact on all the performance classes along with
the predicted disruption and settling time associated with the action. Using Oracle Enterprise
Manager, you can view the current recommendation and the alternative recommendations.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
Answer:
e o b
rt n-tra
E v
Oracle o
nDatabase of Service Management helps to meet performance objectives by managing
and reducing resource wait times, not resource usage.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nsfe
e o
rt n-tra
v
E no
Objectives
Tape u n is uid
b r n t G
Controllers
n t o@ tude
Network
c i me this S
Powernn
as use
e r to e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n n s fe in designing a highly available solution is examining and
E challenges
One of
e o
the true
ra possible causes of down time. It is important to consider causes of both
rt nall-tthe
v
addressing
no and planned down time. The diagram in the slide, which is a taxonomy of
Eunplanned
unplanned failures, classifies failures as software failures, hardware failures, human error,
and disasters. Under each category heading is a list of possible causes of failures related to
that category.
Software failures include operating system, database, middleware, application, and network
failures. A failure of any one of these components can cause a system fault.
Hardware failures include system, peripheral, network, and power failures.
Human error, which is a leading cause of failures, includes errors by an operator, user,
database administrator, or system administrator. Another type of human error that can cause
unplanned down time is sabotage.
The final category is disasters. Although infrequent, these can have extreme impacts on
enterprises, because of their prolonged effect on operations. Possible causes of disasters
include fires, floods, earthquakes, power failures, and bombings. A well-designed high-
availability solution accounts for all these factors in preventing unplanned down time.
RMAN backup/recovery
Fast-Start
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
RAC
Fault Recovery
Data Guard
ASM
Streams
System
failures Flashback
Unplanned
down time
Data HARD
failures
Data Guard s a
& ) ha
Streams o m
Rolling upgrades/
y s c e
System Online patching
u n is uid
changes
Dynamic provisioning b r n t G
Planned
down time n t o@ tude
Data c i me this S
changes na
s Online s e redefinition
u
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s feis primarily the result of computer failures or data failures. Planned
e o
Unplanned down time
tra due to data changes or system changes:
rttime nis-primarily
v
down
E RAC no provides optimal performance, scalability, and availability gains.
Fast-Start Fault Recovery enables you to bound the crash/recovery time. The database
self-tunes checkpoint processing to safeguard the desired recovery time objective.
ASM provides a higher level of availability using online provisioning of storage.
Flashback provides a quick resolution to human errors.
Oracle Hardware Assisted Resilient Data (HARD) is a comprehensive program
designed to prevent data corruptions before they happen.
Recovery Manager (RMAN) automates database backup and recovery.
Data Guard must be the foundation of any Oracle database disaster-recovery plan.
The increased flexibility and capability of Streams over Data Guard with SQL Apply
requires more expense and expertise to maintain an integrated high availability solution.
With online redefinition, the Oracle database supports many maintenance operations
without disrupting database operations, or users updating or accessing data.
Oracle Database continues to broaden support for dynamic reconfiguration, enabling it
to adapt to changes in demand and hardware with no disruption of service.
Oracle Database supports the application of patches to the nodes of a RAC system, as
well as database software upgrades, in a rolling fashion.
Oracle Database 11g: RAC Administration 13 - 5
RAC and Data Guard Complementarity
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Nodes RAC
Component
Instances failure RAC
Software failure s a
)ha
Human m
error
Data Guard
s co
Data
Environment
u n isy& uide
b r nt G
Flashback
n t o@ tude
i m e is S Data Guard
Site
a s c e th &
o n n o us Streams
t
er nse t
e v
( 2012,
n n
Copyright l i ceOracle and/or its affiliates. All rights reserved.
e r to able
n EvGuard s f er
RAC and
r t o Data
t r a n together provide the benefits of system-level, site-level, and data-level
ve onresulting
Eprotection, - in high levels of availability and disaster recovery without loss of data.
n
RAC addresses system failures by providing rapid and automatic recovery from failures,
such as node failures and instance crashes.
Data Guard addresses site failures and data protection through transactionally
consistent primary and standby databases that do not share disks, enabling recovery
from site disasters and data corruption.
Note: Unlike Data Guard using SQL Apply, Oracle Streams enables updates on the replica
and provides support for heterogeneous platforms with different database releases.
Therefore, Oracle Streams may provide the fastest approach for database upgrades and
platform migration.
Clients
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Oracle Oracle
Application Application
Server Server
WAN Traffic
Manager
Real-time query
s a
) ha
Primary o
Secondary m
site Data Guard y s c e
site
u n is uid
b r n t G
n t o@ tude
RAC c i me this S RAC databases:
database n as use Phys&log standby
t o n t o
e v er nse
n ( 2012,
Copyright l i ceOracle and/or its affiliates. All rights reserved.
r n
to able
e
EvGuard er the basis for the database MAA solution. MAA provides the
n s f
RAC and
e
most r to -tran architecture for reducing down time for scheduled outages and
Data
comprehensive
provide
v
nondetecting, and recovering from unscheduled outages. The recommended MAA
Epreventing,
has two identical sites. The primary site contains the RAC database, and the secondary site
contains both a physical standby database and a logical standby database on RAC. Identical
site configuration is recommended to ensure that performance is not sacrificed after a failover
or switchover. Symmetric sites also enable processes and procedures to be kept the same
between sites, making operational tasks easier to maintain and execute.
The graphic illustrates identically configured sites. Each site consists of redundant
components and redundant routing mechanisms, so that requests are always serviceable
even in the event of a failure. Most outages are resolved locally. Client requests are always
routed to the site playing the production role.
After a failover or switchover operation occurs due to a serious outage, client requests are
routed to another site that assumes the production role. Each site contains a set of application
servers or mid-tier servers. The site playing the production role contains a production
database using RAC to protect from host and instance failures. The site playing the standby
role contains one standby database, and one logical standby database managed by Data
Guard. Data Guard switchover and failover functions allow the roles to be traded between
sites.
ARCn
ARCn LGWR RFS
Flash
Primary recovery
database Standby area
Online redo
redo files s a
files Standby )ha
Flash m
recovery databaseco
area LGWR RFS i s ys ide
r u n Gu
b Apply e n t
@ tud
ARCn
e nto ARCn S
s c im this
Primary instance B n a usStandby e apply instance D
n
rto se t o
v e n and/or its affiliates. All rights reserved.
n (e 2012,
Copyright l i c eOracle
r t o n le
e a b
n
v
Eperfectly s f er
Although
r t o it is
t r a n possible to use a RAC to single-instance Data Guard (DG)
ve on- you also have the possibility to use a RAC-to-RAC DG configuration. In this
Econfiguration,
mode, n although multiple standby instances can receive redo from the primary database, only
one standby instance can apply the redo stream generated by the primary instances.
A RAC-to-RAC DG configuration can be set up in different ways, and the slide shows you one
possibility with a symmetric configuration where each primary instance sends its redo stream
to a corresponding standby instance using standby redo log files. It is also possible for each
primary instance to send its redo stream to only one standby instance that can also apply this
stream to the standby database. However, you can get performance benefits by using the
configuration shown in the slide. For example, assume that the redo generation rate on the
primary is too great for a single receiving instance on the standby side to handle. Suppose
further that the primary database is using the SYNC redo transport mode. If a single receiving
instance on the standby cannot keep up with the primary, then the primarys progress is going
to be throttled by the standby. If the load is spread across multiple receiving instances on the
standby, then this is less likely to occur.
If the standby can keep up with the primary, another approach is to use only one standby
instance to receive and apply the complete redo stream. For example, you can set up the
primary instances to remotely archive to the same Oracle Net service name.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
standby database:
Triggered by failure of site, hosts, storage, data file offline
immediate, or network
Works with and supplements RAC server failover
Failover occurs in seconds (< 20 seconds).
Comparable to cluster failover a
a s
The original production site automatically rejoins the ) h
configuration after recovery. c om
i s ys ide
Automatically monitored by an Observerrprocess: u n Gu
bdata ecenter
n t
Located on a distinct server in a distinct @
to Stud
e n
Can be restarted on failure iby
c m Enterprise t h is Manager
Installed through Oracle n s
a Client s e
Administrator
u
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
Fast-Startn E s
Failovernis
faefeature that automatically, quickly, and reliably fails over to a
e o tra
rt nsynchronized
designated,
v o -
Ewithoutnrequiring
standby database in the event of loss of the primary database,
manual intervention to execute the failover. In addition, following a fast-start
failover, the original primary database is automatically reconfigured as a new standby
database upon reconnection to the configuration. This enables Data Guard to restore disaster
protection in the configuration as soon as possible.
Fast-Start Failover is used in a Data Guard configuration under the control of the Data Guard
Broker, and may be managed using either dgmgrl or Oracle Enterprise Manager Grid
Control. There are three essential participants in a Fast-Start Failover configuration:
The primary database, which can be a RAC database
A target standby database, which becomes the new primary database following a fast-
start failover
The Fast-Start Failover Observer, which is a separate process incorporated into the
dgmgrl client that continuously monitors the primary database and the target standby
database for possible failure conditions. The underlying rule is that out of these three
participants, whichever two can communicate with each other will determine the
outcome of the fast-start failover. In addition, a fast-start failover can occur only if there
is a guarantee that no data will be lost.
Observer system. If Enterprise Manager is used, also install the Enterprise Manager Agent on
the Observer system.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non
*.DG_BROKER_CONFIG_FILE1=+DG1/orcl/dr1config.dat
*.DG_BROKER_CONFIG_FILE2=+DG1/orcl/dr2config.dat
orcl1 orcl2
s a
)ha
m
co
s
Shared storage u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Eof thenData
s feGuard Broker (DGB) configuration files are maintained for each
e o
Two copies
rt son-astrato always have a record of the last-known valid state of the configuration.
v
database
nobroker is started for the first time, the configuration files are automatically created
EWhen the
and named using a default path name and file name that is operating systemspecific.
When using a RAC environment, the DGB configuration files must be shared by all instances
of the same database. You can override the default path name and file name by setting the
following initialization parameters for that database: DG_BROKER_CONFIG_FILE1,
DG_BROKER_CONFIG_FILE2.
You have two possible options to share those files:
Cluster file system
ASM
The example in the slide illustrates a case where those files are stored in an ASM disk group
called DG1. It is assumed that you have already created a directory called orcl in DG1.
Primary Standby
Redo apply
cluster cluster
s a
Redo apply
instance
)ha
m
co
s
RAC RAC
u n isy uide
database database
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n ERedonApply
s fe (physical standby database) has proven to be a popular solution for
e o
Data Guard
tradue to its relative simplicity, high performance, and superior level of data
rt recovery
v
disaster n -
no Beginning with Oracle Database 11g, a physical standby database can be open
Eprotection.
read-only while redo apply is active. This means that you can run queries and reports against
an up-to-date physical standby database without compromising data protection or extending
recovery time in the event a failover is required. This makes every physical standby database
able to support productive uses even while in standby role. To enable real-time query, open
the database in read-only mode and then issue the ALTER DATABASE RECOVER MANAGED
STANDBY statement. Real-time query provides the ultimate high availability solution because it:
Is totally transparent to applications
Supports Oracle RAC on the primary and standby databases: Although Redo Apply can
be running on only one Oracle RAC instance, you can have all of the instances running
in read-only mode while Redo Apply is running on one instance.
Returns transactionally consistent results that are very close to being up-to-date with the
primary database.
Enables you to use fast-start failover to allow for automatic fast failover in the case the
primary database fails
A. ASM mirroring
B. Hardware RAID 1 (mirroring)
C. Hardware RAID 5 (parity protection)
D. Both ASM mirroring and hardware RAID
s a
)ha
m
co
s
u n isy uide
b r nt G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E nthe s festorage array hardware RAID-1 mirroring protection when possible to
e o
Basically, leverage
tra overhead from the server. Use ASM mirroring in the absence of a
rt thenmirroring
v
offload -
noRAID capability.
Ehardware
However, hardware RAID 1 in most Advanced Technology Attachment (ATA) storage
technologies is inefficient and degrades the performance of the array even more. Using ASM
redundancy has proven to deliver much better performance in ATA arrays.
Because the storage cost can grow very rapidly whenever you want to achieve extended
clustering solutions, ASM mirroring should be used as an alternative to hardware mirroring for
low-cost storage solutions.
s a
Answer: A and B ) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
ASM and RAID stripingmare e complementary.
i s S
c i h
n as use t
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Ethe slide,
n s feyou can use only ASM striping, or you can use ASM striping in
e o
As shown in
rt n-withtraRAID 0.
v
combination
no 0, multiple disks are configured together as a set, or a bank, and data from any
EWith RAID
one data file is spread, or striped, across all the disks in the bank.
Combining both ASM striping and RAID striping is called stripe-on-stripe. This combination
offers good performance too.
However, there is no longer a need to use a Logical Volume Manager (LVM) for your
database files, nor is it recommended to not use any striping at all.
Pros: Cons:
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Drives evenly distributed for Data & FRA Not well balanced across
Higher bandwidth ALL disks
Allows small incremental growth (73 GB) LUN size limited to disk size
No drive contention
Oracle DB size: 1 TB
Data DG FRA DG
Storage configuration:
1 TB 1673 GB 8arrays with 2 TB 3273 GB s a
LUNs 1273 GB disks per array LUNs
)ha
m
co
s
u n isy uide
b r nt G
o@ tude
RAID 1
n t
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s fe slide, you want to store a one-terabyte database with a
e o
In thetcase shown
a in
r n-trtwo-terabytethis
v
corresponding flash recovery area. You use RAID 1 to mirror each disk. In total,
Eyou havenoeight arrays of twelve disks, with each disk being 73 GB. ASM mirroring and
hardware RAID 0 are not used.
In addition, each ASM disk is represented by one entire LUN of 73 GB. This means that the
Data disk group (DG) is allocated 16 LUNs of 73 GB each.
On the other side, the Fast Recovery Area disk group is assigned 32 LUNs of 73 GB each.
This configuration enables you to evenly distribute disks for your data and backups, achieving
good performance and allowing you to manage your storage in small incremental chunks.
However, using a restricted number of disks in your pool does not balance your data well
across all your disks. In addition, you have many LUNs to manage at the storage level.
Pros: Cons:
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Oracle DB size: 1 TB
Data DG FRA DG
Storage configuration:
1 TB 4250 GB 8arrays with 2 TB 4500 GB s a
LUNs 1273 GB disks per array LUNs
)ha
m
co
s
u n isy uide
b r nt G
RAID 0+1
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s fe slide, you want to store a one-terabyte database with a
e o
In thetcase showna in
r n-trtwo-terabytethis
v
corresponding flash recovery area. You use RAID 0+1, which is a combination of
Ehardwarenostriping and mirroring to mirror and stripe each disk. In total, you have eight arrays
of twelve disks, with each disk being 73 GB. ASM mirroring is not used.
Here, you can define bigger LUNs not restricted to the size of one of your disks. This allows
you to put the Data LUNs on the fastest region of your disks, and the backup LUNs on slower
parts. By doing this, you achieve a better data distribution across all your disks, and you end
up managing a significantly smaller number of LUNs.
However, you must manipulate your storage in much larger chunks than in the previous
configuration.
Note: The hardware stripe size you choose is also very important because you want 1 MB
alignment as much as possible to keep in sync with ASM AUs. Therefore, selecting power-of-
two stripe sizes (128 KB or 256 KB) is better than selecting odd numbers. Storage vendors
typically do not offer many flexible choices depending on their storage array RAID technology
and can create unnecessary I/O bottlenecks if not carefully considered.
Pros: Cons:
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
Oracle DB size: 1 TB
Data DG FRA DG
Storage configuration:
1 TB 2500 GB 8arrays with 1.6 TB 2800 GB s a
LUNs 1273 GB disks per array LUNs
)ha
m
co
s
u n isy uide
b r nt G
RAID 0+1
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E n s fe slide, you want to store a one-terabyte database with a
e o
In thetcase shown
r n-tr1.6-TB in this
a fast recovery area. You use RAID 0+1, which is a combination of
v
corresponding
Ehardwarenostriping and mirroring to mirror and stripe each disk. In total, you have eight arrays
of twelve disks, with each disk being 73 GB. ASM mirroring is not used.
Compared to the previous slide, you use bigger LUNs for both the Data disk group and the
Fast Recovery Area disk group. However, the presented solution is more highly available than
the previous architecture, because you separate the data from the backups into different
arrays and controllers to reduce the risk of down time if one array fails.
By doing this, you still have a good distribution of data across your disks, although not as
much as in the previous configuration. You still end up managing a significantly smaller
number of LUNs than in the first case.
However, you might end up losing more space than in the previous configuration. Here, you
are using the same size and number of arrays to be consistent with the previous example.
located
Clients s a
)ha
m
co
s
Site A RAC
u n isy uSiteideB
database
b r nt G
n t o@ tude
Fast recovery from site failure
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E databases
n s fe share a single set of storage and are located on servers in the
e o
Typically, RAC
tra
rtdatancenter.
v
same -
no RAC, you can use disk mirroring and Dense Wavelength Division Multiplexing
EWith extended
(DWDM) equipment to extend the reach of the cluster. This configuration allows two data
centers, separated by up to 100 kilometers, to share the same RAC database with multiple
RAC instances spread across the two sites.
As shown in the slide, this RAC topology is very interesting, because the clients work gets
distributed automatically across all nodes independently of their location, and if one site goes
down, the clients work continues to be executed on the remaining site. The types of failures
that extended RAC can cover are mainly failures of an entire data center due to a limited
geographic disaster. Fire, flooding, and site power failure are just a few examples of limited
geographic disasters that can result in the failure of an entire data center.
Note: Extended RAC does not use special software other than the normal RAC installation.
Dark fiber
Site A Site B
DWDM DWDM
device device
s a
)ha
co m
s
DB
u
DB isy
n u ide
copy
b rcopy nt G
n t o@ tude
mePublic i s S
network
c i h
Clients
n as use t
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E na sRAC fe cluster to another site separated from your data center by more than
e o
In order to extend
rt n-tritais required to use DWDM over dark fiber to get good performance results.
v
ten kilometers,
EDWDMnisoa technology that uses multiple lasers, and transmits several wavelengths of light
simultaneously over a single optical fiber. DWDM enables the existing infrastructure of a
single fiber cable to be dramatically increased. DWDM systems can support more than 150
wavelengths, each carrying up to 10 Gbps. Such systems provide more than a terabit per
second of data transmission on one optical strand that is thinner than a human hair.
As shown in the slide, each site should have its own DWDM device connected together by a
dark fiber optical strand. All traffic between the two sites is sent through the DWDM and
carried on dark fiber. This includes mirrored disk writes, network and heartbeat traffic, and
memory-to-memory data passage. Also shown in the graphic are the sets of disks at each
site. Each site maintains a copy of the RAC database.
It is important to note that depending on the sites distance, you should tune and determine
the minimum value of buffer credits in order to maintain the maximum link bandwidth. Buffer
credit is a mechanism defined by the Fiber Channel standard that establishes the maximum
amount of data that can be sent at any one time.
Note: Dark fiber is a single fiber optic cable or strand mainly sold by telecom providers.
Two options:
Host-based mirroring
Remote array-based mirroring
Third
site
Unauthorized reproduction or distribution prohibited Copyright 2013, Oracle and/or its affiliates
( e ve ense
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E disks e
sfare
r o
As fartas voting a
t r n concerned, a node must be able to access strictly more than half of
vevotingodisks
the - at any time, or that node will be evicted from the cluster. Extended clusters
Eare n n implemented with only two storage systems, one at each site. This means that
generally
the site that houses the majority of the voting disks is a potential single point of failure for the
entire cluster. To prevent this potential outage, Oracle Clusterware supports a third voting disk
on an inexpensive, low-end, standard NFS-mounted device somewhere on the network. It is
thus recommended to put this third NFS voting disk on a dedicated server visible from both
sites. This situation is illustrated in the slide. The goal is that each site can run independently
of the other when a site failure occurs.
Note: For more information about NFS configuration of the third voting disk, refer to the
Oracle Technology Network site.
Greater distance
Additional protection against corruptions
Better for planned maintenance
Full rolling upgrades
More performance neutral at large distances
Option to do asynchronous transfer s a
) ha
If you cannot handle the costs of a DWDM network,oData m
Guard still works over cheap, standard networks. y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n Eprovidesn s faegreater disaster protection:
e t o
Data Guard
rDistance a
trover
E v o n - 100 kilometers without a performance hit
n
Additional protection against corruptions, because it uses a separate database
Optional delay to protect against user errors
Data Guard also provides better planned maintenance capabilities by supporting full rolling
upgrades.
In addition, if your budget cannot handle the costs of a DWDM network, you can still use Data
Guard because it works over inexpensive, standard networks.
Production Test s a
cluster cluster )ha
m
co
s
u n isy uide
b r nt G
RAC
n t o@RACtude
database
c i me thdatabase is S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n fe cause of down time in a production environment. A proper test
E mostnslikely
Change
e o is the
rt n-can tracatch more than 90 percent of the changes that could lead to a down time of
v
environment
no environment, and is invaluable for quick test and resolution of issues in
Ethe production
production.
When your production environment is RAC, your test environment should be a separate RAC
cluster with all the identical software components and versions.
Without a test cluster, your production environment will not be highly available.
Note: Not using a test environment is one of the most common errors seen by Oracle Support
Services.
true?
a. Use external RAID protection when possible.
b. Use LUNs with the same performance characteristics.
c. Use LUNs with the same capacity.
d. Minimize the number of spindles in your disk group.
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e2012,
Copyright
l licOracle and/or its affiliates. All rights reserved.
v e rt rab
n E c nsfe
Answer:
e o a, b,
rt n-tra
v
E no
s a
) ha
o m
y s c e
u n is uid
b r n t G
n t o@ tude
c i me this S
n as use
e r ton e to
( e v ens
o n n e lic
e r t a b l
n Ev nsfer
e r to -tra
Ev non