oracle database 11g rac database and oracle clusterware administration
TRANSCRIPT
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
1/172
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
2/172
separate link. The Active Sessions section contains a bar with ranges as #, 2, %, ,
and 9. The legends 6or the bar are :ait, User I;), and &3U. The bar indicates that
the value o6
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
3/172
&rap!ic
In this e'a*ple, the Target Group selected in the Security At a Glance page is
/-00. The page displays security in6or*ation using the 1iolation =lu' and
&o*pliance Score (! graphs.
The 4ob Activity table displays a report of the 5ob eecutions that sho!s the scheduled,
running, suspended, and problem 0stopped6failed1 eecutions for all 7nterprise (anager
5obs on the cluster database.
&rap!ic
The @ob Activity section has a &reate @ob dropdown list bo' with a Go button.
This section contains a table 6or Bobs scheduled to start. It contains three colu*ns
5 Status, Sub*itted to the &luster -atabase, and Sub*itted to any *e*ber.
There are 6our rows 6or each status. The 6our types o6 status are Scheduled,Suspended, /unning, and 3roble*. The section on &ritical 3atch Advisories 6or
)racle 4o*es contains 5 3atch Advisories, A66ected )racle 4o*es, and )racle
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
4/172
Option 1:Incorrect. The Security At a Glance page shows an overview o6 the
security health o6 the enterprise 6or all the targets or speci6ic groups. This helps
you to Cuickly 6ocus on security issues by showing statistics about security policy
violations and noting the critical security patches that have not been applied.
Option 2:Incorrect. The 3olicy Trend )verview page, accessed by clicking the
&o*pliance Score link, provides a co*prehensive view about a group or targets
containing other targets with regard to co*pliance over a period o6 ti*e. Using the
tables and graphs, you can easily watch 6or trends in progress and changes.
Option 3:Incorrect. The @ob Activity table displays a report o6 the Bob e'ecutions
that shows the scheduled, running, suspended, and proble* e'ecutions 6or all
nterprise
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
5/172
Instance as Up, the Instance a*e as /-00", and 1ersion as "".".#..#. In the
4ost &3U section, $oad is #."% and 3aging is #.##. The Active Sessions section
indicates % 6or 1, 2p nodes, and Cluster!are Home
and ersion.
The Configuration section allo!s you to vie! the operating systems 0including Hosts and
"% /atches1 and hard!are 0including Hard!are configuration and Hosts1 for the cluster.
The Cluster Databases table displays the cluster databases 0optionally associated !ith
corresponding services1 associated !ith this cluster, their availability, and any alerts on
those databases. The Alerts table provides information about any alerts that have been
issued along !ith the severity rating of each.
8t also includes a Hosts table that displays the hosts for the cluster, their availability,
corresponding alerts, C/2 and memory utili*ation percentage, and total 86" per second.
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
6/172
&rap!ic
The &luster -atabases table has si' colu*ns. These are na*ed, a*e, Status,
Alerts, 3olicy 1iolations, &o*pliance Score (!, and 1ersion. The Alerts section
has a table with eight colu*ns. They are Severity, Target a*e, Target Type,
&ategory, a*e, I*pact,
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
7/172
,ote
The $ocal -isk &apacity (G0! 6ield shows the disk space that is physically
attached (local! to the host. This value does not include disk space that *ay be
available to the host through networked 6ile syste*s.
The "perating %ystem Details $eneral page displays the follo!ing operating system
details for a host?
&rap!ic
The &on6iguration window contains the 1iew dropdown list bo' and the &ollection
3roble*s table. The table contains the )perating Syste*s, 4osts, and )S
3atches colu*ns. The table contains a row containing listing the /ed 4at
nterprise $inu' AS release % (ahant Update 7! 2..".2? 'enU with 2 4osts.
The )perating Syste* page contains a threecolu*n table with 4ost, 4ardware,and )perating Syste* -etails colu*ns. The table contains two rows containing
in6or*ation about two hosts, the 6irst o6 which is v'#E#.us.oracle.co*. The table
also contains an in6inity icon in the )perating Syste* -etails colu*n. &licking this
icon opens the )perating Syste* -etails page.
general information, such as the distributor version and the maimum s!ap space of the
operating system and
information about operating system details
The %ource column displays !here 7nterprise (anager obtained the value for eachoperating system properties.
&rap!ic
The )perating Syste* -etails page contains in6or*ation such as 4ost and
1endor. The page also contains three tabs 5 General, =ile Syste*s, and
3ackages. The General tab includes )perating Syste* 3roperties.
To see a list of changes to the operating system properties, clic' History.
The "perating %ystem Details File %ystems page displays the follo!ing information about
one or more file systems for the selected hosts?
&rap!ic
The =ile Syste*s tab includes a table containing 6our colu*ns na*ed /esource
a*e, Type,
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
8/172
name of the file system on the host
type of mounted file system, for eample, ufs or nfs
directory !here the file system is mounted, and
the mount options for the file system, for eample ro, nosuid, or nobro!se
The "perating %ystem Details /ac'ages page displays information about the operating
system pac'ages that have been installed on a host.
&rap!ic
The 3ackages tab includes package details such as %Suite ".# E.
The "racle 7nterprise (anager Topology ie!er enables you to visually see the
relationships bet!een target types for each host of your cluster database. &ou can *oom
in or out, pan, and see selection details. These vie!s can also be used to launch various
administration functions.
&rap!ic
The Topology tab has the )verview section that contains pictorial representations
o6 the cluster. The Selection -etails section contains the a*e, Type, 4ost, and
&ritical Alerts.
The Topology ie!er populates icons on the basis of your system configuration. 8f alistener is serving an instance, a line connects the listener icon and the instance icon.
/ossible target types are
interface
listener
A%( instance, and
database instance
8f the %ho! Configuration Details option is not selected, the topology sho!s the
monitoring vie! of the environment, !hich includes general information such as alerts
and overall status. 8f you select the !o# Configuration Detailsoption, additional
details are sho!n in the %election Details !indo!, !hich are valid for any topology vie!.
For instance, the -istener component !ould also sho! the machine name and port
number. &ou can clic' an icon and then right=clic' to display a menu of available actions.
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
9/172
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
10/172
&rap!ic
The &o*pare Targets page includes the Available Targets and Selected Targets
sections.
8n a RAC environment, you can see a summary of the alert history for each participatinginstance directly from the Cluster Database Home page.
The follo!ing steps are performed in the drill=do!n process?
clic' the Alert Historylin' in the Related -in's section of the Cluster Database Home page
chec' the Alert History page !here the summary for both instances are displayed
The Alert 4istory page includes two database instances with a pictorial representation o6 the
history. These instances are /-00/-00" and /-00/-002.
clic' one of the instance@s lin's to go to the corresponding Alert History page for that instance,and
The Alert 4istory page o6 the instance /-00/-00" database instance contains a table with two
colu*ns,
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
11/172
choose a target %ypefrom the drop=do!n list in the Targets area of the /roperties page and clic'
the Cluster Databasein the Available Targets list 0in this eample the entire Cluster Database
RD++ is chosen1
clic' the Movebutton to move your choice to the %elected Targets list, and
clic' the ,e0tbutton to continue
The Create +lac'out? (ember Targets page appears net. 7pand the %elected
Composite Targets tree and ensure that all targets that must be included appear in the
list. Continue and define your schedule as you normally !ould.
&rap!ic
This page contains a table with the a*e, Type, and 0lackout colu*ns and 6our
rows. The 6irst row contains Selected &o*posite Targets under a*e and nothing
under the Type and 0lackout colu*ns. The second row contains /-00 under the
a*e colu*n, &luster -atabase under the Type colu*n, and a dropdown list bo'
under the 0lackout colu*n. The dropdown list bo' has three options 5 All current
*e*ber targets, =ull blackout (all *e*bers at blackout start ti*e!, and Selected
*e*ber targets. The =ull blackout (all *e*bers at the blackout start ti*e! option
is selected. The third row contains /-00/-00" under a*e, -atabase
Instance under Type and a selected checkbo' under the 0lackout colu*n. The
6ourth row contains /-00/-002 under a*e, -atabase Instance under Type
and a selected checkbo' under the 0lackout colu*n.
'uestion
&ou are performing scheduled maintenance on a cluster database instance and
!ant to avoid recording un!anted events. hat can be done in 7nterprise
(anager to prevent these events from being recorded9
Options(
#. Define a blac'out
:. Create an instance=level alert
;. Create a database=level alert
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
12/172
other tasks that *ight trigger e'traneous or unwanted events. Fou can de6ine
blackouts 6or an entire cluster database or 6or speci6ic cluster database instances.
Option 2:Incorrect. Alert thresholds 6or instancelevel alerts, such as archive log
alerts, can be set at the instance target level. This enables you to receive alerts 6or
the speci6ic instance i6 per6or*ance e'ceeds your threshold.
Option 3:Incorrect. Fou can con6igure alerts at the database level. =or e'a*ple,
you can set alerts 6or tablespaces. This enables you to avoid receiving duplicate
alerts at each instance.
Option 4:Incorrect. In a /A& environ*ent, you can see a su**ary o6 the alert
history 6or each participating instance directly 6ro* the &luster -atabase 4o*e
page. 4owever, you cannot *odi6y the alert history.
Correct ans#er)s*(
#. Define a blac'out
ummary
The Cluster Database Home page acts as a crossroad for managing and monitoring the
RAC database. From this page, you can access different tabbed pages such as
/erformance, Availability, %erver, %chema, Data (ovement, %oft!are and %upport, and
Topology. &ou also find $eneral, High Availability, %pace %ummary, and Diagnostic
%ummary sections.
"n the Cluster Database Home page, the configuration section lets you inspect hard!areand operating system overvie! information. &ou can also access hard!are history
information for the host. Ho!ever, the amount of information available depends on the
hard!are platform. The "racle 7nterprise (anager Topology ie!er enables you to
visually see the relationships bet!een target types for each host of your cluster database.
&ou can use 7nterprise (anager to administer alerts for RAC environments, !here it
distinguishes bet!een database and instance=level alerts. +lac'outs for etraneous or
un!anted alters can also be configured.
Style considerations
Although certain aspects of the "racle ""gDatabase are case and spacing insensitive, a common coding
convention has been used throughout all aspects of this course.
This convention uses lo!ercase characters for schema, role, user, and constraint names, and for
permissions, synonyms, and table names 0!ith the eception of the D2A- table.1 -o!ercase characters
are also used for column names and user=defined procedure, function, and variable names sho!n in
code.
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
13/172
2ppercase characters are used for "racle 'ey!ords and functions, for vie!, table, schema, and column
names sho!n in tet, for column aliases that are not sho!n in 3uotes, for pac'ages, and for data
dictionary vie!s.
The spacing convention re3uires one space after a comma and one space before and after operators that
are not "racle=specific, such as , =, 6, and B. There should be no space bet!een an "racle=specific
'ey!ord or operator and an opening brac'et, bet!een a closing brac'et and a comma, bet!een the last
part of a statement and the closing semicolon, or before a statement.
%tring literals in single 3uotes are an eception to all of the convention rules provided here. /lease use
this convention for all interactive parts of this course.
tart an$ top AC Databases an$ 2nstances
Learning Objective
After completing this topic, you should be able to
recognize how to start and stop RAC databases and instances
1. AC Databases an$ 2nstances
ith Real Application Clusters or RAC, each instance !rites to its o!n set of online redo
log files, and the redo !ritten by an instance is called a thread of redo, or thread.
Thus, each redo log file group used by an instance is associated !ith the same thread
number determined by the value of the THREADinitiali*ation parameter. 8f you set theTHREADparameter to a non*ero value for a particular instance, the net time the instance
is started, it !ill try to use that thread.
&rap!ic
In this e'a*ple, there are two nodes ode" and ode2 which contain the /A"
and /A databases. These nodes are connected using a twoway dotted line.
ode" is also connected to Thread " containing groups " to E. ode2 is
connected to Thread 2 containing groups % and 7. A dotted line 6ro* /A also
connects to T4/A- ". The space between the threads contains a bo' labeled
Shared storage. This bo' contains an S3=I$ with /A".T4/A-" and
/A.T4/A-2.
+ecause an instance can use a thread as long as that thread is enabled and not in use by
another instance, it is recommended to set the THREADparameter to a non*ero value
!ith each instance having different values.
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
14/172
&rap!ic
The &reate /edo $og Group page contains the Group H te't bo' with the value 7.
This page also contains the =ile si>e te't bo' with the value 7"2## entered and
0 selected in the corresponding dropdown list bo'. The Thread H te't bo'
contains the value ".
&ou associate a thread number !ith a redo log file group by using the ALTERDATABASE
ADDLOGFILETHREADstatement. &ou enable a thread number by using the ALTER
DATABASEENABLETHREADstatement. +efore you can enable a thread, it must have at
least t!o redo log file groups.
Co$e
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4;
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5;
ALTER DATABASE ENABLE THREAD 2;.
+y default, a database is created !ith one enabled public thread. An enabled public
thread is a thread that has been enabled by using the ALTERDATABASEENABLE
PUBLICTHREADstatement.
%uch a thread can be ac3uired by an instance !ith its THREADparameter set to *ero.
Therefore, you need to create and enable additional threads !hen you add instances to
your database.
The maimum possible value for the THREADparameter is the value assigned to the
MAXINSTANCESparameter specified in the CREATEDATABASEstatement.
,ote
Fou can use nterprise
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
15/172
as that undo tablespace is not currently used by another instance for undo generation or
transaction recovery.
&rap!ic
This e'a*ple includes two interconnnected nodes 5 ode" containing the
instance /A" and ode2 containing the instance /A. /A" is also
connected to three undo tablespaces undotbs", undotbs2, and undotbsE. /A
is connected to the undo tablespaces undotbsE and undotbs2. /A" and /A
can per6or* consistent reads on all the connected undo tablespaces. The two
instances can also update all the connected undo tablespaces during transaction
recovery.
&ou assign undo tablespaces in your RAC database by specifying a different value for
this parameter for each instance in your SPFILEor individual PFILEs.
8f you do not set the UNDO_TABLESPACEparameter, then each instance uses the first
available undo tablespace. 8f undo tablespaces are not available, the SYSTEMrollbac'
segment is used.
&rap!ic
The code to assign undo tablespaces in your /A& database is the 6ollowingD
...
/A".U-)TA0$S3A&undotbsE
/A.U-)TA0$S3A&undotbs2
...
&ou can dynamically s!itch undo tablespace assignments by eecuting the ALTER
SYSTEMSETUNDO_TABLESPACEstatement !ith the SIDclause. &ou can run this
command from any instance. 8n this eample, the follo!ing steps are performed?
&rap!ic
The co**and that e'ecutes the A$T/ SFST< ST U-)TA0$S3A&
state*ent is the 6ollowingD
A$T/ SFST< ST U-)TA0$S3A&undotbsE SI-J/A"JK
the previously used undo tablespace assigned to instance RAC01remains assigned to it until the
RAC01instance@s last active transaction commits and
the pending offline tablespace may be unavailable for other instances until all transactions
against that tablespace are committed
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
16/172
,ote
Fou cannot si*ultaneously use Auto*atic Undo
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
17/172
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
18/172
)#!*+($*,-"01 /#,,3# $# ##67$
S8L9 #!$(!3
S8L9 #3!6':"
S8L9 *'""&*! ##'($*,&%'3"!>"'%'3"!>"'(%$,>!($"#$*!-'"$,>-%%&6-$!&>
$7'(!9
)+* ?*'""&*!_#!(9 > +
#(=*!, #!$(!>#!' -"#!$"*&+6 ?67_"$%&9 +- ?-"#!_"$%&_,-#!9
)+' '&">%'3"!>"'%'3"!>"'(%$,>!($"#$*!-'"$,>-%%&6-$!&>
$7'(!9
)+* ?*'""&*!_#!(9 > +
srvctl start|stop database
The #(=*!,#!$(!6$!$7$#&co**and starts a cluster database, its enabled instances,
and its services. The #(=*!,#!'6$!$7$#&co**and stops a database, its instances,
and its services.
srvctl start|stop instance
The #(=*!,#!$(!-"#!$"*&co**and starts instances o6 a cluster database. This
co**and also starts all enabled and nonrunning services that have the listed instances
either as pre6erred or as available instances. The #(=*!,#!' -"#!$"*&co**and
stops instances as well as all enabled and running services that have these instances aseither pre6erred or available instances. Fou *ust disable an obBect that you intend to keep
stopped a6ter you issue an #(=*!,#!'co**andK otherwise, )racle &lusterware or )&
can restart it as a result o6 another planned operation.
For commands that use a connect string, if you do not provide a connect string, then
SRCTLuses 6 $###67$to perform the operation. The @option as's for a connect
string from standard input. SRCTLdoes not support concurrent eecutions of commands
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
19/172
on the same ob5ect.
Therefore, run only one SRCTLcommand at a time for each database, service, or other
ob5ect. To use the STARTand STOPoptions of the SRCTLcommand, your service must
be an "C=enabled, nonrunning service.
Co$e
#(=*!, #!$(! -"#!$"*& +6 RACDB +- RACDB1RACDB2
#(=*!, #!' -"#!$"*& +6 RACDB +- RACDB1RACDB2
#(=*!, #!$(! 6$!$7$#& +6 RACDB +' '&"
'uestion
hich t!o utilities provide options to start up and shut do!n all the instances of a
RAC database !ith a single step9
Options(
#. A2(
:. %-/lus
;. %erver Control
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
20/172
SRCTLprovide options to start up and shut down all the instances o6 a /A&
database with a single step.
Correct ans#er)s*(
;. %erver ControlMANUAL
To implement "racle Cluster!are and Real Application Clusters, it is best to have "racle
Cluster!are start the defined "racle resources during system boot, !hich is the default.
Consider these t!o eamples. The first eample uses the #(=*!,*'"-6$!$7$#&
command to display the current policy for the RACBdatabase. As you can see, it is
currently set to its default AUTOMATIC.
The second statement uses the #(=*!,%'6- 6$!$7$#&command to change the
current policy to MANUALfor the RACBdatabase.
Co$e
/ #(=*!, *'"- 6$!$7$#& +6 RACB +$
&0044 RACB1 301$'($*,&('63*!10.2.067_1
&0045 RACB2 301$'($*,&('63*!10.2.067_1
DB_NAME RACB
ORACLE_HOME 301$'($*,&('63*!10.2.067_1
SPFILE DGDBRACB#-,&RACB.'($
DOMAIN "3,,
DB_ROLE "3,,
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
21/172
START_OPTIONS "3,,
POLICY AUTOMATIC
ENABLE FLAG DB ENABLED
/
hen you add a ne! database by using the #(=*!,$666$!$7$#&command, that
database is by default placed under the control of "racle Cluster!are using the
AUTOMATICpolicy.
Ho!ever, to directly set the policy to MANUAL, you can use the add database statement.
Co$e
#(=*!, $66 6$!$7$#& +6 RAC + MANUAL.
,ote
Fou can also use this procedure to con6igure your syste* to prevent )racle
&lusterware 6ro* autorestarting 6ailed database instances *ore than once.
The follo!ing steps depict ho! you can add and remove redo log groups in a RAC
database environment.
&ou !ant to use Database Control to create t!o ne! redo log groups in your database.
The t!o groups must pertain to the thread number three, and each group must have only
one #:EE G+ member called redoE.log and redoE.log, respectively. &ou perform the
follo!ing steps?
from Database Control Home page, clic' the ervertab
on the Cluster Database %erver page, clic' e$o Log &roupsin the %torage section
on the Redo -og $roups page, clic' Createand
on the Create Redo -og $roup page, leave the current value of the $roup I field as it is 01.
(a'e sure that the File si*e field is set to #:EE G+. %et the Thread I field to ;. hen you are
finished, clic' O-.
After clic'ing O-on the Create Redo -og $roup page you are ta'en bac' to the Redo
-og $roups page. Here you see a confirmation message that a ne! ob5ect !as
successfully created.
&ou then perform the follo!ing steps?
on the Redo -og $roups page, clic' Create
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
22/172
on the Create Redo -og $roup page, leave the current value of the $roup I field as it is 01.
(a'e sure that the File si*e field is set to #:EE G+. %et the Thread I field to ;. hen you are
finished, clic' O-and
this ta'es you bac' to the Redo -og $roups page !here you should again see a confirmation
message indicating the successful creation of a ne! ob5ect
&ou determine that you need to destroy redo thread number three. (a'e sure that in the
end both instances are up and running and managed by "racle Cluster!are.
upplement
Selecting the link title opens the resource in a new browser window.
Oracle Cluster#are
ie! the code re3uired to alter the database.
Launc! #in$o#
ummary
ith Real Application Clusters or RAC, each instance !rites to its o!n set of online redo
log files, and the redo !ritten by an instance is called a thread of redo, or thread. +efore
you can enable a thread, it must have at least t!o redo log file groups. +y default, a
database is created !ith one enabled public thread.
8n a RAC environment, multiple instances can have the same RAC database open at the
same time, and shutting do!n one instance does not interfere !ith the operation of other
running instances. &ou can start up and shut do!n instances by using 7nterprise
(anager, %-/lus, or %erver Control or SRCTL. +oth 7nterprise (anager and SRCTL
provide options to start up and shut do!n all the instances of a RAC database !ith a
single step.
Oracle Clusterware
*$! '%&'($*,&"'6&-"' > #&6 +" J11J
*$! '%&'($*,&"'6&-"' > #&6 +" J22J
DBNAME# +& > (& 67:0_RDB > (& += (& > (& +=
*$,,'3!1 > $: J (-"! / J > #&6 J#1JJJ > #&6
J#'($_67:0_JJJ
I1NAME/DBNAME1
http://dowindow%28%27../t28/misc/lw_od_orac_a02_it_enust2801.html')http://dowindow%28%27../t28/misc/lw_od_orac_a02_it_enust2801.html') -
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
23/172
I2NAME/DBNAME2
&'(! ORACLE_HOME301$'($*,&('63*!11.1.067_1
&'(! ORACLE_SID/I1NAME
&*' R&! !(&$6 !' 2 '( #&*'"6 -"#!$"*& ...
/ORACLE_HOME7-"#,,3# +# NOLOG ??EOF
*'""&*! $# ##67$
ALTER SYSTEM SET !(&$6 2 SCOPESPFILE SIDJ/I2NAMEJ;
EOF
&*' S!' #&*'"6 -"#!$"*& ...
301*(#117-"#(=*!, #!' -"#!$"*& +6 /DBNAME +- /I2NAME
&*' R!$(! #&*'"6 -"#!$"*& ...
301*(#117-"#(=*!, #!$(! -"#!$"*& +6 /DBNAME +- /I2NAME
&*' R&%'=-" !(&$6 Q ('% 6$!$7$#& ...
/ORACLE_HOME7-"#,,3# +# NOLOG ??EOF
*'""&*! $# ##67$
$,!&( 6$!$7$#& 6-#$7,& !(&$6 Q;
$,!&( 6$!$7$#& 6(' ,'-,& ('3 5;$,!&( 6$!$7$#& 6(' ,'-,& ('3 ;
EOF
301*(#117-"*(#_#!$! +!
R&! !(&$6 !' 2 '( #&*'"6 -"#!$"*& ...
S#!&% $,!&(&6.
S!' #&*'"6 -"#!$"*& ...R!$(! #&*'"6 -"#!$"*& ...
R&%'=-" !(&$6 Q ('% 6$!$7$#& ...
D$!$7$#& $,!&(&6.
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
24/172
D$!$7$#& $,!&(&6.
D$!$7$#& $,!&(&6.
N$%& T& T$(&! S!$!& H'#!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'($....B1.-"#! $,-*$!-'" ONLINE ONLINE =0Q0
'($....B2.-"#! $,-*$!-'" ONLINE ONLINE =0Q1Q
'($.RDB.67 $,-*$!-'" ONLINE ONLINE =0Q1Q
'($....SM1.$#% $,-*$!-'" ONLINE ONLINE =0Q0
'($....0.,#"( $,-*$!-'" ONLINE ONLINE =0Q0
'($.=0Q0.#6 $,-*$!-'" ONLINE ONLINE =0Q0
'($.=0Q0.'"# $,-*$!-'" ONLINE ONLINE =0Q0
'($.=0Q0.=- $,-*$!-'" ONLINE ONLINE =0Q0
'($....SM2.$#% $,-*$!-'" ONLINE ONLINE =0Q1Q
'($....1Q.,#"( $,-*$!-'" ONLINE ONLINE =0Q1Q
'($.=0Q1Q.#6 $,-*$!-'" ONLINE ONLINE =0Q1Q
'($.=0Q1Q.'"# $,-*$!-'" ONLINE ONLINE =0Q1Q
'($.=0Q1Q.=- $,-*$!-'" ONLINE ONLINE =0Q1Q
)'($*,&
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
25/172
shutdo!n and startup. 8n addition, you can configure RMANto bac' up your SPFILE.
8n order for each instance to use the same SPFILEat startup, each instance uses its o!n
PFILEfile that contains only one parameter called SPFILE. The SPFILEparameter
points to the shared SPFILEon your shared storage.
+y naming each PFILEusing the -"-!?SID9.'($format, and by putting them in the
/ORACLE_HOME67#directory of each node, a STARTUPcommand uses the shared
SPFILE.
&ou can modify the value of your initiali*ation parameters by using the ALTERSYSTEM
SET command. This is the same as !ith a single=instance database ecept that you have
the possibility to specify the SIDclause in addition to the SCOPEclause.
+y using the SIDclause, you can specify the SIDof the instance !here the value ta'es
effect. %pecify SIDJJif you !ant to change the value of the parameter for all
instances. %pecify SIDJ#-6Jif you !ant to change the value of the parameter only for
the instance #-6.
This setting ta'es precedence over previous and subse3uent ALTERSYSTEMSET
statements that specify SIDJJ. 8f the instances are started up !ith an SPFILE, then
SIDJJis the default if you do not specify the SIDclause.
Co$e
ALTER SYSTEM SET ?6"$%&9 SCOPEMEMORY #-6J?#-6>9J;
8f you specify an instance other than the current instance, then a message is sent to that
instance to change the parameter value in its memory if you are not using the SPFILE
scope.
The combination of SCOPEMEMORYand SIDJ#-6Jof the ALTERSYSTEMRESET
command allo!s you to override the precedence of a currently used ?#-69.?6$($%9
entry. This allo!s for the current .?6$($%9entry to be used, or for the net created
.?6$($%9entry to be ta'en into account on that particular sid.
Co$e
ALTER SYSTEM RESET ?6"$%&9 SCOPEMEMORY #-6J?#-69J;
&ou can remove a line from your SPFILE, using this ALTERSYSTEMRESETcommand.
Co$e
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
26/172
ALTER SYSTEM RESET ?6"$%&9 SCOPESPFILE #-6J?#-6>9J;
&ou can access the 8nitiali*ation /arameters page by clic'ing the 2nitiali3ation
Parameterslin' on the Cluster Database? RD++ %erver page.
The Current tabbed page displays the values currently used by the initiali*ation
parameters of all the instances accessing the RAC database. &ou can filter the
8nitiali*ation /arameters page to sho! only those parameters that meet the criteria of the
filter that you entered in the )ame field.
The 8nstance column sho!s the instances for !hich the parameter has the value listed in
the table. An asteris' 01 indicates that the parameter has the same value for all remaining
instances of the cluster database.
&rap!ic
In this e'a*ple, the opencursors instance is selected in the &urrent tabbed pageand its value is entered as E##.
Choose a parameter from the electcolumn and perform one of these steps?
clic' A$$to add the selected parameter to a different instance. 7nter a ne! instance name and
value in the ne!ly created ro! in the table or
clic' esetto reset the value of the selected parameter. )ote that you may reset only those
parameters that do not have an asteris' in the 8nstance column. The value of the selected column
is reset to the value of the remaining instances.
,ote
=or bothAddand Resetbuttons, the ALTER SYSTEMco**and uses
SCOPEMEMORY.
The %/File tabbed page displays the current values stored in your SPFILE.
As on the Current tabbed page, you can add or reset parameters. Ho!ever, if you select
the Apply c!anges in P4ile mo$e to t!e current running instance)s*. 4or static
parameters" you must restart t!e $atabase chec'bo, then the ALTER SYSTEMcommand uses SCOPEBOTH. 8f this chec'bo is not selected, SCOPESPFILEis used.
&rap!ic
The Initiali>ation 3ara*eters page has two tabs 5 &urrent and S3=ile. The S3=ile
tabbed page is displayed here. The Apply changes in S3=ile *ode to the current
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
27/172
running instance(s!. =or static para*eters, you *ust restart the database
checkbo' is selected. This tabbed page also has a table with Add and /eset
buttons. It also has colu*ns such as Select, Instance, a*e, 4elp, 1alue,
&o**ents, Type, &onstraint, 0asic, and -yna*ic.
Clic' Applyto accept and generate your changes.
There are several RAC initiali*ation parameters.
&rap!ic
The Initiali>ation 3ara*eters page has a table with Select, Instance, a*e, 4elp,
/evisions, 1alue, &o**ents, Type, 0asic,
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
28/172
shared=server configurations, many user processes connect to a dispatcher.
The DISPATCHERSparameter may contain many attributes. "racle recommends that you
configure at least the PROTOCOLand LISTENERattributes. PROTOCOLspecifies the
net!or' protocol for !hich the dispatcher process generates a listening end point.
LISTENERspecifies an alias name for the "racle )et %ervices listeners. %et the alias toa name that is resolved through a naming method, such as a !"#"$%.'($file.
hen you use an SPFILEparameter, all RAC database instances must use the #-,&
and the file must be on shared storage.
Another parameter is the MAX_COMMIT_PROPAGATION_DELAY!hich is RAC=specific.
%tarting !ith "racle Database #Eg Release :, the MAX_COMMIT_PROPAGATION_DELAY
parameter is deprecated. +y default, commits on one instance are immediately visible on
all the other instances broadcast on commit propagation.
This parameter is retained for bac'!ard compatibility only. This parameter specifies themaimum amount of time allo!ed before the %ystem Change )umber or %C) held in the
%ystem $lobal Area or %$A of an instance is refreshed by the log !riter process, also
'no!n as LGWR.
8t determines !hether the local %C) should be refreshed from the %$A !hen getting the
snapshot %C) for a 3uery. ith previous releases, you should not alter the default setting
for this parameter ecept under a limited set of circumstances. For eample, under
unusual circumstances involving rapid updates and 3ueries of the same data from
different instances, the %C) might not be refreshed in a timely manner.
Another RAC 8nitiali*ation /arameter is the THREADparameter. 8f specified, it must haveuni3ue values on all instances. This parameter specifies the number of the redo thread to
be used by an instance. &ou can specify any available redo thread number as long as
that thread number is enabled and is not used.
Certain initiali*ation parameters that are critical at database creation or that affect certain
database operations must have the same value for every instance in RAC. %pecify these
parameter values in the SPFILE, or in each -"-!_67"$%&.'($file on each instance.
These parameters must have the same value on all instances.
/arameters that re3uire identical settings include
ACTIE_INSTANCE_COUNT
ARCHIE_LAG_TARGET
COMPATIBLE
CLUSTER_DATABASE CLUSTER_DATABASE_INSTANCE
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
29/172
CONTROL_FILES
DB_BLOCK_SIE
DB_DOMAIN
DB_FILES, and
DB_NAME
%ome more parameters that re3uire identical settings include
DB_RECOERY_FILE_DEST6DB_RECOERY_FILE_DEST_SIE
DB_UNI8UE_NAME
INSTANCE_TYPE
PARALLEL_MAX_SERERS
REMOTE_LOGIN_PASSWORD_FILE
MAX_COMMIT_PROPAGATION_DELAY
TRACE_ENABLED, and
UNDO_MANAGEMENT
,ote
The setting 6or DML_LOCKSand RESULT_CACHE_MAX_SIE*ust be identical on
every instance only i6 set to >ero. -isabling the result cache on so*e instances
*ay lead to incorrect results.
%ome parameters such as INSTANCE_NAMEre3uire uni3ue settings. These include
THREADor ROLLBACK_SEGMETS
8f you use the THREADor ROLLBACK_SEGMENTSparameter, it is recommended that youset uni3ue values for them by using the SIDidentifier in the SPFILE.
!STACE_"MBER
&ou must set a uni3ue value for INSTANCE_NUMBERfor each instance and you cannot use
a default value. The "racle server uses the -"#!$"*&_"3%7&(parameter to distinguish
among instances at startup. The "racle server uses the !(&$6number to assign redo
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
30/172
log groups to specific instances. To simplify administration, use the same number for both
the !(&$6and -"#!$"*&_"3%7&(parameters.
"DO_TABLES#ACE" an$
8f you specify UNDO_TABLESPACE!ith Automatic 2ndo (anagement enabled, set this
parameter to a uni3ue undo tablespace name for each instance.ASM_#RE$ERRED_READ_$A!L"RE_GRO"#S
2sing the ASM_PREFERRED_READ_FAILURE_GROUPS initiali*ation parameter, you can
specify a list of preferred read failure group names. The dis's in those failure groups
become the preferred read dis's.
Thus, every node can read from its local dis's. The setting for this parameter is instance
specific, and the values do not need to be the same on all instances.
'uestion
hich RAC initiali*ation parameters re3uire an identical value for every instance
in RAC9
Options(
#. THREAD
:. DB_NAME
;. CLUSTER_DATABASE
ation para*eter by using the SI- identi6ier in the SPFILE.
Option 2:&orrect. I6 you set a value 6or DB_NAMEin instancespeci6ic para*eter
6iles, then the setting *ust be identical 6or all instances.
Option 3:&orrect. The CLUSTER_DATABASEinitiali>ation para*eter enables a
database to be started in cluster *ode. Set this to TRUE. This para*eter should
be identical 6or every instance in /A&.
Option 4:Incorrect. Fou *ust set a uniCue value 6or the INSTANCE_NUMBER
initiali>ation para*eter 6or each instance and you cannot use a de6ault value.
Correct ans#er)s*(
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
31/172
:. DB_NAME
;. CLUSTER_DATABASE
ummary
hen you create a database, the D+CA creates an SPFILEin the file location that you
specify. All instances in the cluster database use the same SPFILEat startup. The
SPFILEparameter points to the shared %/F8-7 on your shared storage. hen the
database is created manually, you create an SPFILEfrom PFILE.
Another RAC 8nitiali*ation /arameter is the THREADparameter. 8f specified, it must have
uni3ue values on all instances. This parameter specifies the number of the redo thread to
be used by an instance. &ou can specify any available redo thread number as long as
that thread number is enabled and is not used.
Managing 2nstances in AC
Learning Objective
After completing this topic, you should be able to
identify ways to manage instances in a RAC environment
1. 'uiescing AC $atabases
To 3uiesce a RAC database, use the ALTERSYSTEM8UIESCERESTRICTEDstatementfrom one instance. 8t is not possible to open the database from any instance !hile the
database is in the process of being 3uiesced from another instance.
After all non=D+A sessions become inactive, the ALTERSYSTEM8UIESCERESTRICTED
statement eecutes and the database is considered to be 3uiesced. 8n a RAC
environment, this statement affects all instances.
The follo!ing conditions apply to RAC?
if you had issued the ALTERSYSTEM8UIESCE RESTRICTEDstatement but the "racle server
has not finished processing it, then you cannot open the database
you cannot open the database if it is already in a 3uiesced state, and
the ALTERSYSTEM8UIESCERESTRICTEDand ALTERSYSTEMUN8UIESCEstatements affect
all instances in a RAC environment, not 5ust the instance that issues the command
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
32/172
Cold bac'ups cannot be ta'en !hen the database is in a 3uiesced state because the
"racle bac'ground processes may still perform updates for internal purposes even !hen
the database is in a 3uiesced state.
Also, the file headers of online data files continue to appear as if they are being
accessed. They do not loo' the same as if a clean shutdo!n !ere done.
'uestion
hich t!o statements about 3uiescing a RAC database are true9
Options(
#. &ou cannot open the database if it is already in a 3uiesced state
:. Cold bac'ups cannot be ta'en !hen the database is in a 3uiesced state
;. 8t is possible to open the database from any instance !hile the database is in the
process of being 3uiesced from another instance
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
33/172
%tarting !ith "racle RAC ##gR#, you can use the ALTERSYSTEMKILLSESSION
statement to terminate a session on a specific instance. This code illustrates by
terminating a session started on a different instance than the one used to terminate the
problematic session.
Co$e
S8L9 SELECT SID SERIAL INST_ID
2 FROM G/SESSION WHERE USERNAMEJFJ;
SID SERIAL INST_ID
++++++++++ ++++++++++ ++++++++++
140 QQ40 2
S8L9 ALTER SYSTEM KILL SESSION J140QQ40
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
34/172
&rap!ic
The table contains the SL$M3lus co**and and Associated instance colu*ns.
The table contains seven rowsK 6or the A/&4I1 $)G co**and, the associated
instance is Generally a66ects the current instance, 6or &)&T, the associated
instance is A66ects the de6ault instance i6 no instance is speci6ied in the &)&Tco**and. =or 4)ST, the associated instance is A66ects the node running the
SL$M3lus session, and 6or /&)1/, it is -oes not a66ect any particular
instance, but rather the database. =or S4): 3A/A
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
35/172
8f you !ant to use local copies, you must copy the !allet and ma'e it available to all of the
other nodes after initial configuration. For systems using Transparent Data 7ncryption
!ith encrypted !allets, you can use any standard file transport protocol. For systems
using Transparent Data 7ncryption !ith obfuscated !allets, file transport through a
secured channel is recommended.
The !allet must reside in the directory specified by the setting for the WALLET_LOCATION
or ENCRYPTION_WALLET_LOCATIONparameter in s3lnet.ora.
The local copies of the !allet need not be synchroni*ed for the duration of Transparent
Data 7ncryption usage until the server 'ey is re'eyed through the ALTERSYSTEMSET
KEYS8Lstatement. 7ach time you run the ALTERSYSTEM SETKEYstatement at a
database instance, you must again copy the !allet residing on that node and ma'e it
available to all of the other nodes.
To avoid unnecessary administrative overhead, reserve re'eying for eceptional cases
!here you are certain that the server master 'ey is compromised and that not re'eying it!ould cause a serious security problem.
+. AM general arc!itecture
Automatic %torage (anagement or A%( is part of the database 'ernel. "ne portion of the
A%( code allo!s for the startup of a special instance called an A%( instance. A%(
instances do not mount databases but instead manage the metadata needed to ma'e
A%( files available to ordinary database instances.
+oth A%( instances and database instances have access to a common set of dis's
called dis' groups. Database instances access the contents of A%( files directly,
communicating !ith an A%( instance only to obtain information about the layout of these
files.
&rap!ic
In this e'a*ple, there are two nodes ode" and ode2. It also has three AS'*(%-(('(removes the primary or the mirror "CR file
2se the '*(*'"-@(&$-(command to repair inconsistent "CR configuration
information.
The "CR configuration information is stored in these locations.
&rap!ic
The paths that store the )&/ con6iguration in6or*ation are the 6ollowingD
;etc;oracle;ocr.loc on $inu' and AIR
;var;opt;oracle;ocr.loc on Solaris and 43UR, and
registry key 4F$)&A$
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
77/172
the "CR on a node that !as not up !hile you !ere adding, replacing, or removing an
"CR.
8n this eample, the "CR mirror file is added on the first node of your cluster !hile the
second node is not running "racle Cluster!are. &ou cannot perform this operation on a
node on !hich "racle Cluster!are is running.
Co$e
*(#*!, #!' *(#
'*(*'"- @(&,$*& '*(%-(('( OCRM-(('(
'*(*'"- @(&$-( '*(%-(('( OCRM-(('(
*(#*!, #!$(! *(#
,ote
This repairs the )&/ con6iguration in6or*ation only, it does not repair )&/ itsel6.
The follo!ing is a list of important considerations, !hen you use the '*(*'"-@
(&,$*&command?
if you are using ra! devices, ma'e sure that the file name eists before issuing an add or replace
operation using '*(*'"-
to be able to eecute an add, replace, or remove operation using '*(*'"-, you must be
logged in as the (''!user
the "CR file that you are replacing can be either online or offline
if you remove a primary "CR file, then the mirrored "CR file becomes the primary "CR file, and
do not perform an "CR removal operation unless there is at least one other active "CR file
online
upplement
Selecting the link title opens the resource in a new browser window.
estore an OC file
ie! information about restoring an "CR file.
Launc! #in$o#
http://dowindow%28%27../t51/misc/lwod_orac_a02_it_enus_t5103.html')http://dowindow%28%27../t51/misc/lwod_orac_a02_it_enus_t5103.html') -
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
78/172
'uestion
hat is an important consideration that should be ta'en into account !hen you
use the '*(*'"-@(&,$*&command9
Options(
#. The "CR file that you are replacing must be offline
:. Any user can eecute an add operation using '*(*'"-
;. An "CR removal operation should not be performed unless at least one other "CR
file is online
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
79/172
72P A$$resses an$ C 4rame#or/
Learning Objectives
After completing this topic, you should be able to
recognize the procedure for changing !"# addresses
recognize how to use the CR framework to register an application
1. C!anging t!e 72P a$$ress
The 8/ address is a static 8/ address !ith a virtual host name defined and resolved
through either the D)% or your hosts file.
During "racle Cluster!are installation, you are prompted to enter a virtual 8/ and virtual
host name for each of the nodes in the cluster. These are stored in "CR, and different
components !ithin the "racle Cluster!are HA frame!or' depend on these 8/s.
8f, for some reasons, you !ant to change the 8/ address, use the follo!ing procedure on
each node, one at a time?
Co$e
/ -*'"- +$
/ #(=*!, #!' -"#!$"*& +6 DB +- DB1
/ #(=*!, #!' $#% +" "'6&1 #(=*!, #!' "'6&$# +" "'6&1
/ -*'"- +$ ) / *(#_#!$!
&!*'#!#
#(=*!, %'6- "'6&$# +" "'6&1 +A
12.1.2.125255.255.255.0&!0
#(=*!, #!$(! "'6&$# +" "'6&1
confirm t!e current 2P a$$ress
Confirm the current 8/ address for the 8/ by running the -*'"-@$command. "n
indo!s, run the -*'"-$,,command. This should eplain the current 8/ bound
to one of the net!or' interfaces.
stop all resources t!at are $epen$ent on t!e 72P
%top all resources that are dependent on the 8/ on that node first, stop the database
instance, and then the A%( instance. hen done, stop "'6&$#.
verify t!at t!e 72P is no longer running
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
80/172
erify that the 8/ is no longer running by eecuting the -*'"- +$command again,
and confirm that its interface is no longer listed in the output. 8f the interface still sho!s as
online, this is an indication that a resource !hich is dependent on the 8/ is still running.
The *(#_#!$!+!command can help to sho! resources that are still online.
ma/e any c!anges necessary to all no$es
(a'e any changes necessary to all nodes &!*'#!#files 0on 2)8J1, or
\WINNT\S#!&%Q2\6(-=&(#\&!*\'#!# files on indo!s, and ma'e the necessary
D)% changes, to associate the ne! 8/ address !ith the old host name.
mo$ify nodeapps
(odify "'6&$#and provide the ne! virtual 8/ address. 2se the #(=*!,%'6-
"'6&$#command !ith the @Aoption. This command should be run as (''!and you
specify the ne! 8/ address 012.1.2.1251, then the corresponding netmas'
0255.255.255.01, and the interface that you !ant the 8/ to use 0&!01.
start nodeappsagain" an$
%tart "'6&$#again after modifying "'6&$#.
repeat t!e same steps
Repeat the same steps for all the nodes in the cluster. &ou can stay connected from the
first node because #(=*!,is a cluster!ide management tool.
8f only the 8/ address is changed, it is not necessary to ma'e changes to the
,-#!&"&(.'($, !"#"$%.'($and initiali*ation parameter files, provided they are
using the virtual host names.
8f changing both the virtual host name and the 8/ address for a node, it !ill be
necessary to modify those files !ith the ne! virtual host name.
For the ,-#!&"&(.'($file, you can use "&!*$to remove the old listener and create a
ne! listener. 8n addition, changes !ill need to be made to the !"#"$%.'($file of any
clients connecting to the old virtual host name.
hen installing "racle Cluster!are and RAC, it is possible for you to specify !rong
information during the "28 intervie! regarding the public and interconnect interfaces that
"racle Cluster!are should use.
8f that happens, "racle Cluster!are !ill be able to start at the end of the installation
process, but you might end up having trouble later communicating !ith other nodes inyour cluster.
8f either the interface, 8/ subnet, or 8/ address for both your public net!or' and
interconnect are incorrect or need to be changed, you should ma'e the changes using
the "racle 8nterface Configuration Tool or '-*because this !ill update the
corresponding "CR information.
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
81/172
8n this eample, both 8/ subnet for the public and private net!or' are incorrect?
Co$e
/ ?CRS HOME97-"'-* &!-
&!0 1Q.2.15.0 ,'7$, 37,-*&!1 12.1.0.0 ,'7$, *,3#!&(_-"!&(*'""&*!
/ '-* 6&,- +,'7$, &!0
/ '-* #&!- @,'7$, &!01Q.2.1.037,-*
/ '-* 6&,- @,'7$, &!1
/ '-* #&!- @,'7$, &!112.1.1.0*,3#!&(_-"!&(*'""&*!
/ '-* &!-
&!0 1Q.2.1.0 ,'7$, 37,-*
&!1 12.1.1.0 ,'7$, *,3#!&(_-"!&(*'""&*!
you get the current interfaces information by using the &!-option
This code is used to get the current inter6ace in6or*ationD
P&/S 4)
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
82/172
oi6c6g deli6 global eth#
oi6c6g seti6 5global eth#;"E?.2.".#Dpublic
Co$e
L BCR% H"(7M6bin6oifcfg getif
ethE #;S.:.#.E global public
eth# #S:.#P.E.E global clusterNinterconnect
L oifcfg delif =global ethE
L oifcfg setif global ethE6#;S.:.#.E?public
L oifcfg delif global eth#
L oifcfg setif global eth#6#S:.#P.#.E?clusterNinterconnect
L oifcfg getif
ethE #;S.:.#.E global public
eth# #S:.#P.#.E global clusterNinterconnect
you do the same for your private interconnect, and
This code is used 6or private interconnectD
oi6c6g deli6 5global eth"
oi6c6g seti6 5global eth";"?2."9.".#Dclusterinterconnect
Co$e
L BCR% H"(7M6bin6oifcfg getif
ethE #;S.:.#.E global public
eth# #S:.#P.E.E global clusterNinterconnect
L oifcfg delif =global ethE
L oifcfg setif global ethE6#;S.:.#.E?public
L oifcfg delif global eth#
L oifcfg setif global eth#6#S:.#P.#.E?clusterNinterconnect
L oifcfg getif
ethE #;S.:.#.E global public
eth# #S:.#P.#.E global clusterNinterconnect
you chec' that the ne! information is correct
This code is used to check that the new in6or*ation is correctD
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
83/172
oi6c6g geti6
eth# "E?.2.".# global public
eth" "?2."9.".# global clusterinterconnect
Co$e
L BCR% H"(7M6bin6oifcfg getif
ethE #;S.:.#.E global public
eth# #S:.#P.E.E global clusterNinterconnect
L oifcfg delif =global ethE
L oifcfg setif global ethE6#;S.:.#.E?public
L oifcfg delif global eth#
L oifcfg setif global eth#6#S:.#P.#.E?clusterNinterconnect
L oifcfg getif
ethE #;S.:.#.E global public
eth# #S:.#P.#.E global clusterNinterconnect
,ote
A network inter6ace can be stored as a global inter6ace or as a nodespeci6ic
inter6ace. An inter6ace is stored as a global inter6ace when all the nodes o6 a /A&
cluster have the sa*e inter6ace connected to the sa*e subnet (reco**ended!. It
is stored as a nodespeci6ic inter6ace only when there are so*e nodes in the
cluster that have a di66erent set o6 inter6aces and subnets.
"racle Cluster!are provides t!o publicly available components that can be used to help
protect any application on a cluster?
t!e Hig! Availability frame#or/ an$
The High Availability frame!or' provides facilities to manage your applications under CR%
protection via command=line tools such as *(#_(&-#!&(, *(#_#!$(!, and *(#_#!'.
This frame!or' is also used to automatically invo'e control scripts that you created so that
CR% can start, stop, and monitor your applications. "CR is used as a repository to definefailover policies and other important parameters for CR% to control your applications.
t!e C AP2
The C A/8 can be used to directly manipulate "CR to define ho! CR% should protect an
application. This A/8 can be used to modify, at runtime, ho! the application should be
managed by CR%.
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
84/172
8f the application you !ant CR% to protect is accessed by !ay of a net!or', you have the
possibility to create a irtual 8nternet /rotocol address for your application. This is
referred to as an application 8/.
Application 8/s created by "racle Cluster!are are able to fail over from one )et!or'
8nterface Card or )8C to another on the same node as !ell as from one )8C to another
one located on another node in case all public net!or's are do!n on a given node.
8n addition, your application might need to store configuration files on a dis'. To share
these files among nodes, "racle Corporation also provides you !ith the "racle Cluster
File %ystem or "CF%.
(ost of the differences bet!een resources attached to application 8/s and RAC 8/s
reside in the fact that they are configured differently !ithin "racle Cluster!are.
For eample, it ma'es no sense from a RAC perspective to fail over either a database
instance or listener because there is already a listener and an instance !aiting on another
node. Therefore, the listener does not listen on any other 8/s than the one node=specific
8/.
-oo'ing at the CR% profile of those resources, you !ill see the differences. Also, most of
the time, there are many applications attached to a RAC 8/ such as listeners, database
instances, and A%( instances.
Although it is possible to associate an application 8/ to multiple applications, this is not
recommended because if one of the applications cannot be started or restarted on a
node, it !ill be failed over to another node !ith the 8/, !hich in turn !ill force the other
applications to be also relocated.
This is especially true if the applications are independent.
Ho!ever, one noticeable difference bet!een a RAC 8/ and an application 8/ is that
after a RAC 8/ is failed over to a surviving node, it no longer accepts connections
0)AG1, thus forcing clients that are trying to access that address, to reconnect using
another address.
8f it accepts ne! connections, then if a failbac' occurs, after the node is bac' again, then
current connections going through the 8/ on the failed=over node are lost because the
interface is gone.
Application 8/s, on the other side, are fully functional after they are failed over, and
continue to accept connections. Application 8/s are mainly used !hen the application
cannot be restarted on a node.
RAC 8/s are mainly used !hen there is a node failure because clients can use other
nodes to connect.
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
85/172
'uestion
hat is the first step that should be performed !hen changing the 8/ address of
a cluster node in a -inu environment9
Options(
#. erify that the 8/ is no longer running
:. %top all resources depending on the 8/
;. Determine the interface used to support your 8/
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
86/172
There are some basic steps you need to follo! to register an application that is monitored
by the CR% frame!or'. 8f your application is accessed via the net!or', and if you !ant
your application to be still available after some net!or' problems, it is recommended that
you create an application 8/ for your application.
First, you should create an application profile to define the net!or' information relating to
this 8/ for eample, the name of the public net!or' adapter to use, the 8/ address,
and the netmas'. 8n the profile, you should also specify the 3#(=-
action script provided by "racle Cluster!are. &ou can then use the default values for the
failover policies.
2se the *(#_(&-#!&(command to add this application 8/ to the list of managed
applications.
"n 2)8J=based operating systems, the application 8/ script must run as the (''!user.
%o, using *(#_#&!&(%, you can change the o!ner of the 8/ to (''!. 2sing the same
command tool, you can also enable another user, such as '($*,&, to start theapplication 8/.
hen done, you can use the *(#_#!$(! command to start the 8/ application.
&ou should then
create an action script
&ou can no! create an action script to support the start, chec', and stop actions on your
application.
create t!e profile for your application
Create the profile for your application. &ou should use enough resource attributes to define
at least the action script location and name, the chec' interval, the failover policies, and
the re3uired application 8/ resource 0if necessary1. &ou can manage application
availability by specifying starting resources during cluster or node startup, restarting
applications that fail, and relocating applications to other nodes if they cannot run in their
current location.
$efine un$er #!ic! user your application s!oul$ be running
-i'e for the 8/ application, you can define under !hich user your application should be
running as !ell as !hich user can start your application. That is !hy on 2)8J=based
platforms, "racle Cluster!are must run as the (''!user, and on indo!s=based
platforms, "racle Cluster!are must run as A6%-"-#!($!'(.
register your application" an$
hen done, you can register your application by using the *(#_(&-#!&(command.
start your application
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
87/172
&ou are then ready to start your application that is going to be monitored by "racle
Cluster!are. Do this by eecuting the *(#_#!$(!command.
Here is an eample that protects the apache application using "racle Cluster!are?
Co$e
*(#_('-,& @*(&$!& AIP1 @! $,-*$!-'" \
@$ ?CRS HOME97-"3#(=- \
@' '-&!0'=144.25.214.4'"255.255.252.0
*(#_(&-#!&( AIP1
*(#_#&!&(% AIP1 @' (''!
*(#_#&!&(% AIP1 @3 3#&('($*,&(+
/ *(#_#!$(! AIP1
create t!e App7P1 application
&ou create the App/# application 8/ profile by using the *(#_('-,&@*(&$!&
command. 8n order, the parameters specified in this eample are the name of the
application 8/, the application type, the predefined action script usrvip located in ?CRS
HOME97-", the name of the public net!or' adapter, the 8/ address used to locate your
application regardless of the node it is running on, and the netmas' used for the 8/. The
result of this command is to create a tet file called AP1.*$in ?CRS
HOME9*(#('-,&. This file contains the attributes and is read by *(#_(&-#!&(. 8f
your session is not running as the root user, the .cap file is created in ?CRS
HOME9*(#37,-*.
register your application
2se the *(#_(&-#!&(command to register your application 8/ !ith "racle
Cluster!are.
run as t!e rootuser
"n 2)8J=based operating systems, the application 8/ action script must run as the (''!
user. As the (''!user, change the o!ner of the resource as sho!n using the
*(#_#&!&(%@'command.
manage your application" an$
As the (''!user, enable the '($*,&user to manage your application 8/ via CR%
commands. 2se the *(#_#&!&(%@3command.
start t!e application
As the '($*,&user, start the application 8/ using the *(#_#!$(!command.
After the application 8/ is functional, you can !rite the action script for your application.
The eample can be used by "racle Cluster!are as an action script to protect the apache
application. 8t is a shell script that can parse one argument !ith three different values. 8t
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
88/172
uses the $$*&*!,command tool to start and stop the apache application on your
node. 8t uses the :&! command to chec' !hether a eb page can be accessed.
These are the three actions CR% !ill perform !hile protecting your application. For the
net steps, it is supposed that this script is called %A1.#*(.
Co$e
7-"#
IPADD144.25.214.4
HTTDCONFLOC&!*!!6*'"!!6.*'"
WEBCHECK!!/IPADD0-*'"#$$*&_7.-
*$#& /1 -"
J#!$(!J[
3#(7-"$$*&*!, @ #!$(! @ /HTTDCONFLOC
RET/]
;;
J#!'J[
3#(7-"$$*&*!, @ #!'
RET/]
;;
J*&*J[
3#(7-":&! @ @6&,&!&+$!&( /WEBCHECK
RET/]
;;
[
RET0 ;;
$*
&-! /RET
,ote
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
89/172
*(#_(&-#!&(%A1
*(#_#&!&(% %A1 @'(''!
*(#_#&!&(% %A1 @33#&('($*,&(+
/ *(#_#!$(!%A1
(1app+5scr
To create a pro6ile 6or your application. 4ere your resource is called *yApp". It uses
%A1.#*(as its action script and depends on the App1I3" application. I6 App1I3" 6ails
or i6 it is relocated to another node, then )racle &lusterware stops or *oves the *yApp"
application. The e'a*ple also de6ines its check interval to be 6ive seconds, and the
nu*ber o6 atte*pts to restart the application to two. This *eans that )racle &lusterware
will 6ail over the application to another node a6ter a second local 6ailure happens.
crs_re6ister
The *(#_(&-#!&(co**and registers *yApp" with )racle &lusterware.
crs_setper( (1App+ )o
0ecause you want the apache server listening on the de6ault port 9#, you want the
application to e'ecute as the (''!user. As the (''!user, change the owner o6 the
resource, using the *(#_#&!&(%@'co**and.
crs_setper( (1App+ )*
As the (''!user, enable the '($*,&user to *anage your application 1I3 via &/S
co**ands. Use the*(#_#&!&(%
@3
co**and.
crs_start
As the '($*,&user, start *yApp" by using the *(#_#!$(!co**and.
'uestion
After creating an application 8/, !hat is the net step in registering an application
that is monitored by the CR% frame!or'9
Options(
#. %et permissions on the application
:. Create the profile for the application
;. %tart the application by using *(#_#!$(!command
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
90/172
Ans#er
Option 1:Incorrect. This is the 6ourth step in registering an application that is
*onitored by the &/S 6ra*ework. $ike 6or the 1I3 application, you can de6ine
under which user your application should be running as well as which user can
start your application. Setting the per*issions on the application occurs a6tercreating the pro6ile 6or the application.
Option 2:Incorrect. This is the third step in registering an application that is
*onitored by the &/S 6ra*ework. Fou should use enough resource attributes to
de6ine at least the action script location and na*e, the check interval, the 6ailover
policies, and the reCuired application 1I3 resource. &reating the pro6ile 6or the
application occurs a6ter creating an action script to support the start, check, and
stop actions on the application.
Option 3:Incorrect. This is the si'th, and 6inal, step in registering an application
that is *onitored by the &/S 6ra*ework. A6ter registering the application by usingthe *(#_(&-#!&(co**and, you are then ready to start the application that is
going to be *onitored by )racle &lusterware. -o this by e'ecuting the
*(#_#!$(!co**and.
Option 4:&orrect. A6ter creating an application 1I3, the ne't step is to create an
action script that accepts three para*eters 5 the #!$(!para*eter should start
the application, the *&*para*eter should con6ir* that the application is up,
and the #!'para*eter should stop the application.
Correct ans#er)s*(
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
91/172
application. Then, being a root user, you can enable the oracle user to manage your
application 8/ through CR% commands.
AC ac/up an$ ecovery ettings an$ MA,
Learning Objectives
After completing this topic, you should be able to
recognize RAC recovery and backup settings
identify how to use RMA$ in a RAC environment
1. ecovering AC an$ bac/ up settings
RAC bac'up and recovery is almost identical to other "racle Database bac'up and
recovery operations. This is because you are bac'ing up and recovering a single
database.
The main difference is that !ith RAC you are dealing !ith multiple threads of redo log
files.
Although RAC provides you !ith methods to avoid or to reduce do!n time due to a failure
of one or more 0but not all1 of your instances, you must still protect the database itself,
!hich is shared by all the instances.
This means that you need to consider dis' bac'up and recovery strategies for your
cluster database 5ust as you !ould for a non=clustered database.
To minimi*e the potential loss of data due to dis' failures, you may !ant to use dis'
mirroring technology 0available from your server or dis' vendor1. As in non=clustered
databases, you can have more than one mirror if your vendor allo!s it, to help reduce the
potential for data loss and to provide you !ith alternative bac'up strategies.
For eample, !ith your database in ARCHIELOGmode and !ith three copies of your
dis's, you can remove one mirror copy and perform your bac'up from it !hile the t!o
remaining mirror copies continue to protect ongoing dis' activity.
To do this correctly, you must first put the tablespaces into bac'up mode and then, if
re3uired by your cluster or dis' vendor, temporarily halt dis' operations by issuing the
ALTERSYSTEMSUSPENDcommand.
After the statement completes, you can brea' the mirror and then resume normal
operations by eecuting the ALTERSYSTEMRESUMEcommand and ta'ing the
tablespaces out of bac'up mode.
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
92/172
During bac'up and recovery operations involving archived log files, the "racle server
determines the file destinations and names from the control file.
8f you use R(A), the archived log file path names can also be stored in the optional
recovery catalog. Ho!ever, the archived log file path names do not include the node
name, so R(A) epects to find the files it needs on the nodes !here the channels are
allocated.
8f you use a cluster file system, your instances can all !rite to the same archive log
destination. This is 'no!n as the cluster file system scheme. +ac'up and recovery of the
archive logs are easy because all logs are located in the same directory.
8f a cluster file system is not available, then "racle recommends that local archive log
destinations be created for each instance !ith )F%=read mount points to all other
instances. This is 'no!n as the local archive !ith )et!or' File %ystem or )F% scheme.
During bac'up, you can either bac' up the archive logs from each host or select one host
to perform the bac'up for all archive logs.
During recovery, one instance may access the logs from any host !ithout having to first
copy them to the local destination. 2sing either scheme, you may !ant to provide a
second archive destination to avoid single points of failure.
'uestion
hat are characteristics of using a cluster file system for bac'up and recovery
operations involving archived log files9
Options(
#. Archive logs from each instance are !ritten to the same file location
:. 7ach instance can read mounted archive destinations of all instances
;. A second archive destination should be provided to avoid single points of failure
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
93/172
one host to per6or* the backup 6or all archive logs. -uring recovery, one instance
*ay access the logs 6ro* any host without having to 6irst copy the* to the local
destination.
Option 3:&orrect. Using either the cluster 6ile syste* sche*e or the local archive
with =S sche*e, you *ay want to provide a second archive destination to avoid
single points o6 6ailure.
Option 4:Incorrect. I6 a cluster 6ile syste* is not available, then )racle
reco**ends that local archive log destinations be created 6or each instance with
=Sread *ount points to all other instances. This is known as the local archive
with =S sche*e.
Correct ans#er)s*(
#. Archive logs from each instance are !ritten to the same file location
;. A second archive destination should be provided to avoid single points of failure
To use a flash recovery area in RAC, you must place it on an A%( dis' group, a cluster
file system, or on a shared directory that is configured through certified )F% for each
RAC instance. That is, the flash recovery area must be shared among all the instances of
a RAC database.
&ou access the Cluster Database bac'up and recovery related tas's by clic'ing the
Availabilitytab on the Cluster Database home page.
"n the Availability tabbed page, you can use R(A) to perform a range of bac'up and
recovery operations, such as scheduling bac'ups, performing recovery !hen necessary,
and configuring bac'up and recovery settings.
There are also lin's related to "racle %ecure +ac'up and %ervice management.
&rap!ic
The Availability tabbed page contains a section na*ed 0ackup;/ecovery. This
section has two subsections na*ed Setup and
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
94/172
&rap!ic
The /ecovery Settings page consists o6 sections that include Instance /ecovery,
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
95/172
This re3uirement is in effect !hen the COMPATIBLEparameter is set to #E.E or greater.
2se the ^Ror ^(parameter to include the resetlogs identifier to avoid over!riting the
logs from a previous incarnation. 8f you do not specify a log format, then the default is
operating system specific and includes^!, ^#, and ^(.
As an eample, if the instance associated !ith redo thread number # setsLOG_ARCHIE_FORMATto ,'_^!_^#_^(.$(*, then its archived redo log files are
named
logN#N#EEEN:;
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
96/172
control file does not need to be globally available to all instances in a RAC environment
though.
&ou can use a cluster file or a shared ra! device as !ell as a local directory that eists on
each node in your cluster. This is one eample.
For recovery, you must ensure that each recovery node can access the archive log files
from all instances by using one of the archive schemes discussed earlier, or ma'e the
archived logs available to the recovering instance by copying them from another location.
Co$e
RMAN9 CONFIGURE SNAPSHOT CONTROLFILE TO
J'($*,&67_-,#"$##"$_('61.*J;
The snapshot control file is a temporary file that R(A) creates to resynchroni*e from a
read=consistent version of the control file. R(A) needs a snapshot control file only !henresynchroni*ing !ith the recovery catalog or !hen ma'ing a bac'up of the current control
file.
8n a RAC database, the snapshot control file is created on the node that is ma'ing the
bac'up. &ou need to configure a default path and file name for these snapshot control
files that are valid on every node from !hich you might initiate an R(A) bac'up.
Run this R(A) command to determine the configured location of the snapshot control
file.
Co$e
RMAN9 SHOW SNAPSHOT CONTROLFILE NAME;
301$'($*,&('63*!11.1.067##*#"$_('6.*
&ou can change the configured location of the snapshot control file. For eample, on
2)8J=based systems you can specify the snapshot control file location as
#"$_('6.*located in the A%( dis' group FRAby entering the follo!ing at the
R(A) prompt.
This command globally sets the configuration for the location of the snapshot control filethroughout your cluster database.
Co$e
RMAN9 CONFIGURE SNAPSHOT CONTROLFILE NAME TO
JFRASNAP#"$_('6.*J;
RMAN9 CONFIGURE SNAPSHOT CONTROLFILE NAME TO
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
97/172
J'*#'($6$!$67##*#"$_('6.*J;
RMAN9 CONFIGURE SNAPSHOT CONTROLFILE NAME TO
J6&=#62J;
,ote
The CONFIGUREco**and creates persistent settings across /
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
98/172
8f you cannot configure the cluster so that each node can access all bac'ups, then, during
restore and cross=chec' operations, you must allocate channels on multiple nodes by
providing the CONNECToption to the CONFIGURECHANNELcommand so that every
bac'up can be accessed by at least one node.
8f some bac'ups are not accessible during cross=chec' because no channel !as
configured on the node that can access those bac'ups, the bac'ups are mar'ed
EXPIREDin the R(A) repository after the cross=chec'.
For eample, you can use CONFIGURECHANNEL ...CONNECTin an "racle RAC
configuration in !hich tape bac'ups are created on various nodes in the cluster and each
bac'up is accessible only on the node on !hich it is created.
hen ma'ing bac'ups in parallel, R(A) channels can connect to a different instance in
the cluster.
The t!o possible configurations are
Co$e
CONFIGURE DEFAULT DEICE TYPE TO #7!;
CONFIGURE DEICE TYPE #7! PARALLELISM Q;
CONFIGURE CHANNEL 1 DEICE TYPE #7!
CONNECTJ##($*
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
99/172
all open. For eample, if the RACDB1instance has the database mounted but the RACDB2
and RACDBQinstances have the database open, the bac'up fails.
8n some cluster database configurations, some nodes of the cluster have faster access to
certain data files than to other data files. R(A) automatically detects this, !hich is 'no!n
as node a66inity awareness.
hen deciding !hich channel to use to bac' up a particular data file, R(A) gives
preference to the nodes !ith faster access to the data files that you !ant to bac' up.
For eample, if you have a three=node cluster, and if node # has faster read6!rite access
to data files , P, and S than do the other nodes, then node # has greater node affinity to
those files than nodes : and ; and R(A) !ill ta'e advantage of this automatically.
Co$e
CONFIGURE DEFAULT DEICE TYPE TO #7!;
CONFIGURE DEICE TYPE #7! PARALLELISM Q;
CONFIGURE CHANNEL 1 DEICE TYPE #7!
CONNECTJ##($*
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
100/172
CONFIGURECHANNELCONNECTstatements anymore. &ou only need to define your
degree of parallelism by using a command such as CONFIGUREDEICETYPE6-#
PARALLELISM, and then run bac'up or restore commands.
R(A) then automatically connects to different instances and does the 5ob in parallel. The
grid environment selects the instances that R(A) connects to, based on load balancing.
Co$e
CONFIGURE DEFAULT DEICE TYPE TO #7!;
CONFIGURE DEICE TYPE #7! PARALLELISM Q;
As a result of this, configuring R(A) parallelism in a RAC environment becomes as
simple as setting it up in a non=RAC environment. +y configuring parallelism !hen
bac'ing up or recovering a RAC database, R(A) channels are dynamically allocated
across all RAC instances.
Co$e
CONFIGURE DEFAULT DEICE TYPE TO #7!;
CONFIGURE DEICE TYPE #7! PARALLELISM Q;
,ote
/
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
101/172
Option 1:&orrect. In )racle -atabase "#g, /A& allows the use o6
nondeter*inistic connect strings that can connect to di66erent instances based on
/A& 6eatures such as load balancing. There6ore, to support /A&, the /
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
102/172
8f you use a noncluster file system local archiving scheme, then a node can read only
those archived redo logs that !ere generated by an instance on that node.
R(A) never attempts to bac' up archived redo logs on a channel that it cannot read.
During a restore operation, R(A) automatically performs the autolocation of bac'ups. A
channel connected to a specific node attempts to restore only those files that !ere
bac'ed up to the node.
For eample, assume that log se3uence #EE# is bac'ed up to the drive attached to
)ode#, !hereas log #EE: is bac'ed up to the drive attached to )ode:. 8f you then
allocate channels that connect to each node, then the channel connected to )ode# can
restore log #EE# 0but not #EE:1, and the channel connected to )ode: can restore log
#EE: 0but not #EE#.1
ummary
RAC bac'up and recovery is similar to that of "racle Database bac'up and recoveryoperations, ecept that RAC deals !ith multiple threads of redo log files. &ou can use
7nterprise (anager to configure important recovery settings for your cluster database.
&ou need to consider dis' bac'up and recovery strategies for your cluster database 5ust
as you !ould for a non=clustered database.
&ou can use R(A) !ith stored scripts, interactive scripts, or an interactive $28 front end.
8f you use different "racle Home locations for your RAC instances on each of your nodes,
create a snapshot control file in a location that eists on all your nodes. The snapshot
control file is a temporary file that R(A) creates to resynchroni*e from a read=consistent
version of a control file.
Configure AC ac/up
Learning Objective
After completing this topic, you should be able to
recognize how to configure backup and recovery in RAC
1. Distributing bac/ups
hen configuring the bac'up options for RAC, you can have the follo!ing configurations?
net#or/ bac/up server
)et!or' bac'up server is a dedicated bac'up server that performs and manages bac'ups
for the cluster and the cluster database. )one of the nodes have local bac'up appliances.
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
103/172
one local $rive" an$
8n one local drive one node has access to a local bac'up appliance and performs and
manages bac'ups for the cluster database. All nodes of the cluster should be on a cluster
file system to be able to read all data files, archived redo logs, and %/F8-7s. 8t is
recommended that you do not use the noncluster file system archiving scheme if you have
bac'up media on only one local drive.
multiple $rives
8n multiple drives, each node has access to a local bac'up appliance and can !rite to its
o!n local bac'up media.
8n the cluster file system scheme, any node can access all the data files, archived redo
logs, and %/F8-7s.
8n the noncluster file system scheme, you must !rite the bac'up script so that the bac'up
is distributed to the correct drive and path for each node.
For eample, node # can bac' up the archived redo logs !hose path names begin !ith
$(*_6!_1, node : can bac' up the archived redo logs !hose path names begin !ith
$(*_6!_2, and node ; can bac' up the archived redo logs !hose path names begin
!ith $(*_6!_Q.
8n a cluster file system bac'up scheme, each node in the cluster has read access to all
the data files, archived redo logs, and SPFILEs. This includes Automated %torage
(anagement or A%(, cluster file systems and )et!or' Attached %torage or )A%.
hen bac'ing up to only one local drive in the cluster file system bac'up scheme, it is
assumed that only one node in the cluster has a local bac'up appliance such as a tapedrive. 8n this case, run these one=time configuration commands.
Co$e
RMAN9 CONFIGURE DEICE TYPE #7! PARALLELISM 1;
RMAN9 CONFIGURE DEFAULT DEICE TYPE TO #7!;
+ecause any node performing the bac'up has read6!rite access to the archived redo logs
!ritten by the other nodes, the bac'up script for any node is simple.
8n this case, the tape drive receives all data files, archived redo logs, and SPFILEs.
Co$e
RMAN9 BACKUP DATABASE PLUS ARCHIELOG DELETE INPUT;
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
104/172
hen bac'ing up to multiple drives in the cluster file system bac'up scheme, it is
assumed that each node in the cluster has its o!n local tape drive.
&ou need to perform a one=time configuration so that one channel is configured for each
node in the cluster. This is a one=time configuration step. For eample, enter this at the
R(A) prompt.
Co$e
CONFIGURE DEICE TYPE #7! PARALLELISM Q;
CONFIGURE DEFAULT DEICE TYPE TO #7!;
CONFIGURE CHANNEL 1 DEICE TYPE #7! CONNECT
J3#&(1$##:61
-
8/10/2019 Oracle Database 11g RAC Database and Oracle Clusterware Administration
105/172
The code to per6or* a oneti*e con6iguration to con6igure one channel 6or each
node in the cluster is the 6ollowingD
&)=IGU/ -1I& TF3 sbt 3A/A$$$IS< EK
&)=IGU/ -=AU$T -1I& TF3 T) sbtK
&)=IGU/ &4A$ " -1I& TF3 sbt &)&T Jusr";pwd"n"JK
&)=IGU/ &4A$ 2 -1I& TF3 sbt &)&T Jusr2;pwd2n2JK
&)=IGU/ &4A$ E -1I& TF3 sbt &)&T JusrE;pwdEnEJK
%imilarly, you can perform this one=time configuration for a device type of DISK. Develop
a production bac'up script for !hole database bac'ups that you can run from any node.
ith the BACKUPeample, the data file bac'ups, archived redo logs, and SPFILE
bac'ups are distributed among the different tape drives. Ho!ever, channel # can read
only the logs archived locally on $(*_6!_1.
This is because the autolocation feature restricts channel # to bac' up only the archivedredo logs in the $(*_6!_1directory. +ecause node : can read files only in the
$(*_6!_2directory, channel : can bac' up only the archived redo logs in the
$(*_6!_2directory, and so on. The important point is that all logs are bac'ed up, but
they are distributed among the different drives.
&rap!ic
The code to per6or* oneti*e con6iguration 6or a device type o6 -IS is the
6ollowingD
0A&U3 -ATA0AS 3$US A/&4I1$)G -$T I3UTK
(e