Anda di halaman 1dari 246

RAC Attack - Oracle Cluster Database at Home

Edited by Jeremy Schneider

Wikibooks.org
Sponsored by Pythian
April 5, 2013
On the 28th of April 2012 the contents of the English as well as German Wikibooks and Wikipedia projects were
licensed under Creative Commons Attribution-ShareAlike 3.0 Unported license. An URI to this license is given
in the list of gures on page 229. If this document is a derived work from the contents of one of these projects
and the content was still licensed by the project under this license at the time of derivation this document has to
be licensed under the same, a similar or a compatible license, as stated in section 4b of the license. The list of
contributors is included in chapter Contributors on page 227. The licenses GPL, LGPL and GFDL are included in
chapter Licenses on page 239, since this book and/or parts of it may or may not be licensed under one or more of
these licenses, and thus require inclusion of these licenses. The licenses of the gures are given in the list of gures
on page 229. This PDF was generated by the L
A
T
E
X typesetting software. The L
A
T
E
X source itself was generated
by a program written by Dirk Hnniger with modications by Jeremy Schneider. Dirks original program
is freely available under an open source license from http://de.wikibooks.org/wiki/Benutzer:
Dirk_Huenniger/wb2pdf. This distribution also contains a congured version of the pdflatex compiler
with all necessary packages and fonts needed to compile the L
A
T
E
X source included in this PDF le. Full
instructions (including Jeremys modications) for dynamically generating this print book using the RAC Attack
wikibook contents are available at http://racattack.org/book.
Contents
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Making This Lab Successful . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3. Lab Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Planning Your Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2. Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
I. Setting Up RAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3. Hardware and Windows Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.1. Hardware and Windows Minimum Requirements . . . . . . . . . . . . . . . . . . . . 13
3.2. Install VMware Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.3. Setup Virtual Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.4. Setup Virtual Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.5. Download Oracle Enterprise Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4. Linux Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.1. Create VM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2. Prep for OS Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.3. OS Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.4. Wrap-up OS Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.5. Create RAC Attack DVD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.6. Prep for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5. Create Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.1. Create Interconnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.2. Create Shared Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.3. Copy VM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
5.4. Congure Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.5. Congure Node 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.6. Congure Node 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.7. SSH and CVU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
6. Grid Install (ASM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
6.1. Setup ASMLIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
6.2. Cluster Verication Utility (ASM) . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6.3. Install Grid Infrastructure (ASM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.4. Increase CRS Fencing Timeout (ASM) . . . . . . . . . . . . . . . . . . . . . . . . . 116
6.5. Setup ASM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
7. Grid Install (Shared Filesystem) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
7.1. Setup OCFS2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
7.2. Cluster Verication Utility (Shared Filesystem) . . . . . . . . . . . . . . . . . . . . . 133
IV
Contents
7.3. 11gR2 Bug Workaround . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
7.4. Install Grid Infrastructure (Shared Filesystem) . . . . . . . . . . . . . . . . . . . . . 137
7.5. Increase CRS Fencing Timeout (Shared Filesystem) . . . . . . . . . . . . . . . . . . 152
8. RAC Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
8.1. Install Database Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
9. Create Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
9.1. Create DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
10. Rolling Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
10.1. Patching Grid and Database Software . . . . . . . . . . . . . . . . . . . . . . . . . . 177
II. Exploring RAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
11. Clusterware Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
11.1. Clusterware and Fencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
11.2. Clusterware Callouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
12. Services, Failover and Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
12.1. Install Instant Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
12.2. Service Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
12.3. Connection Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
12.4. Runtime Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
12.5. Client Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
12.6. Server Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
13. RAC SQL and PLSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
13.1. Install Runstats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
13.2. Sequence Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
13.3. Parallel Query Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
13.4. Scheduler Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
13.5. File Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
14. RAC Backups and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
14.1. Setup Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
14.2. Flashback Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
14.3. Block Change Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
14.4. Archived Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
14.5. Database Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
14.6. Database Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
15. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
16. Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
16.1. Fair Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
16.2. Copyrighted Web Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
16.3. Use of Microsoft Copyrighted Content . . . . . . . . . . . . . . . . . . . . . . . . . 239
16.4. GNU GENERAL PUBLIC LICENSE . . . . . . . . . . . . . . . . . . . . . . . . . . 239
16.5. GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
16.6. GNU Lesser General Public License . . . . . . . . . . . . . . . . . . . . . . . . . . 242
1
1. Overview
RAC Attack is a free curriculum and platform for hands-on learning labs related to Oracle RAC (cluster
database). We believe that the best way to learn about RAC is with a lot of hands-on experience. This
curriculum has been used by individuals at home and by instructors in classes since 2008.
The original contributors were Jeremy Schneider, Dan Norris and Parto Jalili. The handbook was
published at http://www.ardentperf.com for several years before its migration to this wikibook.
All RAC Attack content was released under the CC-BY-SA license in May 2011 when this project was
initiated.
To learn about upcoming RAC Attack events or to organize one yourself, visit the Events page. You
can use the shortcut http://racattack.org/events to access this page at any time.
The goal of this workbook is to help students learn about Oracle RAC cluster databases through guided
examples. (Specically, 11gR2 RAC on VMware Server with ASM or Shared Filesystem and Oracle
Enterprise Linux 5.) It can be used by organizers of events, by instructors in classes or by individuals at
home.
RAC Attack differs in depth from other tutorials currently available.
Every keystroke and mouse click is carefully documented here.
The process is covered from the very beginning to the very end - from the very rst installation of
VMware on your laptop to various experiments on your running cluster database... with everything in
between.
The labs in the main workbook have been tested thoroughly and repeatedly.
1.1. Prerequisites
Students should be able to navigate in Unix - for example, listing les with "ls".
1.1.1. Hardware Minimum Requirements
Most modern laptop and desktop computers should be powerful enough to run a two-node virtual RAC
cluster. In a nutshell, these are the recommended minimums:
Dual-core 2GHz 32-bit processor (it's been done with single-core)
4GB memory (it's been done with 3GB)
Two physical hard disks - not partitions (it's been done with one)
External HD for laptops (it's been done with certain USB ash memory sticks)
50 GB + 10.5 GB free space (it's been done with slightly less)
3
Overview
Windows XP or Vista (linux & mac are not covered in these instructions)
1.2. Making This Lab Successful
Read about: Planning Your Time
Focus on what you can learn.
Choose as many specic learning goals as possible and take your time to investigate them.
Be creative and experiment.
Take risks and don't be afraid to break things.
Take advantage of the classroom or event setting, if you're in one
You can "jumpstart" back to the beginning of a lab with one click.
Record discoveries and questions to share with others.
Help each other out. There are more participants than instructors!
When possible, cut-and-paste steps directly into a PuTTY SSH terminal session.
1.3. Lab Tips
All passwords are racattack
Always choose "I moved this VM" when asked, unless instructions specically say to choose "copied".
If using your own laptop, start the VMs one after another. That is, wait until the rst VM completes
bootup - including clusterware and database - before starting the second.
Classroom specic tips:
Common login account for Workstation and VMware console: "admin"
Common changes from the lab handbook:
Use 5GB shared disks not 3.25GB
Use 900MB memory not 760MB
Jumpstarts could take longer than you think... read: Planning Your Time
"RAC11g" directory is often at C:\RAC11g
Handout is available with stretch goals for advanced participants
1.3.1. Storage Overview
ASM Shared FS
/dev/sdb DATA /u51 (/u61)
/dev/sdc BACKUP /u52
1.3.2. Networking Overview
collabn1 collabn2
4
Lab Tips
collabn1 collabn2
Interconnect 172.16.100.51 172.16.100.52
Administration 192.168.78.51 192.168.78.52
VIP 192.168.78.61 192.168.78.62
SCAN 192.168.78.250
5
2. Planning Your Time
For the most benet, you must plan your time carefully. There will not be enough time to complete all
of the labs - so choose the ones which most interest you.
Information
If you are using your own computer at home or at an event, then you always need to complete the
rst lab (Hardware and Windows Preparation
1
) before you can jumpstart to any following labs. If
you are in a class then the instructor has probably completed the rst lab for you, and you can
begin with a jumpstart.
2.1. Overview
Figure 1 Overview of Part I with Jumpstarts
7
Planning Your Time
2.2. Time
These times were gathered with a laptop just meeting the recommended minimum requirements
2
. In
addition to the wait times listed below, we suggest that you reserve about 40 minutes of work time to
complete any given lab.
Information
Downloads only apply to home users. If you are at an event or a class then the organizers have
already downloaded the software for you.
2 Chapter 3.1 on page 13
8
Time
J
u
m
p
s
t
a
r
t
S
i
z
e
N
e
x
t
L
a
b
J
u
m
p
s
t
a
r
t
T
i
m
e
W
a
i
t
T
i
m
e
s
i
n
t
h
e
L
a
b
B
u
i
l
d
T
i
m
e
H
a
r
d
w
a
r
e
a
n
d
W
i
n
-
d
o
w
s
P
r
e
p
a
r
a
t
i
o
n
3
D
o
w
n
l
o
a
d
:
V
M
w
a
r
e
S
e
r
v
e
r
(
5
0
0
M
B
)
D
o
w
n
l
o
a
d
:
O
E
L
(
3
G
B
)
0
C
r
e
a
t
e
V
M
4
1
5
m
i
n
:
L
i
n
u
x
I
n
s
t
a
l
l
D
o
w
n
l
o
a
d
:
O
r
a
c
l
e
C
l
u
s
t
e
r
&
D
a
t
a
b
a
s
e
(
4
.
5
G
B
)
1
3
G
B
C
r
e
a
t
e
C
l
u
s
t
e
r
5
4
m
i
n
:
j
u
m
p
s
t
a
r
t
5
m
i
n
:
C
o
p
y
V
M
3
m
i
n
:
s
t
a
r
t
u
p
c
o
l
-
l
a
b
n
1
3
m
i
n
:
s
t
a
r
t
u
p
c
o
l
-
l
a
b
n
2
6
m
i
n
2
1
3
G
B
G
r
i
d
I
n
s
t
a
l
l
(
A
S
M
6
o
r
S
h
a
r
e
d
F
S
7
)
1
1
m
i
n
:
j
u
m
p
s
t
a
r
t
3
m
i
n
:
s
t
a
r
t
u
p
n
o
d
e
s
2
5
m
i
n
:
G
I
I
n
s
t
a
l
l
1
0
m
i
n
:
r
o
o
t
.
s
h
c
o
l
-
l
a
b
n
1
8
m
i
n
:
r
o
o
t
.
s
h
c
o
l
-
l
a
b
n
2
1
7
m
i
n
3
2
0
G
B
R
A
C
I
n
s
t
a
l
l
8
1
8
m
i
n
:
j
u
m
p
s
t
a
r
t
4
m
i
n
:
s
t
a
r
t
u
p
c
o
l
-
l
a
b
n
1
4
m
i
n
:
s
t
a
r
t
u
p
c
o
l
-
l
a
b
n
2
4
2
m
i
n
:
D
B
I
n
s
t
a
l
l
3
0
m
i
n
3
C
h
a
p
t
e
r
3
.
1
o
n
p
a
g
e
1
3
4
h
t
t
p
:
/
/
e
n
.
w
i
k
i
b
o
o
k
s
.
o
r
g
/
w
i
k
i
/
.
.
%
2
F
L
i
n
u
x
%
2
0
I
n
s
t
a
l
l
5
C
h
a
p
t
e
r
5
.
1
o
n
p
a
g
e
7
1
6
C
h
a
p
t
e
r
6
.
1
o
n
p
a
g
e
9
5
7
C
h
a
p
t
e
r
7
.
1
o
n
p
a
g
e
1
2
3
8
C
h
a
p
t
e
r
8
.
1
o
n
p
a
g
e
1
5
3
9
Planning Your Time
J
u
m
p
s
t
a
r
t
S
i
z
e
N
e
x
t
L
a
b
J
u
m
p
s
t
a
r
t
T
i
m
e
W
a
i
t
T
i
m
e
s
i
n
t
h
e
L
a
b
B
u
i
l
d
T
i
m
e
4
2
7
G
B
C
r
e
a
t
e
D
a
t
a
b
a
s
e
9
2
5
m
i
n
:
j
u
m
p
s
t
a
r
t
4
m
i
n
:
s
t
a
r
t
u
p
c
o
l
-
l
a
b
n
1
4
m
i
n
:
s
t
a
r
t
u
p
c
o
l
-
l
a
b
n
2
2
2
m
i
n
:
D
B
C
r
e
a
t
e
4
5
m
i
n
5
2
8
G
B
R
o
l
l
i
n
g
P
a
t
c
h
e
s
1
0
P
a
r
t
I
I
:
E
x
p
l
o
r
i
n
g
R
A
C
1
1
(
w
/
o
P
S
U
)
2
5
m
i
n
:
j
u
m
p
s
t
a
r
t
6
m
i
n
:
s
t
a
r
t
u
p
c
o
l
-
l
a
b
n
1
6
m
i
n
:
s
t
a
r
t
u
p
c
o
l
-
l
a
b
n
2
2
2
m
i
n
:
G
I
P
a
t
c
h
c
o
l
l
a
b
n
1
2
0
m
i
n
:
D
B
P
a
t
c
h
c
o
l
l
a
b
n
1
2
2
m
i
n
:
G
I
P
a
t
c
h
c
o
l
-
l
a
b
n
2
2
0
m
i
n
:
D
B
P
a
t
c
h
c
o
l
l
a
b
n
2
5
m
i
n
:
c
a
t
b
u
n
d
l
e
4
5
m
i
n
6
3
7
G
B
P
a
r
t
I
I
:
E
x
p
l
o
r
i
n
g
R
A
C
1
2
(
w
/
P
S
U
)
3
5
m
i
n
:
j
u
m
p
s
t
a
r
t
6
m
i
n
:
s
t
a
r
t
u
p
c
o
l
-
l
a
b
n
1
6
m
i
n
:
s
t
a
r
t
u
p
c
o
l
-
l
a
b
n
2
6
0
m
i
n
9
C
h
a
p
t
e
r
9
.
1
o
n
p
a
g
e
1
6
5
1
0
C
h
a
p
t
e
r
1
0
.
1
o
n
p
a
g
e
1
7
7
1
1
C
h
a
p
t
e
r
1
1
.
1
o
n
p
a
g
e
1
8
9
1
2
C
h
a
p
t
e
r
1
1
.
1
o
n
p
a
g
e
1
8
9
10
Part I.
Setting Up RAC
11
3. Hardware and Windows Preparation
3.1. Hardware and Windows Minimum Requirements
This handbook will walk you through the process of creating a two-node Oracle RAC cluster on your
own laptop or desktop computer.
A detailed explanation of virtualization is beyond the scope of this lab but here is a simple overview of
what we are building:
Figure 2
3.1.1. Hardware Minimum Requirements
Most modern laptop and desktop computers should be powerful enough to run a two-node virtual RAC
cluster. In a nutshell, these are the recommended minimums:
Dual-core 2GHz 32-bit processor (it's been done with single-core)
13
Hardware and Windows Preparation
4GB memory (it's been done with 3GB)
Two physical hard disks - not partitions (it's been done with one)
External HD for laptops (it's been done with certain USB ash memory sticks)
50 GB + 10.5 GB free space (it's been done with slightly less)
Support les larger than 2GB, e.g. NTFS (it's been done without 2GB le support, on FAT32)
Windows XP or Vista (Linux & Mac are not directly covered in these instructions, but a supplementary
PDF covering VirtualBox
1
can be downloaded)
If your laptop or desktop does not meet these minimum requirements then it is not recommended
to try completing the RAC Attack labs. Although it is possible to complete these labs with smaller
congurations, there are many potential problems.
Information
Although we recommend against trying, RAC Attack has been done with: single-core, 3GB
memory, one physical hard drive, certain USB ash memory sticks, and less than 60GB of free
space.
3.1.2. Windows Preparation
1. Reboot windows. After this clean boot-up, don't start any unneeded programs - for example email
or instant messenger.
2. If possible, disable virus scanning (so that your antivirus software doesn't try to scan I/O on the
virtual machine disks).
3. Terminate any memory resident programs which are running, especially programs that help big
applications "quick-start" (these often use up a lot of memory).
1 http://www.orasavon.com/files/rac-attack-using-virtualbox-v0.4.pdf
14
Hardware and Windows Minimum Requirements
3.1.3. Hardware Vericaton
Processor
1. From the Start menu, choose or type RUN. In the dialog box that appears, type msinfo32.
Figure 3
2. Select System Summary in the left pane. Scroll down to Processor in the right pane. Verify that
you have at least 2 cores and that the speed is at least 2000 Mhz.
Figure 4
Memory
1. Scroll down to Memory in the right pane. Verify that Installed Physical Memory is at least
4GB. Also, verify that Available Memory is at least 1.4GB. You can terminate programs which
run in the foreground and background to increase the Available Memory.
Figure 5
15
Hardware and Windows Preparation
Hard Disks
1. In the left pane, choose Components -> Storage -> Disks. Count the number of Disk Drive
entries and verify that there are at least two.
Figure 6
Second Hard Disk
Connection Storage Type
Most Preferred
Least Preferred
Inside Computer (SATA)
- or -USB 3.0 - or -GigaBit
Ethernet Direct
no network, not shared - di-
rect to dedicated External
Hard Disk
Hard Disk
not shared with anything
else
USB 2.0 Thumb Drive Flash Mem-
ory
advertised / reviewed / tested
at least 50 MB/s
16
Hardware and Windows Minimum Requirements
Connection Storage Type
GigaBit Ethernet to Net-
work - or -100 MegaBit Eth-
ernet Direct
no network, not shared -
direct to dedicated External
Hard Disk
Thumb Drive Flash Mem-
ory
advertised / reviewed /
tested at least 15 MB/s
Shared Hard Disk
shared with other programs
Information
A single hard disk can max out as low as 45 MB/s. (This has been observed during RAC Attack
testing.) Typical USB Flash Thumb Drives get very, very poor performance and should not be
used. Some USB Flash Thumb Drives are marketed for performance; these typically get a
maximum around 30 MB/s. In tests for RAC Attack, USB drives worked well for storing ISO
images but somewhat poorly for storing virtual machine les.
For a detailed comparison of different connection types, refer to:
http://www.pixelbeat.org/speeds.html
Free Space Requirements
RAC Attack is carefully designed to use three directories and spread out I/O for the best possible
responsiveness during labs. You can choose how to spread the directories across your hard disks, and
the best conguration may vary depending on your connection and storage type.
Directory Name Description Free Space Suggested Location
RAC11g Operating System
Oracle RAC Software
50 GB Second Hard Disk (not
ash)
RAC11g-shared Oracle RAC Data 7.5 GB Windows Hard Disk*
RAC11g-iso OEL Installation DVD
(read-only)
3 GB Windows Hard Disk*
*page le is usually on Windows Hard Disk
Note: do not create the RAC11g directory (with OS and Oracle Software) on a Flash Thumb Drive.
Information
We worked hard to reduce the footprint of RAC Attack, however with 11gR2 it's very difcult to
reduce it beyond this.
17
Hardware and Windows Preparation
3.1.4. Login Accounts
RAC Attack requires a local windows user account with a password and with administrative privi-
leges. You may login using a network or password-free account only if the login account has admin
privileges and you know the password for a local account which also has admin privileges (and not an
empty password).
If your account is not local, or if your account does not have local admin privileges then you can create
an admin account by following the directions here.
Creating a Local Admin Account
1. From the Start menu, choose RUN. In the dialog box that appears, type cmd to launch a command
prompt.
On Windows 7 nd the "search programs" eld at the bottom of the Start menu. Type cmd in but
don't run it. Right click on "cmd" then choose to "Run as administrator".
After you have opened the command prompt as an admin user, run the following two commands:
net user admin racattack /add
net localgroup administrators admin /add
Login: admin
Password: racattack
Verifying the Login Account
1. Type net user %username% (if you're using a network or password-free login account then
replace %username% with the local password-ed admin account).
VERIFY the username, VERIFY that password required is yes, and VERIFY that local group
memberships include Administrators.
Figure 8
18
Install VMware Server
3.2. Install VMware Server
1. These labs have been tested with version 2.0.1 of VMware Server. Go to the VMware Server
website at http://www.vmware.com/go/getserver
Figure 9
2. Register for an account if you don't have one already.
a) Write down your license number.
b) If you are at home, then download VMware Server. If you are at a RAC Attack event then
the instructor-provided Jumpstart Drive contains a copy of VMware Server, so that you don't
need to download it. (However you still need a license number from the VMware website.)
Information
These labs have been tested with version 2.0.1 of VMware Server.
Figure 10
19
Hardware and Windows Preparation
3. Run the VMware Installer
Figure 11
4. Accept the license agreement and all default options during the installation process.
Figure 12
20
Install VMware Server
Figure 13
Figure 14
21
Hardware and Windows Preparation
5. Enter your license information, which is visible at the VMware website on the same page where
you downloaded the software.
Figure 15
6. Reboot your computer if you are asked by the VMware installer.
3.3. Setup Virtual Networks
1. Choose Manage Virtual Networks from the start menu. After the program starts, make sure
that you see an "Apply" button at the bottom. If you do not see an "Apply" button then close the
program and re-start it by right-clicking and choosing to "run as administrator" (this must be done
on Windows 7 normally).
Figure 16
22
Setup Virtual Networks
2. Click the Host Virtual Network Mapping Tab and then click the Right Arrow Button next to
VMnet1. Choose Subnet from the submenu.
Figure 17
3. Set the IP address to 172.16.100.0 and click OK.
Figure 18
23
Hardware and Windows Preparation
4. Click the Right Arrow Button next to Vmnet8 and choose Subnet from the submenu.
Figure 19
5. Set the IP address to 192.168.78.0 and click OK.
Figure 20
6. Click the APPLY button.
7. Return to the Summary tab and VALIDATE:
VMnet1 has subnet 172.16.100.0
24
Setup Virtual Networks
VMnet8 has subnet 192.168.78.0
Figure 21
8. Go to the NAT tab and VALIDATE that the VMnet host is VMnet8 and Gateway IP is
192.168.78.2
Figure 22
25
Hardware and Windows Preparation
3.4. Setup Virtual Storage
If you are at an event, then the event organizers might provide a special DEMO option - where you can
run a pre-congured RAC cluster on your own laptop. In order to use this DEMO option, follow this
lab but use the directories on the event-provided external hard drive.
1. RAC Attack is carefully designed to use three directories and spread out I/O for the best possible
responsiveness during labs. Create these three directories in the destinations that you chose
in Hardware and Windows Minimum Requirements , taking the guidelines into
consideration.
mkdir C:\RAC11g
mkdir D:\RAC11g-shared
mkdir D:\RAC11g-iso
In the RAC11g directory, make sure that collabn1 and collabn2 subdirectories don't exist.
rmdir C:\RAC11g\collabn1
rmdir C:\RAC11g\collabn2
2. The VMware Server management interface is web-based, and some new web browsers are not
compatible with it. There are two ways to open this management interface:
Open a non-default web browser and go to the address https://localhost:8333/
If you are at an event, then the event organizers might have provided Firefox 2.0.0.20 which
has been tested with RAC Attack. You can run this browser directly from the Jumpstart Drive
without installing it on your PC. This version of refox can also be downloaded from the
internet.
Launch VMware Server Home Page from the start menu. This will use your default web
browser.
Figure 23
3. Depending on what web browser you use, you might receive security-related warnings. Proceed
through all of these warnings and choose to view the web page.
26
Setup Virtual Storage
Figure 24 The warning in
Mozilla Firefox
Figure 25 The same alert in
Internet Explorer 6
4. Login to the VMware console with the local windows admin account username and password.
Figure 26
5. On the main screen (Summary tab), nd the Commands box and choose Add Datastore.
Figure 27
27
Hardware and Windows Preparation
6. Repeat this step three times. Set the datastore names to RAC11g, RAC11g-shared and RAC11g-
iso. Choose Local Datastore and use the directory path which you previously chose and created.
Figure 28
7. VERIFY that the three new datastores exist in the Summary screen named RAC11g and
RAC11g-iso and RAC11g-shared. Also VERIFY that the two networks vmnet1 and vmnet8
are available as HostOnly and NAT respectively.
Figure 29
3.5. Download Oracle Enterprise Linux
If you are at an event, then the event organizers have already downloaded the software and copied it to
the Jumpstart Drive.
Skip this lab.
If you are at home, then follow these instructions to download Oracle Enterprise Linux.
Continue below.
28
Download Oracle Enterprise Linux
1. Visit http://edelivery.oracle.com/linux and choose Continue.
Figure 30
2. Enter your Name, Company, Email and Country and review/accept the license and export
restrictions before clicking Continue. If you have visited Oracle EDelivery before then make
sure to enter your information exactly the same.
If this is the rst time you've downloaded software from Oracle, then you might have to wait a
few days until you receive an email from Oracle granting you permission to continue.
Figure 31
3. Search for Oracle Linux on the x86-32-bit platform. Choose Oracle Linux Release 5 Update 6.
Figure 32
29
Hardware and Windows Preparation
4. Download the le for x86 (32 bit) not the source.
Figure 33
5. This zip le will contain a single le named Enterprise-R5-U6-Server-i386-dvd.iso extract
this le into the RAC11g-iso folder and then delete the original zip le.
30
4. Linux Install
4.1. Create VM
1. From the SUMMARY screen, choose Create Virtual Machine. Name the new machine col-
labn1 and select the RAC11g datastore.
Figure 34
2. Select Linux Operating System and choose Red Hat Enterprise Linux 5 (32-bit).
Figure 35
31
Linux Install
3. Allocate 760M of memory for the virtual machine and choose 1 processor.
Figure 36
4. Choose to Create a New Virtual Disk.
Figure 37
32
Create VM
5. Set the disk size to 30G and name the le [RAC11g] collabn1/system.vmdk leave all other
options at their defaults and click Next.
Figure 38
6. Choose to Add a Network Adapter.
Figure 39
33
Linux Install
7. Choose to create a NAT network connection.
Figure 40
8. Choose Don't Add a CD/DVD Drive.
Figure 41
34
Create VM
9. Choose Don't Add a Floppy Drive.
Figure 42
10. Choose Don't Add a USB Controller.
Figure 43
35
Linux Install
11. Review the conguration and click Finish. Do not power on the virtual machine yet.
Figure 44
4.2. Prep for OS Installation
VIRTUAL DVD CONFIGURATION:
Virtual Device Node (Adapter/Device) Path (Datastore/Directory/Filename)
IDE 0:0 [RAC11g-iso] Enterprise-R5-U6-Server-i386-
dvd.iso
IDE 0:1*** [RAC11g-iso] RAC11gR2.iso***
***INSTRUCTOR-LED CLASS ONLY
1. In the Inventory tab at the left, select collabn1 (the virtual machine we just created).
Figure 45
36
Prep for OS Installation
2. From the Commands box, click Add Hardware. In the window that appears, click CD/DVD
Drive.
Figure 46
3. Choose to Use an ISO Image.
Figure 47
37
Linux Install
4. Click Browse and locate the le [RAC11g-iso] Enterprise-R5-U6-Server-i386-dvd.iso.
Figure 48
5. Open the section called Virtual Device Node and choose IDE 0:0. Then click
Next.
Warning
Carefully follow this step because it's easy to miss.
Figure 49
38
Prep for OS Installation
6. Click Finish to add the device. Don't power on the virtual machine yet.
Figure 50
7. If you are in a class, then the instructor may have provided a second virtual DVD named
RAC11gR2.iso to save some class time. It contains all additional software downloads.
Repeat all previous steps from this lab to add the second DVD using RAC11gR2.iso image
and choosing IDE 0:1.
If you are not in a class, then you will later download all needed software and build the second
DVD yourself.
Continue below.
8. Scroll down to the Hardware box and conrm the Virtual Machine settings. They should match
this picture (except that you should only see the second DVD if you are in a class and it was
provided by the instructor):
Figure 51
39
Linux Install
4.3. OS Installation
1. Click the Console tab. You might see a message saying that the Remote Console Plug-in is not
installed. If you see this message then click Install plug-in and follow the directions before
continuing. (Note: you may be asked to restart your computer during this process.)
Figure 52
2. When the plugin is installed, you should see a large play button in the center of the console.
Click on the play button to start the VM.
Figure 53
40
OS Installation
3. When you see the square boxes, click anywhere to open a console window.
Figure 54
4. A new window will now open - outside of your web browser. If you opened this window soon
after starting the Virtual Machine, then you will see the boot screen of the Oracle Enterprise
Linux installer.
Figure 55
At rst, this new console window will ignore your keyboard and mouse. Click inside the new
console window and it will begin accepting your keyboard and mouse.
41
Linux Install
Information
Anytime your keyboard and mouse are stuck in the VMware Virtual Machine, you can press
CTRL and ALT together to move them outside the VM.
If you still see the boot screen then you may press enter to continue, or just wait for it to
automatically continue.
5. Choose to SKIP the media test.
Figure 56
6. Choose NEXT when the rst installer screen comes up.
Figure 57
42
OS Installation
7. Accept the default English language and choose Next.
Figure 58
8. Choose US English keyboard layout and click Next.
Figure 59
43
Linux Install
9. Select YES to initialize the drive.
Figure 60
10. Accept the default layout (with no encryption) and choose NEXT.
Figure 61
44
OS Installation
11. Choose YES to remove all partitions.
Figure 62
12. Set the hostname to collabn1.vm.ardentperf.com and leave DHCP enabled before choosing
NEXT.
Figure 63
45
Linux Install
13. Choose the timezone where you are located! Let the system clock run on UTC though.
Figure 64
14. Set the root password to racattack
Figure 65
46
OS Installation
15. Choose Customize Now but don't choose any "additional tasks". Then click NEXT.
Figure 66
16. Select only these package groups, then click NEXT to continue:
Category Selections
Desktop Environments Gnome Desktop Environment
Applications Editors
Graphical Internet
Text-based Internet
Development Development Libraries
Development Tools
Servers Server Conguration Tools
Base System Administration Tools
Base
System Tools
X Window System
Warning
Do not choose Cluster Storage or Clustering.
47
Linux Install
Figure 67
17. Choose NEXT to start the installation.
Figure 68
48
OS Installation
Figure 69
18. Choose REBOOT when the installation is complete.
Figure 70
49
Linux Install
19. After the machine reboots when you wee the Welcome screen choose FORWARD.
Figure 71
20. ACCEPT the license and choose FORWARD.
Figure 72
50
OS Installation
21. DISABLE the rewall and choose FORWARD. Conrm by clicking YES.
Figure 73
22. DISABLE SELinux before choosing FORWARD. Conrm with YES.
Figure 74
51
Linux Install
23. Leave Kdump disabled and choose FORWARD.
Figure 75
24. Leave the clock alone (with the wrong time) and click FORWARD.
Figure 76
52
OS Installation
25. Don't create a user; click FORWARD. Choose CONTINUE to conrm.
Figure 77
26. Choose FORWARD to skip sound card cong.
Figure 78
53
Linux Install
27. Choose FINISH to close the installer. Click OK to reboot.
Figure 79
28. After reboot you will see a login screen.
Figure 80
54
Wrap-up OS Installation
4.4. Wrap-up OS Installation
Tip: If you are familiar with the unix command-line, then we recommend connecting through SSH
in addition to using the VMware console. You can then copy-and-paste many commands from this
handbook! Until we congure networking, VMware will assign the address 192.168.78.128.
1. Login as the user root with password racattack.
Figure 81
55
Linux Install
2. GNOME is the the graphical window environment installed by default in OEL. First, disable
GNOME CD automount. Go to the menu System >> Preferences >> Removable Drives and
Media.
Figure 82
3. Uncheck all of the options under Removable Storage and click Close.
Figure 83
56
Wrap-up OS Installation
4. Open a terminal window from the menu Applications >> Accessories >> Terminal.
Figure 84
5. From the menus, open Edit >> Current Prole.
Figure 85
57
Linux Install
6. In the Title and Command tab, check the box for Run command as a login shell, then close
the dialog.
Figure 86
7. The editor "gedit" is a simple graphical editor similar to notepad and it can be used to edit
les on Linux. If you are going to use gedit, then it is helpful if you open Edit > Preferences to
disable text wrapping and enable line numbers.
Figure 87
8. In a terminal window as the root user, shutdown and disable anacron then run it manually with
no delay.
58
Wrap-up OS Installation
[root@collabn1 ]# service anacron stop
Stopping anacron: [ OK ]
[root@collabn1 ]# chkconfig anacron off
[root@collabn1 ]# chkconfig --list anacron
anacron 0:off 1:off 2:off 3:off 4:off 5:off
6:off
[root@collabn1 ]# anacron -n
Information
It should not cause any problems for you, but be aware that several CPU and I/O intensive jobs
will run in the background for about 10 minutes while you continue with this lab (e.g. updatedb
and makewhatis). You might notice some slight system performance degradation. You can always
use the program top to see what is currently running.
9. In a terminal window as the root user, shutdown and disable the automounter.
[root@collabn1 ]# service autofs stop
Stopping automount: [ OK ]
[root@collabn1 ]# umount /media/
*
[root@collabn1 ]# chkconfig autofs off
[root@collabn1 ]# chkconfig --list autofs
autofs 0:off 1:off 2:off 3:off 4:off 5:off
6:off
10. In a terminal window as the root user, shutdown and disable the apple zeroconf service (avahi).
[root@collabn1 ]# service avahi-daemon stop
Shutting down Avahi daemon: [ OK ]
[root@collabn1 ]# chkconfig avahi-daemon off
[root@collabn1 ]# chkconfig --list avahi-daemon
avahi-daemon 0:off 1:off 2:off 3:off 4:off 5:off
6:off
11. If any of the small CD images in the status bar do not have a green dot, then click on the CD
image and choose "Connect to [RAC11g] iso/... on Server". If a window opens showing the CD
contents then make sure to close the window.
Figure 88
12. Create two CDROM directories named cdrom and cdrom5.
Warning
Make sure to use these names because many later steps in this handbook will reference them!
59
Linux Install
[root@collabn1 ]# cd /mnt
[root@collabn1 mnt]# mkdir cdrom
[root@collabn1 mnt]# mkdir cdrom5
13. Add entries to /etc/fstab for all CD's and then mount them. If you are in a class then you will
probably have two CD's. If you are not in a class then you will probably have only one.
[root@collabn1 ]# ls /dev/cdrom-
*
/dev/cdrom-hda /dev/cdrom-hdb
[root@collabn1 ]# gedit /etc/fstab
/dev/cdrom-hda /mnt/cdrom iso9660 defaults 0 0
/dev/cdrom-hdb /mnt/cdrom5 iso9660 defaults 0 0
[root@collabn1 mnt]# mount cdrom
[root@collabn1 mnt]# mount cdrom5
14. Install the additional required RPM's
cd /mnt
# From Enterprise Linux 5 CDROM 2
rpm -Uvh
*
/
*
/compat-libstdc++-33
*
rpm -Uvh
*
/
*
/libaio-devel-0.
*
rpm -Uvh
*
/
*
/unixODBC-2.
*
rpm -Uvh
*
/
*
/unixODBC-devel-2.
*
# From Enterprise Linux 5 CDROM 3
rpm -Uvh
*
/
*
/sysstat-7.
*
# Additional required packages which are already installed:
# From Enterprise Linux 5 CDROM 1
rpm -Uvh
*
/
*
/binutils-2.
*
rpm -Uvh
*
/
*
/elfutils-libelf-0.
*
rpm -Uvh
*
/
*
/glibc-2.
*
i686
*
rpm -Uvh
*
/
*
/glibc-common-2.
*
rpm -Uvh
*
/
*
/libaio-0.
*
rpm -Uvh
*
/
*
/libgcc-4.
*
rpm -Uvh
*
/
*
/libstdc++-4.
*
rpm -Uvh
*
/
*
/make-3.
*
# From Enterprise Linux 5 CDROM 2
rpm -Uvh
*
/
*
/elfutils-libelf-devel-
*
rpm -Uvh
*
/
*
/glibc-headers
*
rpm -Uvh
*
/
*
/glibc-devel-2.
*
rpm -Uvh
*
/
*
/libgomp
*
rpm -Uvh
*
/
*
/gcc-4.
*
rpm -Uvh
*
/
*
/gcc-c++-4.
*
rpm -Uvh
*
/
*
/libstdc++-devel-4.
*
15. Eject the cdrom
[root@collabn1 mnt]# eject /mnt/cdrom
60
Wrap-up OS Installation
16. Return to the Summary tab in the VMware console. From the Status box, choose to Install
VMware Tools. Click the Install button to begin.
Figure 89
17. Install VMware client tools and run conguration tool.
Information
You must perform this step in the VMware Console; do not use PuTTY or any other terminal
program.
[root@collabn1 mnt]# mount /mnt/cdrom
mount: block device /dev/cdrom-hda is write-protected, mounting
read-only
[root@collabn1 mnt]# rpm -ivh /mnt/cdrom/VMwareTools-7.7.5-156745.i386.rpm
Preparing...
########################################### [100%]
1:VMwareTools
########################################### [100%]
The installation of VMware Tools 7.7.5 for Linux completed
successfully.
You can decide to remove this software from your system at any time
by
invoking the following command: "rpm -e VMwareTools".
Before running VMware Tools for the first time, you need to
configure it for your running kernel by invoking the
following command: "/usr/bin/vmware-config-tools.pl".
Enjoy,
--the VMware team
[root@collabn1 cdrom]# vmware-config-tools.pl
...
Choose NO to skip the VMware FileSystem Sync Driver (vmsync)
61
Linux Install
Choose display size [12] 1024x768
Mounting HGFS shares will probably FAIL, but this is ok.
Figure 90
18. Run the network commands. (You can cut and paste the commands into the terminal.) Next, run
vmware-toolbox and enable clock synchronization.
Figure 91
62
Create RAC Attack DVD
19. Logout from your session.
Figure 92
20. Unmount the VMware Tools image:
umount /mnt/cdrom
Using VMware Infrastructure web interface, mount Oracle Enterprise Linux from [RAC11g-iso]
data store. Mount it:
mount /mnt/cdrom
4.5. Create RAC Attack DVD
If you are in a class or at an event, then the instructor may have provided a second virtual DVD named
RAC11gR2.iso to save some class time. It contains all additional software downloads.
Skip this lab and continue to the next one.
If you are at home, then follow these instructions to download all needed software and build the second
DVD yourself.
Continue below.
1. While logged in as root, download the latest release of the RAC Attack supporting code (GPL).
63
Linux Install
# cd
# curl -kL github.com/ardentperf/racattack/tarball/master | tar xz
2. You can view the master list of downloads here: https://github.com/ardentperf/
racattack/blob/master/makeDVD/auto.sh
If you have already downloaded any of these les, you may optionally copy them to the /tmp
directory in your virtual machine. When you create the DVD, any remaining les will be
automatically downloaded.
3. Create the DVD by running the automatic build script. You will be prompted for your Oracle
SSO login and password.
Warning
If your account is not authorized for Oracle Support then patch downloads will fail.
[root@collabn1 ]# sh ardentperf-racattack-
*
/makeDVD/auto.sh /mnt/cdrom5
oracle-profile' -> /mnt/cdrom5/oracle-profile'
root/
root/fix_cssd/
root/fix_cssd/fix_cssd.sh
Oracle SSO Username: <your-username>
Oracle SSO Password: <your-password>
LOGGING IN TO ORACLE SSO
% Total % Received % Xferd Average Speed Time Time
Time Current
Dload Upload Total Spent
Left Speed
414 733 414 2977 0 0 1621 0 --:--:-- 0:00:01
--:--:-- 22383
DOWNLOADING: /tmp/oracleasmlib-2.0.4-1.el5.i386.rpm
% Total % Received % Xferd Average Speed Time Time
Time Current
Dload Upload Total Spent
Left Speed
100 13929 100 13929 0 0 23118 0 --:--:-- --:--:--
--:--:-- 2720k
/tmp/oracleasmlib-2.0.4-1.el5.i386.rpm' ->
./oracleasmlib-2.0.4-1.el5.i386.rpm'
DOWNLOADING: /tmp/linux_11gR2_database_1of2.zip
( ... )
FINISHED BUILDING RAC ATTACK DVD
4.6. Prep for Oracle
1. Edit /etc/sysctl.conf
[root@collabn1 ]# gedit /etc/sysctl.conf
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
64
Prep for Oracle
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144
[root@collabn1 ]# sysctl -p
2. Edit /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
3. Edit /etc/pam.d/login and insert the following lines BEFORE the "selinux open" line.
session required /lib/security/pam_limits.so
session required pam_limits.so
4. Create groups and users. Make the oracle password racattack
[root@collabn1 ]# groupadd oinstall
[root@collabn1 ]# groupadd dba
[root@collabn1 ]# groupadd oper
[root@collabn1 ]# groupadd asmdba
[root@collabn1 ]# groupadd asmoper
[root@collabn1 ]# groupadd asmadmin
[root@collabn1 ]#
[root@collabn1 ]# useradd -u 500 -g oinstall -G dba,oper,asmdba,asmoper,asmadmin
oracle
[root@collabn1 ]# passwd oracle
Changing password for user oracle.
New UNIX password: racattack
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password: racattack
passwd: all authentication tokens updated successfully.
5. Create directories.
[root@collabn1 ]# mkdir -p /u01/grid/oracle/product/11.2.0/grid_1
[root@collabn1 ]# mkdir -p /u01/app/oracle/product/11.2.0/db_1
[root@collabn1 ]# chown -R oracle:oinstall /u01
65
Linux Install
6. Logout of your session and login as the oracle user.
Figure 93
7. Disable GNOME CD automount for the oracle user. Go to the menu System >> Preferences >>
Removable Drives and Media.
Figure 94
66
Prep for Oracle
8. Uncheck all of the options under Removable Storage and click Close.
Figure 95
9. Open a terminal window.
Figure 96
67
Linux Install
10. From the menus, open Edit >> Current Prole.
Figure 97
11. In the Title and Command tab, check the box for Run command as a login shell, then close
the dialog.
Figure 98
68
Prep for Oracle
12. If you are using gedit, then open Edit > Preferences to disable text wrapping and enable line
numbers.
Figure 99
13. Setup ssh equivalence for oracle user.
[oracle@collabn1 ]$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be
established.
RSA key fingerprint is
3f:65:e6:77:af:11:84:56:a4:b9:0f:8b:41:b4:2f:8a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known
hosts.
oracle@localhost's password: C
[oracle@collabn1 ]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa): M [default]
Enter passphrase (empty for no passphrase): M [no password]
Enter same passphrase again: M [no password]
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
0a:33:74:d4:7a:c0:c6:d0:56:33:10:4e:71:63:4c:e8
oracle@collabn1.vm.ardentperf.com
[oracle@collabn1 ]$ cat /home/oracle/.ssh/id_rsa.pub >> /home/oracle/.ssh/authorized_-
keys
14. Setup oracle and root users' proles.
[oracle@collabn1 ]$ su - root
[root@collabn1 ]# gedit /etc/oratab
69
Linux Install
grid:/u01/grid/oracle/product/11.2.0/grid_1:N
[root@collabn1 ]# chown oracle:dba /etc/oratab
[root@collabn1 ]# gedit /root/.bashrc
ORAENV_ASK=NO
ORACLE_SID=grid
. oraenv >/dev/null
unset ORAENV_ASK
[root@collabn1 ]# su - oracle
[oracle@collabn1 ]$ cd /mnt
[oracle@collabn1 ]$ cat
*
/oracle-profile >>/home/oracle/.bash_profile
Information
The source code for this le can be found at https://github.com/ardentperf/
racattack/blob/master/makeDVD/oracle-profile
15. Close andre-open your terminal sessions so that the new proles take effect.
16. Install x_cssd script.
Information
In VMware test environments you usually have a very small amount of memory. Oracle CSS
processes can take up a *LOT* of the memory (over 50% in this lab) because it locks several
hundred MB in physical memory. In VMware (for both ASM and RAC environments) this may be
undesirable. This low-level hack will make the memory swappable at runtime.
NEVER, EVER, EVER EVEN IN YOUR WILDEST DREAMS THINK ABOUT TRYING
THIS ON ANYTHING CLOSE TO A PRODUCTION SYSTEM.
The source code for this le can be found at https://github.com/ardentperf/
racattack/blob/master/makeDVD/root/fix_cssd/fix_cssd.sh
[oracle@collabn1 ]$ su - root
[root@collabn1 ]# cd /
[root@collabn1 ]# tar xvf mnt/
*
/fix_cssd.tar
root/fix_cssd/fix_cssd.sh
[root@collabn1 ]# chmod 774 /root/fix_cssd/fix_cssd.sh
[root@collabn1 ]# gedit /etc/rc.d/rc.local
cd /root/fix_cssd
nohup nice -n -20 ./fix_cssd.sh 2>&1 &
[root@collabn1 ]# /etc/rc.d/rc.local
nohup: appending output to nohup.out'
70
5. Create Cluster
5.1. Create Interconnect
1. If the machine is running then logout and shutdown. The machine needs to be powered off.
2. In the Inventory tab at the left, select collabn1 (the virtual machine we just created).
Figure 100
3. Scroll down to the Hardware box and CONFIRM that there is one Network Adapter of type
NAT.
Figure 101
71
Create Cluster
4. From the Commands box, click Add Hardware. In the window that appears, click Network
Adapter.
Figure 102
5. Choose to create a HostOnly network connection. This will be used for the interconnect. Then
click Next.
Figure 103
72
Create Shared Disks
6. Click FINISH to create the network adapter.
Figure 104
5.2. Create Shared Disks
REPEAT STEPS 1-6 FOR BOTH OF THESE DEVICES:
Virtual Device Node
(Adapter/Device)
Size Path (Datastore/Directory/Filename)
SCSI 1:0 3.25 GB [RAC11g-shared] data.vmdk
SCSI 1:1 3.25 GB [RAC11g-shared] backup.vmdk
1. In the Inventory tab at the left, select collabn1 (the virtual machine we just created).
Figure 105
73
Create Cluster
2. From the Commands box, click Add Hardware. In the window that appears, click Hard Disk.
Figure 106
3. Choose to Create a New Virtual Disk and click Next.
Figure 107
4. Enter a capacity of 3.25 GB and type the name [RAC11g-shared] data.vmdk.
Choose File Options Allocate all disk space now.
Choose Disk Mode Independent and Persistent.
Choose Virtual Device Node SCSI 1:0. Click Next to continue.
74
Create Shared Disks
Figure 108
5. Click Finish to create the disk.
Figure 109
Warning
It may take a moment for the disk to appear to the VMware console. Wait until the new disk
appears before you continue with the lab. Furthermore, the web browser may display an error
which requires you to reload the page and login to VMware again.
6. Repeat steps 1-5 for the second disk (it is listed at the beginning of this lab).
75
Create Cluster
7. CONFIRM that your list of hard disks and network devices matches this screenshot.
Figure 110
8. From the Commands box, click Congure VM.
Figure 111
9. Click the Advanced tab and scroll down to the Conguration Parameters. Use the Add New
Entry button to add the entries listed here. Click OK to save the conguration changes.
Name Value
disk.locking false
76
Copy VM
Name Value
diskLib.dataCacheMaxSize 0
diskLib.maxUnsyncedWrites 0
mainMem.useNamedFile false
Figure 112
Information
I have found the following three websites among the most useful while creating custom VMware
congurations. They show how powerful and versatile VMware is even the free VMware Server
product.
http://sanbarrow.com/vmx/vmx-advanced.html
http://sanbarrow.com/vmx/vmx-config-ini.html
http://vmfaq.com/?View=entry&EntryID=25
5.3. Copy VM
1. In Windows Explorer, browse to the folder [RAC11g] \collabn1. Copy all of the les to the
folder [RAC11g] \collabn2.
The location of [RAC11g] was determined in the rst lab. In a class, the instructor may provide
the location.
If the collabn2 folder does not exist, then create it.
77
Create Cluster
Make sure that you copy - not move - the les. Hold down CTRL to copy with drag-and-drop in
windows.
Figure 113
Figure 114
78
Copy VM
2. Browse to [RAC11g] \collabn2. Edit the le collabn1.vmx (the VMware Conguration File).
You can use notepad or wordpad to edit the le.
Figure 115
3. Find the line displayName and change it to collabn2 (the new node name), then save and close
the le.
displayName = "collabn2"
Figure 116
79
Create Cluster
5.4. Congure Disks
1. In the Inventory tab at the left, select collabn1.
Figure 117
2. Choose the Console tab. Click on the play button to start the VM. When you see the square boxes,
click anywhere to open a console window.
Figure 118
80
Congure Disks
3. Login as the oracle user with the password racattack.
Figure 119
4. Open a terminal window.
Figure 120
5. Switch to the root user with the "su -" command. (The password is racattack.) CONFIRM
that two new disks exist and that they have the appropriate sizes. These two lines should exactly
match!!
81
Create Cluster
[root@collabn1 ]# cat /proc/partitions
major minor #blocks name
...
8 16 3407872 sdb
8 32 3407872 sdc
6. Create partitions on all of the newly created disks with fdisk.
a) run fdisk /dev/sdb You should see the message "Device contains neither a valid DOS
partition table, nor Sun, SGI or OSF disklabel"
b) type "n" to create a new partition.
c) type "p" for a primary partition.
d) type partition number 1.
e) press enter twice to accept the default rst/last cylinders.
f) type "t" to set the partition type.
g) enter partition type da (Non-FS data).
h) type "w" to write the partition table to disk.
[root@collabn1 ]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or
OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected
by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-652, default 1): M [default]
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-652, default 652): M [default]
Using default value 652
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): da
Changed system type of partition 1 to da (Non-FS data)
Command (m for help): w
The partition table has been altered!
WARNING: Re-reading the partition table failed with error 16: Device
or resource busy.
The kernel still uses the old table.
Syncing disks.
7. Repeat the previous step for disk /dev/sdc
82
Congure Node 1
5.5. Congure Node 1
After completing the previous lab, you should already be logged in as the oracle user on collabn1. You
should already have a terminal open, where you are currently switched to the root user.
1. As the root user, CONFIRM that the IP address if eth0 starts with 192.168.78 and that the IP
address of eth1 starts with 172.16.100.
[root@collabn1 ]# ifconfig|grep net
eth0 Link encap:Ethernet HWaddr 00:0C:29:07:F5:C0
inet addr:192.168.78.128 Bcast:192.168.78.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe07:f5c0/64 Scope:Link
eth1 Link encap:Ethernet HWaddr 00:0C:29:07:F5:CA
inet addr:172.16.100.128 Bcast:172.16.100.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe07:f5ca/64 Scope:Link
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
2. Update the IP addresses by directly editing the linux network conguration les. Update the
BOOTPROTO line and add the remaining lines.
[root@collabn1 ]# cd /etc/sysconfig/network-scripts
[root@collabn1 network-scripts]# gedit ifcfg-eth0
BOOTPROTO=none
IPADDR=192.168.78.51
NETMASK=255.255.255.0
GATEWAY=192.168.78.2
[root@collabn1 network-scripts]# gedit ifcfg-eth1
BOOTPROTO=none
IPADDR=172.16.100.51
NETMASK=255.255.255.0
3. Update the DNS search domain
[root@collabn1 network-scripts]# gedit /etc/resolv.conf
search vm.ardentperf.com
nameserver 192.168.78.2
4. As root, restart the network services by typing service network restart. Then conrm the new
ip addresses with ifcong. Also conrm the search domain by inspecting /etc/resolv.conf if
the le has reverted then edit it again. (When I wrote this lab, the change stuck after the second
time I edited the le.)
Warning
You must perform this step in VMware; do not use PuTTY.
83
Create Cluster
Figure 121
5. Edit /etc/ hosts. EDIT the line with 127.0.0.1 and then ADD all of the other lines below:
[root@collabn1 etc]# vi /etc/hosts
192.168.78.51 collabn1 collabn1.vm.ardentperf.com
192.168.78.61 collabn1-vip collabn1-vip.vm.ardentperf.com
172.16.100.51 collabn1-priv collabn1-priv.vm.ardentperf.com
192.168.78.52 collabn2 collabn2.vm.ardentperf.com
192.168.78.62 collabn2-vip collabn2-vip.vm.ardentperf.com
172.16.100.52 collabn2-priv collabn2-priv.vm.ardentperf.com
192.168.78.250 collab-scan collab-scan.vm.ardentperf.com
192.168.78.251 collab-gns collab-gns.vm.ardentperf.com
::1 localhost6.localdomain6 localhost6
127.0.0.1 localhost.localdomain localhost
84
Congure Node 2
5.6. Congure Node 2
1. In the VMware console, go to the Virtual Machine menu and choose Add Virtual Machine to
Inventory.
Figure 122
2. Browse to RAC11g/collabn2 and open collabn1.vmx. Make sure you browse to the right folder!
Figure 123
85
Create Cluster
3. In the Inventory tab at the left, select the new VM collabn2. Choose the Console tab and click
the play button to start the VM.
Figure 124
4. The VMware console should ask you whether you copied or moved the VM. Answer that you
copied the les and click OK.
Figure 125
86
Congure Node 2
5. When you see the square boxes, click anywhere to open a console window.
Figure 126
6. Login as the oracle user with the password racattack.
Figure 127
7. Open a terminal ( Applications >> Accessories >> Terminal ) and switch to the root
user.
87
Create Cluster
Information
When you rst open a console on collabn2, you will notice that the hostname still says collabn1.
This is because we copied the machine; we will change the hostname shortly.
88
Congure Node 2
Figure 128
8. CONFIRM that the IP address of eth1 starts with 172.16.100.
[root@collabn1 ]# ifconfig|grep net
eth1 Link encap:Ethernet HWaddr 00:0C:29:C9:3E:C8
inet addr:172.16.100.129 Bcast:172.16.100.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0
9. Update the IP addresses by directly editing the linux network conguration les. Update the
BOOTPROTO line and add the remaining lines.
COMMENT or DELETE the line which begins with HWADDR.
[root@collabn1 ]# cd /etc/sysconfig/network-scripts
[root@collabn1 network-scripts]# gedit ifcfg-eth0
BOOTPROTO=none
#HWADDR=...
IPADDR=192.168.78.52
NETMASK=255.255.255.0
GATEWAY=192.168.78.2
[root@collabn1 network-scripts]# gedit ifcfg-eth1
BOOTPROTO=none
#HWADDR=...
IPADDR=172.16.100.52
NETMASK=255.255.255.0
10. Update the DNS search domain
89
Create Cluster
[root@collabn1 network-scripts]# gedit /etc/resolv.conf
search vm.ardentperf.com
nameserver 192.168.78.2
11. Update the HOSTNAME by editing the linux system conguration les. Set it to col-
labn2.vm.ardentperf.com. Then change the active system hostname with the hostname
command.
[root@collabn1 network-scripts]# gedit /etc/sysconfig/network
HOSTNAME=collabn2.vm.ardentperf.com
[root@collabn1 network-scripts]# hostname collabn2.vm.ardentperf.com
12. As root, restart the network services by typing service network restart. Then conrm the new
ip addresses with ifcong. Conrm that search domain by inspecting /etc/resolv.conf if the le
has reverted then edit it again. (The change stuck after the second time I edited the le while
walking through this lab.) Also conrm the new hostname with hostname.
Warning
You must perform this step in VMware; do not use PuTTY.
Figure 129
13. Exit your terminal session and start a new one so that you can see the updated hostname in the
prompt.
14. Edit /etc/hosts. EDIT the line with 127.0.0.1 and then ADD all of the other lines below:
[root@collabn2 etc]# vi /etc/hosts
192.168.78.51 collabn1 collabn1.vm.ardentperf.com
90
SSH and CVU
192.168.78.61 collabn1-vip collabn1-vip.vm.ardentperf.com
172.16.100.51 collabn1-priv collabn1-priv.vm.ardentperf.com
192.168.78.52 collabn2 collabn2.vm.ardentperf.com
192.168.78.62 collabn2-vip collabn2-vip.vm.ardentperf.com
172.16.100.52 collabn2-priv collabn2-priv.vm.ardentperf.com
192.168.78.250 collab-scan collab-scan.vm.ardentperf.com
192.168.78.251 collab-gns collab-gns.vm.ardentperf.com
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
5.7. SSH and CVU
1. Login to node collabn2. As the oracle user, make sure that you can ping both nodes on the
interconnect and public network.
[oracle@collabn2 ]$ ping -c 1 collabn1
PING collabn1 (192.168.78.51) 56(84) bytes of data.
64 bytes from collabn1 (192.168.78.51): icmp_seq=1 ttl=64 time=0.793 ms
[oracle@collabn2 ]$ ping -c 1 collabn2
PING collabn2 (192.168.78.52) 56(84) bytes of data.
64 bytes from collabn2 (192.168.78.52): icmp_seq=1 ttl=64 time=0.024 ms
[oracle@collabn2 ]$ ping -c 1 collabn1-priv
PING collabn1-priv (172.16.100.51) 56(84) bytes of data.
64 bytes from collabn1-priv (172.16.100.51): icmp_seq=1 ttl=128 time=0.901 ms
[oracle@collabn2 ]$ ping -c 1 collabn2-priv
PING collabn2-priv (172.16.100.52) 56(84) bytes of data.
64 bytes from collabn2-priv (172.16.100.52): icmp_seq=1 ttl=64 time=0.058 ms
2. Store the public keys for the hosts. You can do this with a tool called ssh-keyscan.
[oracle@collabn2 .ssh]$ ssh-keyscan -t rsa collabn1 collabn1-priv collabn2
collabn2-priv >> /.ssh/known_hosts
# collabn1 SSH-2.0-OpenSSH_4.3
# collabn1-priv SSH-2.0-OpenSSH_4.3
# collabn2 SSH-2.0-OpenSSH_4.3
# collabn2-priv SSH-2.0-OpenSSH_4.3
3. Test ssh equivilance. It is important that there is no prompt and you are automatically logged in.
[oracle@collabn2 .ssh]$ ssh collabn1
Warning: Permanently added the RSA host key for IP address
'192.168.78.51' to the list of known hosts.
Last login: Tue Apr 15 16:59:36 2008 from collabn2
[oracle@collabn1 ]$ exit
logout
Connection to collabn1 closed.
91
Create Cluster
4. Switch to node collabn1. As the oracle user, conrm that you can ping both servers. Then copy
the known_hosts le from collabn2.
[oracle@collabn1 ]$ ping -c 1 collabn1
PING collabn1 (192.168.78.51) 56(84) bytes of data.
64 bytes from collabn1 (192.168.78.51): icmp_seq=1 ttl=64 time=0.793 ms
[oracle@collabn1 ]$ ping -c 1 collabn2
PING collabn2 (192.168.78.52) 56(84) bytes of data.
64 bytes from collabn2 (192.168.78.52): icmp_seq=1 ttl=64 time=0.024 ms
[oracle@collabn1 ]$ ping -c 1 collabn1-priv
PING collabn1-priv (172.16.100.51) 56(84) bytes of data.
64 bytes from collabn1-priv (172.16.100.51): icmp_seq=1 ttl=128 time=0.901 ms
[oracle@collabn1 ]$ ping -c 1 collabn2-priv
PING collabn2-priv (172.16.100.52) 56(84) bytes of data.
64 bytes from collabn2-priv (172.16.100.52): icmp_seq=1 ttl=64 time=0.058 ms
[oracle@collabn1 ]$ scp collabn2:.ssh/known_hosts /.ssh/known_hosts
The authenticity of host 'collabn2 (192.168.78.52)' can't be
established.
RSA key fingerprint is
3f:65:e6:77:af:11:84:56:a4:b9:0f:8b:41:b4:2f:8a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'collabn2,192.168.78.52' (RSA) to the
list of known hosts.
known_hosts 100% 3146 3.1KB/s
00:00
5. Test ssh equivilance.
[oracle@collabn1 ]$ ssh collabn2
Last login: Tue Apr 15 17:02:29 2008 from collabn2
[oracle@collabn2 ]$ exit
logout
Connection to collabn2 closed.
6. You need to be able to login to yourself too; test this.
[oracle@collabn1 ]$ ssh collabn1
Last login: Tue Apr 15 17:03:39 2008 from collabn2
[oracle@collabn1 ]$ exit
logout
Connection to collabn1 closed.
7. Run CLUVFY to validate your hardware and OS installation! The shared disk test will fail; this
is OK. Ignore that error.
collabn1:/home/oracle[RAC1]$ /mnt/cdrom
*
/grid/runcluvfy.sh stage -post hwos -n
collabn1,collabn2
Performing post-checks for hardware and operating system setup
Checking node reachability...
92
SSH and CVU
Node reachability check passed from node "collabn1"
Checking user equivalence...
User equivalence check passed for user "oracle"
Checking node connectivity...
Checking hosts config file...
Verification of the hosts config file successful
Node connectivity passed for subnet "192.168.78.0" with node(s)
collabn2,collabn1
TCP connectivity check passed for subnet "192.168.78.0"
Node connectivity passed for subnet "172.16.100.0" with node(s)
collabn2,collabn1
TCP connectivity check passed for subnet "172.16.100.0"
Interfaces found on subnet "192.168.78.0" that are likely candidates
for VIP are:
collabn2 eth0:192.168.78.52
collabn1 eth0:192.168.78.51
Interfaces found on subnet "172.16.100.0" that are likely candidates
for a private interconnect are:
collabn2 eth1:172.16.100.52
collabn1 eth1:172.16.100.51
Node connectivity check passed
Check for multiple users with UID value 0 passed
Post-check for hardware and operating system setup was successful.
93
6. Grid Install (ASM)
6.1. Setup ASMLIB
1. Login to collabn1 as oracle and open a teminal. Switch to the root user.
Figure 130
2. Install ASMLib on both nodes and initialize the disks. mount command may fail (mount:
/dev/cdrom-hda already mounted or /mnt/cdrom busy) if you already have cdrom mounted from
previous steps.
[root@collabn1 ]# cd /mnt
[root@collabn1 mnt]# mount /mnt/cdrom
mount: block device /dev/cdrom-hda is write-protected, mounting
read-only
[root@collabn1 mnt]# mount /mnt/cdrom5
mount: block device /dev/cdrom-hdb is write-protected, mounting
read-only
95
Grid Install (ASM)
# OracleASM
rpm -Uvh
*
/
*
/oracleasm-support
*
rpm -Uvh
*
/
*
/oracleasm
*
el5-2
*
# (Note - that's lowercase EL5-2.)
# Missing from the install media; copied to RAC Attack DVD.
rpm -Uvh
*
/oracleasmlib
*
[root@collabn1 mnt]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver
is
loaded on boot and what permissions it will have. The current
values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
Information
The disks are shared so you only need to initialize them once.
[root@collabn1 ]# /etc/init.d/oracleasm createdisk data /dev/sdb1
Marking disk "data" as an ASM disk: [ OK ]
[root@collabn1 ]# /etc/init.d/oracleasm createdisk backup /dev/sdc1
Marking disk "backup" as an ASM disk: [ OK ]
[root@collabn1 ]# /etc/init.d/oracleasm listdisks
BACKUP
DATA
Now repeat some of the steps on the second virtual machine:
[root@collabn1 ]# ssh collabn2
[root@collabn2 ]# cd /mnt
# OracleASM
rpm -Uvh
*
/
*
/oracleasm-support
*
rpm -Uvh
*
/
*
/oracleasm
*
el5-2
*
# Missing from the install media; copied to RAC Attack DVD.
rpm -Uvh
*
/oracleasmlib
*
[root@collabn2 ]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver
is
loaded on boot and what permissions it will have. The current
96
Cluster Verication Utility (ASM)
values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@collabn2 ]# /etc/init.d/oracleasm listdisks
BACKUP
DATA
6.2. Cluster Verication Utility (ASM)
1. Login to collabn1 as the oracle user and open a terminal.
Figure 131
2. Run CVU to validate that you're ready to install CRS. Use the new xup feature of 11gR2
CVU to create a script that can x missing parameters.
[oracle@collabn1 ]$ /mnt/cdrom
*
/grid/runcluvfy.sh stage -pre crsinst -n
collabn1,collabn2 -fixup -r 11gR2
97
Grid Install (ASM)
Performing pre-checks for cluster services setup
Checking node reachability...
Node reachability check passed from node "collabn1"
Checking user equivalence...
User equivalence check passed for user "oracle"
Checking node connectivity...
Checking hosts config file...
Verification of the hosts config file successful
Node connectivity passed for subnet "192.168.78.0" with node(s)
collabn2,collabn1
TCP connectivity check passed for subnet "192.168.78.0"
Node connectivity passed for subnet "172.16.100.0" with node(s)
collabn2,collabn1
TCP connectivity check passed for subnet "172.16.100.0"
Interfaces found on subnet "192.168.78.0" that are likely candidates
for VIP are:
collabn2 eth0:192.168.78.52
collabn1 eth0:192.168.78.51
Interfaces found on subnet "172.16.100.0" that are likely candidates
for a private interconnect are:
collabn2 eth1:172.16.100.52
collabn1 eth1:172.16.100.51
Node connectivity check passed
Total memory check failed
Check failed on nodes:
collabn2,collabn1
Available memory check passed
Swap space check failed
Free disk space check passed for "collabn2:/tmp"
Free disk space check passed for "collabn1:/tmp"
User existence check passed for "oracle"
Group existence check passed for "oinstall"
Group existence check passed for "dba"
Membership check for user "oracle" in group "oinstall" [as Primary]
passed
Membership check for user "oracle" in group "dba" passed
Run level check passed
Hard limits check passed for "maximum open file descriptors"
Soft limits check passed for "maximum open file descriptors"
Hard limits check passed for "maximum user processes"
Soft limits check passed for "maximum user processes"
System architecture check passed
Kernel version check passed
Kernel parameter check passed for "semmsl"
Kernel parameter check passed for "semmns"
Kernel parameter check passed for "semopm"
Kernel parameter check passed for "semmni"
Kernel parameter check passed for "shmmax"
Kernel parameter check passed for "shmmni"
Kernel parameter check passed for "shmall"
Kernel parameter check failed for "file-max"
Check failed on nodes:
98
Cluster Verication Utility (ASM)
collabn2,collabn1
Kernel parameter check passed for "ip_local_port_range"
Kernel parameter check passed for "rmem_default"
Kernel parameter check passed for "rmem_max"
Kernel parameter check passed for "wmem_default"
Kernel parameter check failed for "wmem_max"
Check failed on nodes:
collabn2,collabn1
Kernel parameter check failed for "aio-max-nr"
Check failed on nodes:
collabn2,collabn1
Package existence check passed for "make-3.81"
Package existence check passed for "binutils-2.17.50.0.6"
Package existence check passed for "gcc-4.1.2"
Package existence check passed for "gcc-c++-4.1.2"
Package existence check passed for "libgomp-4.1.2"
Package existence check passed for "libaio-0.3.106"
Package existence check passed for "glibc-2.5-24"
Package existence check passed for "compat-libstdc++-33-3.2.3"
Package existence check passed for "elfutils-libelf-0.125"
Package existence check passed for "elfutils-libelf-devel-0.125"
Package existence check passed for "glibc-common-2.5"
Package existence check passed for "glibc-devel-2.5"
Package existence check passed for "glibc-headers-2.5"
Package existence check passed for "libaio-devel-0.3.106"
Package existence check passed for "libgcc-4.1.2"
Package existence check passed for "libstdc++-4.1.2"
Package existence check passed for "libstdc++-devel-4.1.2"
Package existence check passed for "sysstat-7.0.2"
Package existence check passed for "unixODBC-2.2.11"
Package existence check passed for "unixODBC-devel-2.2.11"
Package existence check passed for "ksh-20060214"
Check for multiple users with UID value 0 passed
Current group ID check passed
Core file name pattern consistency check passed.
User "oracle" is not part of "root" group. Check passed
Default user file creation mask check passed
Starting Clock synchronization checks using Network Time
Protocol(NTP)...
NTP Configuration file check started...
NTP Configuration file check passed
Checking daemon liveness...
Liveness check failed for "ntpd"
Check failed on nodes:
collabn2,collabn1
PRVF-5415 : Check to see if NTP daemon is running failed
Clock synchronization check using Network Time Protocol(NTP) failed
Fixup information has been generated for following node(s):
collabn2,collabn1
Please run the following script on each node as "root" user to execute the
fixups:
'/tmp/CVU_11.2.0.1.0_oracle/runfixup.sh'
Pre-check for cluster services setup was unsuccessful on all the
nodes.
3. Switch to the root user and run the xup script on both nodes.
99
Grid Install (ASM)
collabn1:/home/oracle[RAC1]$ su -
Password:
-bash: oraenv: No such file or directory
[root@collabn1 ]# /tmp/CVU_11.2.0.1.0_oracle/runfixup.sh
Response file being used is
:/tmp/CVU_11.2.0.1.0_oracle/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.1.0_oracle/fixup.enable
Log file location: /tmp/CVU_11.2.0.1.0_oracle/orarun.log
Setting Kernel Parameters...
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.wmem_max=262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
[root@collabn1 ]# ssh collabn2 /tmp/CVU_11.2.0.1.0_oracle/runfixup.sh
root@collabn2's password:
/root/.bashrc: line 16: oraenv: No such file or directory
Response file being used is
:/tmp/CVU_11.2.0.1.0_oracle/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.1.0_oracle/fixup.enable
Log file location: /tmp/CVU_11.2.0.1.0_oracle/orarun.log
Setting Kernel Parameters...
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.wmem_max=262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
4. As the oracle user, run CVU again to make sure the xit script worked. The NTP, memory and
swap checks might fail but this is acceptable for our VMware test cluster.
[root@collabn1 ]# exit
logout
collabn1:/home/oracle[RAC1]$ /mnt/cdrom
*
/grid/runcluvfy.sh stage -pre crsinst -n
collabn1,collabn2 -r 11gR2
...
Total memory check failed
...
Swap space check failed
...
Kernel parameter check passed for "file-max"
...
Kernel parameter check passed for "wmem_max"
Kernel parameter check passed for "aio-max-nr"
...
Liveness check failed for "ntpd"
...
100
Install Grid Infrastructure (ASM)
6.3. Install Grid Infrastructure (ASM)
1. As the oracle user, launch the grid installer. At the rst screen, choose Install and Congure
Grid Infrastructure for a Cluster and click NEXT.
[oracle@collabn1 ]$ /mnt/cdrom
*
/grid/runInstaller
Figure 132
101
Grid Install (ASM)
Figure 133
2. Choose Advanced Installation and click NEXT.
Figure 134
102
Install Grid Infrastructure (ASM)
3. Accept the default language (English) and choose NEXT.
Figure 135
4. Name the cluster collab and make sure that the SCAN name is collab-scan with port 1521, then
click NEXT.
Figure 136
103
Grid Install (ASM)
5. Add node collabn2 with VIP collabn2-vip and choose NEXT to validate the cluster congura-
tion.
Figure 137
6. Verify that eth0 on subnet 192.168.78.0 is PUBLIC and that eth1 on subnet 172.16.100.0 is
PRIVATE, then click NEXT.
Figure 138
104
Install Grid Infrastructure (ASM)
7. Choose to store the Clusterware Files in ASM and choose NEXT.
Figure 139
8. Create a diskgroup called DATA with External Redundancy using only the disk ORCL:DATA
and click NEXT.
Figure 140
105
Grid Install (ASM)
9. Choose to use the same passwords for all accounts and enter the password racattack, then click
NEXT. (Ignore the message that Oracle doesn't like this password.)
Figure 141
10. Do not use IPMI. Click NEXT.
Figure 142
106
Install Grid Infrastructure (ASM)
11. Set the OSDBA group to asmdba, the OSOPER group to asmoper and the OSASM group to
asmadmin. Then click NEXT.
Figure 143
12. Accept the ORACLE_BASE location of /u01/app/oracle and use the ORACLE_HOME location
of /u01/grid/oracle/product/11.2.0/grid_1. Then click NEXT.
Figure 144
107
Grid Install (ASM)
13. Accept the default inventory location of /u01/app/oraInventory and choose NEXT
Figure 145
14. The prerequisite checks will execute. A warning will be issued saying that three checks failed:
physical memory, swap size and network time protocol. Click the CHECK BOX to Ignore All,
then click NEXT.
Figure 146
108
Install Grid Infrastructure (ASM)
15. SAVE a response le called grid.rsp in the oracle user home directory. Then click FINISH to
install grid infrastructure.
Figure 147
Figure 148
109
Grid Install (ASM)
16. When prompted, open a terminal as the root user and run the two root.sh scripts. Make sure to
run BOTH SCRIPTS on BOTH NODES!
Figure 149
[oracle@collabn1 ]$ su -
Password: racattack
[root@collabn1 ]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@collabn1 ]# /u01/grid/oracle/product/11.2.0/grid_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/grid/oracle/product/11.2.0/grid_1
Enter the full pathname of the local bin directory:
[/usr/local/bin]: /usr/bin
Copying dbhome to /usr/bin ...
Copying oraenv to /usr/bin ...
Copying coraenv to /usr/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2011-03-30 16:49:13: Parsing the host name
2011-03-30 16:49:13: Checking for super user privileges
2011-03-30 16:49:13: User has super user privileges
110
Install Grid Infrastructure (ASM)
Using configuration parameter file:
/u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-2672: Attempting to start 'ora.gipcd' on 'collabn1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn1'
CRS-2676: Start of 'ora.mdnsd' on 'collabn1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn1'
CRS-2676: Start of 'ora.gpnpd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn1'
CRS-2676: Start of 'ora.cssdmonitor' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'collabn1'
CRS-2672: Attempting to start 'ora.diskmon' on 'collabn1'
CRS-2676: Start of 'ora.diskmon' on 'collabn1' succeeded
CRS-2676: Start of 'ora.cssd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'collabn1'
CRS-2676: Start of 'ora.ctssd' on 'collabn1' succeeded
ASM created and started successfully.
DiskGroup DATA created successfully.
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-2672: Attempting to start 'ora.crsd' on 'collabn1'
CRS-2676: Start of 'ora.crsd' on 'collabn1' succeeded
CRS-4256: Updating the profile
Successful addition of voting disk 6b7c5142d3214fe9bf4d4273f0ff11fd.
Successfully replaced voting disk group with +DATA.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 6b7c5142d3214fe9bf4d4273f0ff11fd (ORCL:DATA) [DATA]
111
Grid Install (ASM)
Located 1 voting disk(s).
CRS-2673: Attempting to stop 'ora.crsd' on 'collabn1'
CRS-2677: Stop of 'ora.crsd' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'collabn1'
CRS-2677: Stop of 'ora.asm' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'collabn1'
CRS-2677: Stop of 'ora.ctssd' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'collabn1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'collabn1'
CRS-2677: Stop of 'ora.cssd' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'collabn1'
CRS-2677: Stop of 'ora.gpnpd' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'collabn1'
CRS-2677: Stop of 'ora.gipcd' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'collabn1'
CRS-2677: Stop of 'ora.mdnsd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn1'
CRS-2676: Start of 'ora.mdnsd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'collabn1'
CRS-2676: Start of 'ora.gipcd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn1'
CRS-2676: Start of 'ora.gpnpd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn1'
CRS-2676: Start of 'ora.cssdmonitor' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'collabn1'
CRS-2672: Attempting to start 'ora.diskmon' on 'collabn1'
CRS-2676: Start of 'ora.diskmon' on 'collabn1' succeeded
CRS-2676: Start of 'ora.cssd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'collabn1'
CRS-2676: Start of 'ora.ctssd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'collabn1'
CRS-2676: Start of 'ora.asm' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'collabn1'
CRS-2676: Start of 'ora.crsd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'collabn1'
CRS-2676: Start of 'ora.evmd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'collabn1'
CRS-2676: Start of 'ora.asm' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.DATA.dg' on 'collabn1'
CRS-2676: Start of 'ora.DATA.dg' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.registry.acfs' on 'collabn1'
CRS-2676: Start of 'ora.registry.acfs' on 'collabn1' succeeded
collabn1 2011/03/30 16:59:35 /u01/grid/o
racle/product/11.2.0/grid_1/cdata/collabn1/backup_20110330_165935.olr
Preparing packages for installation...
cvuqdisk-1.0.7-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 968 MB
Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
Warning
Before you run any scripts on the second node, check the CPU utilization on the rst node - where
you just nished running scripts. If %idle is 0 then something is still running in the background
112
Install Grid Infrastructure (ASM)
and you should wait until %idle increases. You can monitor the CPU with any of these three
commands:
top
vmstat 3
iostat -x sda sdb sdc 3
[root@collabn1 ]# vmstat 3 4
procs -----------memory---------- ---swap-- -----io---- --system--
-----cpu------
r b swpd free buff cache si so bi bo in cs us
sy id wa st
0 0 660156 11868 6472 263348 33 229 1505 2740 1194 2407 8
22 44 27 0
2 0 660156 11884 6472 263364 0 0 1 3 712 3635 2
4 90 4 0
1 0 660156 11884 6480 263368 0 0 0 34 701 3565 1
3 90 6 0
4 0 660156 11884 6480 263372 0 0 1 5 721 3642 2
8 88 2 0
[root@collabn1 ]# ssh collabn2
root@collabn2's password: racattack
-bash: oraenv: No such file or directory
[root@collabn2 ]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@collabn2 ]# /u01/grid/oracle/product/11.2.0/grid_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/grid/oracle/product/11.2.0/grid_1
Enter the full pathname of the local bin directory:
[/usr/local/bin]: /usr/bin
Copying dbhome to /usr/bin ...
Copying oraenv to /usr/bin ...
Copying coraenv to /usr/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2011-03-30 17:04:26: Parsing the host name
2011-03-30 17:04:26: Checking for super user privileges
2011-03-30 17:04:26: User has super user privileges
Using configuration parameter file:
/u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-4402: The CSS daemon was started in exclusive mode but found an
113
Grid Install (ASM)
active CSS daemon on node collabn1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to
join the cluster
CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn2'
CRS-2676: Start of 'ora.mdnsd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'collabn2'
CRS-2676: Start of 'ora.gipcd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn2'
CRS-2676: Start of 'ora.gpnpd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn2'
CRS-2676: Start of 'ora.cssdmonitor' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'collabn2'
CRS-2672: Attempting to start 'ora.diskmon' on 'collabn2'
CRS-2676: Start of 'ora.diskmon' on 'collabn2' succeeded
CRS-2676: Start of 'ora.cssd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'collabn2'
CRS-2676: Start of 'ora.ctssd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'collabn2'
CRS-2676: Start of 'ora.drivers.acfs' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'collabn2'
CRS-2676: Start of 'ora.asm' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'collabn2'
CRS-2676: Start of 'ora.crsd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'collabn2'
CRS-2676: Start of 'ora.evmd' on 'collabn2' succeeded
collabn2 2011/03/30 17:12:32 /u01/grid/o
racle/product/11.2.0/grid_1/cdata/collabn2/backup_20110330_171232.olr
Preparing packages for installation...
cvuqdisk-1.0.7-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 1205 MB
Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
114
Install Grid Infrastructure (ASM)
17. After running both scripts, return to the installer window and click OK to continue running
conguration assistants.
Figure 150
18. The Cluster Verication Utility will fail because NTP is not running. If you want to, check the
error message at the very end of the logle. Then click OK to close the messagebox and click
NEXT to continue.
Figure 151
115
Grid Install (ASM)
19. You should now see the nal screen! Click CLOSE to exit the installer.
Figure 152
6.4. Increase CRS Fencing Timeout (ASM)
These steps are not necessary for a test or production environment. However they might make your
VMware test cluster just a little more stable and they will provide a good learning opportunity about
Grid Infrastructure.
1. Grid Infrastructure must be running on only one node to change these settings. Shutdown the
clusterware on collabn2 as user root.
[oracle@collabn1 ]$ ssh collabn2
Last login: Wed Mar 30 14:50:49 2011
Set environment by typing 'oenv' - default is instance RAC1.
collabn2:/home/oracle[RAC1]$ su -
Password: racattack
[root@collabn2 bin]# crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability
Services-managed resources
on 'collabn2'
CRS-2673: Attempting to stop 'ora.crsd' on 'collabn2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed
resources on 'collabn2'
...
...
...
CRS-2793: Shutdown of Oracle High Availability Services-managed
116
Setup ASM
resources on 'collabn2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2. Return to node collabn1. As the root user, increase the misscount so that CRS waits 1.5 minutes
before it reboots. (VMware can drag a little on some laptops!)
[root@collabn1 ]# crsctl get css misscount
30
[root@collabn1 ]# crsctl set css misscount 90
Configuration parameter misscount is now set to 90.
3. Increase the disktimeout so that CRS waits 10 minutes for I/O to complete before rebooting.
[root@collabn1 ]# crsctl get css disktimeout
200
[root@collabn1 ]# crsctl set css disktimeout 600
Configuration parameter disktimeout is now set to 600.
4. Restart CRS on the other node.
[root@collabn1 bin]# ssh collabn2
[root@collabn2 bin]# crsctl start crs
6.5. Setup ASM
1. As the oracle user, use the oenv macro (from Ardent Performance Computing) to set your
environment for the SID +ASM1. Then, type asmca to launch ASMCA.
collabn1:/home/oracle[RAC1]$ oenv
SIDs here are: grid +ASM1
ORACLE_SID = [RAC1] ? +ASM1
The Oracle base for
ORACLE_HOME=/u01/grid/oracle/product/11.2.0/grid_1
is /u01/app/oracle
collabn1:/home/oracle[+ASM1]$ asmca
117
Grid Install (ASM)
2. Make sure you're on the Disk Groups tab and then right-click on the DATA diskgroup and choose
Edit Attributes.
Figure 153
3. Set the Database Compatibility and the ADVM Compatibility both to 11.2.0.0.0 then click OK.
Choose YES when prompted about advancing database compatibility.
Figure 154
118
Setup ASM
4. Click the Create button to add a new diskgroup.
Figure 155
5. Name the new diskgroup BACKUP. Choose External redundancy and select the disk
ORCL:BACKUP. Then, click the Show Advanced Options button.
Figure 156
119
Grid Install (ASM)
6. Leave the Allocation Unit at 1MB and set all compatibility parameters to 11.2.0.0.0, then click
OK.
Figure 157
Figure 158
120
Setup ASM
7. Click EXIT to close the ASM Conguration Assistant.
Figure 159
121
7. Grid Install (Shared Filesystem)
7.1. Setup OCFS2
1. Open a terminal as the root user on collabn1.
Figure 160
2. Create mountpoints on both nodes for two OCFS volumes: /u51 and /u52.
[root@collabn1 ]# mkdir /u51
[root@collabn1 ]# mkdir /u52
[root@collabn1 ]# ssh collabn2
root@collabn2's password: racattack
[root@collabn2 ]# mkdir /u51
[root@collabn2 ]# mkdir /u52
3. Install and load the OCFS2 packages from the OEL (Oracle Enterprise Linux) installation media
and then load the module. Install and load OCFS2 on collabn2 as well.
123
Grid Install (Shared Filesystem)
[root@collabn1 ]# cd /mnt
# From Enterprise Linux 5 Disk 3
rpm -Uvh
*
/
*
/ocfs2-tools-1.
*
rpm -Uvh
*
/
*
/ocfs2-
*
el5-
*
rpm -Uvh
*
/
*
/ocfs2console-
*
[root@collabn1 mnt]# /etc/init.d/o2cb load
Loading module "configfs": OK
Mounting configfs filesystem at /sys/kernel/config: OK
Loading module "ocfs2_nodemanager": OK
Loading module "ocfs2_dlm": OK
Loading module "ocfs2_dlmfs": OK
Creating directory '/dlm': OK
Mounting ocfs2_dlmfs filesystem at /dlm: OK
[root@collabn1 ]# ssh collabn2
root@collabn2's password: racattack
[root@collabn2 ]# cd /mnt
# From Enterprise Linux 5 Disk 3
rpm -Uvh
*
/
*
/ocfs2-tools-1.
*
rpm -Uvh
*
/
*
/ocfs2-
*
el5-
*
rpm -Uvh
*
/
*
/ocfs2console-
*
[root@collabn2 mnt]# /etc/init.d/o2cb load
Loading module "configfs": OK
Mounting configfs filesystem at /sys/kernel/config: OK
Loading module "ocfs2_nodemanager": OK
Loading module "ocfs2_dlm": OK
Loading module "ocfs2_dlmfs": OK
Creating directory '/dlm': OK
Mounting ocfs2_dlmfs filesystem at /dlm: OK
124
Setup OCFS2
4. From the terminal window, as root, launch ocfs2console
Figure 161
5. Choose CONFIGURE NODES. . . from the CLUSTER menu. If you see a notication that the
cluster has been started, then acknowledge it by clicking the Close button.
Figure 162
125
Grid Install (Shared Filesystem)
Figure 163
6. Click ADD and enter the collabn1 and the private IP 172.16.100.51. Accept the default port.
Click OK to save.
Figure 164
126
Setup OCFS2
7. Click ADD a second time and enter collabn2 and 172.16.100.52. Then choose to APPLY then
click CLOSE to close the window.
Figure 165
127
Grid Install (Shared Filesystem)
8. Choose PROPAGATECONFIGURATION. . . fromthe CLUSTERmenu. If you are prompted
to accept host keys then type YES. Type the root password racattack at the both prompts. When
you see the message Finished! then press <ALT-C> to close the window.
Figure 166
128
Setup OCFS2
9. From the TASKS menu, choose FORMAT to create the OCFS lesystem. Select /dev/sdb1 and
type the volume label u51-data. Leave the rest of the options at their defaults and click OK to
format the volume. Conrm by clicking YES.
Figure 167
Figure 168
129
Grid Install (Shared Filesystem)
10. Repeat the previous step for volume /dev/sdc1 and name it u52-backup.
Figure 169
11. Exit the OCFS2 console by selecting QUIT from the FILE menu.
Figure 170
130
Setup OCFS2
12. Congure OCFS2 on both nodes. We will use a conservative disk heartbeat timeout (300 seconds)
because VMware is slow on some laptops.
[root@collabn1 mnt]# /etc/init.d/o2cb configure
Configuring the O2CB driver.
This will configure the on-boot properties of the O2CB driver.
The following questions will determine whether the driver is loaded
on
boot. The current values will be shown in brackets ('[]'). Hitting
<ENTER> without typing an answer will keep that current value.
Ctrl-C
will abort.
Load O2CB driver on boot (y/n) [n]: y
Cluster stack backing O2CB [o2cb]:
Cluster to start on boot (Enter "none" to clear) [ocfs2]:
Specify heartbeat dead threshold (>=7) [31]: 300
Specify network idle timeout in ms (>=5000) [30000]:
Specify network keepalive delay in ms (>=1000) [2000]:
Specify network reconnect delay in ms (>=2000) [2000]:
Writing O2CB configuration: OK
Cluster ocfs2 already online
[root@collabn1 ]# ssh collabn2
root@collabn2's password: racattack
[root@collabn2 mnt]# /etc/init.d/o2cb configure
figuring the O2CB driver.
This will configure the on-boot properties of the O2CB driver.
The following questions will determine whether the driver is loaded
on
boot. The current values will be shown in brackets ('[]'). Hitting
<ENTER> without typing an answer will keep that current value.
Ctrl-C
will abort.
Load O2CB driver on boot (y/n) [n]: y
Cluster stack backing O2CB [o2cb]:
Cluster to start on boot (Enter "none" to clear) [ocfs2]:
Specify heartbeat dead threshold (>=7) [31]: 300
Specify network idle timeout in ms (>=5000) [30000]:
Specify network keepalive delay in ms (>=1000) [2000]:
Specify network reconnect delay in ms (>=2000) [2000]:
Writing O2CB configuration: OK
Starting O2CB cluster ocfs2: OK
13. Reload the O2CB driver on the node where you ran ocfs2console.
[root@collabn2 mnt]# exit
logout
Connection to collabn2 closed.
[root@collabn1 mnt]# /etc/init.d/o2cb force-reload
Stopping O2CB cluster ocfs2: OK
Unmounting ocfs2_dlmfs filesystem: OK
Unloading module "ocfs2_dlmfs": OK
Unmounting configfs filesystem: OK
Unloading module "configfs": OK
131
Grid Install (Shared Filesystem)
Loading filesystem "configfs": OK
Mounting configfs filesystem at /sys/kernel/config: OK
Loading filesystem "ocfs2_dlmfs": OK
Mounting ocfs2_dlmfs filesystem at /dlm: OK
Starting O2CB cluster ocfs2: OK
14. Edit /etc/fstab to add entries for the new le systems.
[root@collabn1 ]# vi /etc/fstab
LABEL=u51-data /u51 ocfs2 _netdev,datavolume,nointr 0 0
LABEL=u52-backup /u52 ocfs2 _netdev,datavolume,nointr 0 0
15. Mount the volumes and create directories for the oracle database les.
[root@collabn1 ]# mount /u51
[root@collabn1 ]# mount /u52
[root@collabn1 ]# mkdir /u51/oradata
[root@collabn1 ]# mkdir /u52/oradata
[root@collabn1 ]# mkdir /u51/cluster
[root@collabn1 ]# chown oracle:dba /u51/oradata /u52/oradata /u51/cluster
[root@collabn1 ]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 3.3G 279M 3.0G 9% /u51
/dev/sdc1 3.3G 279M 3.0G 9% /u52
16. Login to the second node collabn2 as root and repeat these steps there.
[root@collabn1 ]# ssh collabn2
root@collabn2's password: racattack
[root@collabn2 ]# vi /etc/fstab
LABEL=u51-data /u51 ocfs2 _netdev,datavolume,nointr 0 0
LABEL=u52-backup /u52 ocfs2 _netdev,datavolume,nointr 0 0
[root@collabn2 ]# mount /u51
[root@collabn2 ]# mount /u52
[root@collabn2 ]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 3.3G 279M 3.0G 9% /u51
/dev/sdc1 3.3G 279M 3.0G 9% /u52
[root@collabn2 ]# ls -l /u5
*
/u51:
total 0
drwxr-xr-x 2 oracle dba 3896 Sep 26 15:30 cluster
drwxr-xr-x 2 root root 3896 Sep 26 15:26 lost+found
drwxr-xr-x 2 oracle dba 3896 Sep 26 15:29 oradata
/u52:
total 0
drwxr-xr-x 2 root root 3896 Sep 26 15:26 lost+found
drwxr-xr-x 2 oracle dba 3896 Sep 26 15:30 oradata
17. Optionally, examine /var/log/messages and dmesg output for status messages related to OCFS2.
132
Cluster Verication Utility (Shared Filesystem)
7.2. Cluster Verication Utility (Shared Filesystem)
1. Login to collabn1 as the oracle user and open a terminal.
Figure 171
2. Run CVU to validate that you're ready to install CRS. Use the new xup feature of 11gR2
CVU to create a script that can x missing parameters.
[oracle@collabn1 ]$ /mnt/cdrom
*
/grid/runcluvfy.sh stage -pre crsinst -n
collabn1,collabn2 -fixup -r 11gR2
Performing pre-checks for cluster services setup
Checking node reachability...
Node reachability check passed from node "collabn1"
Checking user equivalence...
User equivalence check passed for user "oracle"
Checking node connectivity...
Checking hosts config file...
Verification of the hosts config file successful
Node connectivity passed for subnet "192.168.78.0" with node(s)
collabn2,collabn1
TCP connectivity check passed for subnet "192.168.78.0"
Node connectivity passed for subnet "172.16.100.0" with node(s)
collabn2,collabn1
133
Grid Install (Shared Filesystem)
TCP connectivity check passed for subnet "172.16.100.0"
Interfaces found on subnet "192.168.78.0" that are likely candidates
for VIP are:
collabn2 eth0:192.168.78.52
collabn1 eth0:192.168.78.51
Interfaces found on subnet "172.16.100.0" that are likely candidates
for a private interconnect are:
collabn2 eth1:172.16.100.52
collabn1 eth1:172.16.100.51
Node connectivity check passed
Total memory check failed
Check failed on nodes:
collabn2,collabn1
Available memory check passed
Swap space check failed
Free disk space check passed for "collabn2:/tmp"
Free disk space check passed for "collabn1:/tmp"
User existence check passed for "oracle"
Group existence check passed for "oinstall"
Group existence check passed for "dba"
Membership check for user "oracle" in group "oinstall" [as Primary]
passed
Membership check for user "oracle" in group "dba" passed
Run level check passed
Hard limits check passed for "maximum open file descriptors"
Soft limits check passed for "maximum open file descriptors"
Hard limits check passed for "maximum user processes"
Soft limits check passed for "maximum user processes"
System architecture check passed
Kernel version check passed
Kernel parameter check passed for "semmsl"
Kernel parameter check passed for "semmns"
Kernel parameter check passed for "semopm"
Kernel parameter check passed for "semmni"
Kernel parameter check passed for "shmmax"
Kernel parameter check passed for "shmmni"
Kernel parameter check passed for "shmall"
Kernel parameter check failed for "file-max"
Check failed on nodes:
collabn2,collabn1
Kernel parameter check passed for "ip_local_port_range"
Kernel parameter check passed for "rmem_default"
Kernel parameter check passed for "rmem_max"
Kernel parameter check passed for "wmem_default"
Kernel parameter check failed for "wmem_max"
Check failed on nodes:
collabn2,collabn1
Kernel parameter check failed for "aio-max-nr"
Check failed on nodes:
collabn2,collabn1
Package existence check passed for "make-3.81"
Package existence check passed for "binutils-2.17.50.0.6"
Package existence check passed for "gcc-4.1.2"
Package existence check passed for "gcc-c++-4.1.2"
Package existence check passed for "libgomp-4.1.2"
Package existence check passed for "libaio-0.3.106"
Package existence check passed for "glibc-2.5-24"
Package existence check passed for "compat-libstdc++-33-3.2.3"
Package existence check passed for "elfutils-libelf-0.125"
134
Cluster Verication Utility (Shared Filesystem)
Package existence check passed for "elfutils-libelf-devel-0.125"
Package existence check passed for "glibc-common-2.5"
Package existence check passed for "glibc-devel-2.5"
Package existence check passed for "glibc-headers-2.5"
Package existence check passed for "libaio-devel-0.3.106"
Package existence check passed for "libgcc-4.1.2"
Package existence check passed for "libstdc++-4.1.2"
Package existence check passed for "libstdc++-devel-4.1.2"
Package existence check passed for "sysstat-7.0.2"
Package existence check passed for "unixODBC-2.2.11"
Package existence check passed for "unixODBC-devel-2.2.11"
Package existence check passed for "ksh-20060214"
Check for multiple users with UID value 0 passed
Current group ID check passed
Core file name pattern consistency check passed.
User "oracle" is not part of "root" group. Check passed
Default user file creation mask check passed
Starting Clock synchronization checks using Network Time
Protocol(NTP)...
NTP Configuration file check started...
NTP Configuration file check passed
Checking daemon liveness...
Liveness check failed for "ntpd"
Check failed on nodes:
collabn2,collabn1
PRVF-5415 : Check to see if NTP daemon is running failed
Clock synchronization check using Network Time Protocol(NTP) failed
Fixup information has been generated for following node(s):
collabn2,collabn1
Please run the following script on each node as "root" user to
execute the fixups:
'/tmp/CVU_11.2.0.1.0_oracle/runfixup.sh'
Pre-check for cluster services setup was unsuccessful on all the
nodes.
3. Switch to the root user and run the xup script on both nodes.
collabn1:/home/oracle[RAC1]$ su -
Password:
-bash: oraenv: No such file or directory
[root@collabn1 ]# /tmp/CVU_11.2.0.1.0_oracle/runfixup.sh
Response file being used is
:/tmp/CVU_11.2.0.1.0_oracle/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.1.0_oracle/fixup.enable
Log file location: /tmp/CVU_11.2.0.1.0_oracle/orarun.log
Setting Kernel Parameters...
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.wmem_max=262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
[root@collabn1 ]# ssh collabn2 /tmp/CVU_11.2.0.1.0_oracle/runfixup.sh
135
Grid Install (Shared Filesystem)
root@collabn2's password:
/root/.bashrc: line 16: oraenv: No such file or directory
Response file being used is
:/tmp/CVU_11.2.0.1.0_oracle/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.1.0_oracle/fixup.enable
Log file location: /tmp/CVU_11.2.0.1.0_oracle/orarun.log
Setting Kernel Parameters...
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.wmem_max=262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
4. As the oracle user, run CVU again to make sure the xit script worked. The NTP, memory and
swap checks might fail but this is acceptable for our VMware test cluster.
[root@collabn1 ]# exit
logout
collabn1:/home/oracle[RAC1]$ /mnt/cdrom
*
/grid/runcluvfy.sh stage -pre crsinst -n
collabn1,collabn2 -r 11gR2
...
Total memory check failed
...
Swap space check failed
...
Kernel parameter check passed for "file-max"
...
Kernel parameter check passed for "wmem_max"
Kernel parameter check passed for "aio-max-nr"
...
Liveness check failed for "ntpd"
...
7.3. 11gR2 Bug Workaround
Several NFS appliances and big-iron cluster lesystems are very common in large cluster database
deployments. We will use OCFS2 here to practice 11gR2 RAC with a lesystem.
Note: 11gR2 clusterware has a bug it does allow cluster les on OCFS2 (even though this is a
supported conguration). To work around this bug, we will present the OCFS2 directory to clusterware
with a local "loopback" NFS mount.
1. As the root user, Follow the steps below to setup the local NFS mount on node collabn1.
[root@collabn1 ]# mkdir /u61
[root@collabn1 ]# vi /etc/fstab
# create an NFS mount on u61 which points back to u51
localhost:/u51 /u61 nfs \
rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,noac
136
Install Grid Infrastructure (Shared Filesystem)
[root@collabn1 ]# vi /etc/exports
/u51
*
(rw,no_root_squash,sync)
[root@collabn1 ]# chkconfig nfs on
[root@collabn1 ]# service nfs start
[root@collabn1 ]# mount /u61
2. Repeat all of these steps on node collabn2.
[root@collabn1 ]# ssh collabn2
[root@collabn2 ]# mkdir /u61
[root@collabn2 ]# vi /etc/fstab
# create an NFS mount on u61 which points back to u51
localhost:/u51 /u61 nfs \
rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,noac
[root@collabn2 ]# vi /etc/exports
/u51
*
(rw,no_root_squash,sync)
[root@collabn2 ]# chkconfig nfs on
[root@collabn2 ]# service nfs start
[root@collabn2 ]# mount /u61
7.4. Install Grid Infrastructure (Shared Filesystem)
Several NFS appliances and big-iron cluster lesystems are very common in large cluster database
deployments. We will use OCFS2 here to practice 11gR2 RAC with a lesystem.
1. As the oracle user, launch the grid installer. At the rst screen, choose Install and Congure
Grid Infrastructure for a Cluster and click NEXT.
[oracle@collabn1 ]$ /mnt/cdrom
*
/grid/runInstaller
137
Grid Install (Shared Filesystem)
Figure 172
Figure 173
138
Install Grid Infrastructure (Shared Filesystem)
2. Choose Advanced Installation and click NEXT.
Figure 174
3. Accept the default language (English) and choose NEXT.
Figure 175
139
Grid Install (Shared Filesystem)
4. Name the cluster collab and make sure that the SCAN name is collab-scan with port 1521, then
click NEXT.
Figure 176
5. Add node collabn2 with VIP collabn2-vip and choose NEXT to validate the cluster congura-
tion.
Figure 177
140
Install Grid Infrastructure (Shared Filesystem)
6. Verify that eth0 on subnet 192.168.78.0 is PUBLIC and that eth1 on subnet 172.16.100.0 is
PRIVATE, then click NEXT.
Figure 178
7. Choose to store the Clusterware Files in Shared File System and choose NEXT.
Figure 179
141
Grid Install (Shared Filesystem)
8. For the OCR, choose External Redundancy and type the path /u61/cluster/ocr. (This is the NFS
location from the BUG WORKAROUND.) Click NEXT to continue.
Figure 180
9. For the Voting Disk, do the same choose External Redundancy and type the path
/u61/cluster/vdsk. (Again, this is the NFS location from the BUG WORKAROUND.) Click
NEXT to continue.
Figure 181
142
Install Grid Infrastructure (Shared Filesystem)
10. Do not use IPMI. Click NEXT.
Figure 182
11. Set the OSDBA group to asmdba, the OSOPER group to asmoper and the OSASM group to
asmadmin. Then click NEXT.
Figure 183
143
Grid Install (Shared Filesystem)
12. Accept the ORACLE_BASE location of /u01/app/oracle and use the ORACLE_HOME location
of /u01/grid/oracle/product/11.2.0/grid_1. Then click NEXT.
Figure 184
13. Accept the default inventory location and choose NEXT
Figure 185
144
Install Grid Infrastructure (Shared Filesystem)
14. The prerequisite checks will execute. A warning will be issued saying that three checks failed:
physical memory, swap size and network time protocol. Click the CHECK BOX to Ignore All,
then click NEXT.
Figure 186
15. SAVE a response le called grid.rsp in the oracle user home directory. Then click FINISH to
install grid infrastructure.
Figure 187
145
Grid Install (Shared Filesystem)
Figure 188
16. When prompted, open a terminal as the root user and run the two root.sh scripts. Make sure to
run BOTH SCRIPTS on BOTH NODES!
Figure 189
[oracle@collabn1 ]$ su -
Password: racattack
146
Install Grid Infrastructure (Shared Filesystem)
[root@collabn1 ]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@collabn1 ]# /u01/grid/oracle/product/11.2.0/grid_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/grid/oracle/product/11.2.0/grid_1
Enter the full pathname of the local bin directory:
[/usr/local/bin]: /usr/bin
Copying dbhome to /usr/bin ...
Copying oraenv to /usr/bin ...
Copying coraenv to /usr/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2011-03-30 16:49:13: Parsing the host name
2011-03-30 16:49:13: Checking for super user privileges
2011-03-30 16:49:13: User has super user privileges
Using configuration parameter file:
/u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-2672: Attempting to start 'ora.gipcd' on 'collabn1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn1'
CRS-2676: Start of 'ora.mdnsd' on 'collabn1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn1'
147
Grid Install (Shared Filesystem)
CRS-2676: Start of 'ora.gpnpd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn1'
CRS-2676: Start of 'ora.cssdmonitor' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'collabn1'
CRS-2672: Attempting to start 'ora.diskmon' on 'collabn1'
CRS-2676: Start of 'ora.diskmon' on 'collabn1' succeeded
CRS-2676: Start of 'ora.cssd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'collabn1'
CRS-2676: Start of 'ora.ctssd' on 'collabn1' succeeded
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-2672: Attempting to start 'ora.crsd' on 'collabn1'
CRS-2676: Start of 'ora.crsd' on 'collabn1' succeeded
Now formatting voting disk: /u61/cluster/vdsk.
CRS-4603: Successful addition of voting disk /u61/cluster/vdsk.
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 59f9f62cc0f44f35bff552ced06e35ee (/u61/cluster/vdsk) []
Located 1 voting disk(s).
CRS-2673: Attempting to stop 'ora.crsd' on 'collabn1'
CRS-2677: Stop of 'ora.crsd' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'collabn1'
CRS-2677: Stop of 'ora.asm' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'collabn1'
CRS-2677: Stop of 'ora.ctssd' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'collabn1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'collabn1'
CRS-2677: Stop of 'ora.cssd' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'collabn1'
CRS-2677: Stop of 'ora.gpnpd' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'collabn1'
CRS-2677: Stop of 'ora.gipcd' on 'collabn1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'collabn1'
CRS-2677: Stop of 'ora.mdnsd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn1'
CRS-2676: Start of 'ora.mdnsd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'collabn1'
CRS-2676: Start of 'ora.gipcd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn1'
CRS-2676: Start of 'ora.gpnpd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn1'
CRS-2676: Start of 'ora.cssdmonitor' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'collabn1'
CRS-2672: Attempting to start 'ora.diskmon' on 'collabn1'
CRS-2676: Start of 'ora.diskmon' on 'collabn1' succeeded
CRS-2676: Start of 'ora.cssd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'collabn1'
CRS-2676: Start of 'ora.ctssd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'collabn1'
CRS-2676: Start of 'ora.asm' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'collabn1'
CRS-2676: Start of 'ora.crsd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'collabn1'
CRS-2676: Start of 'ora.evmd' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'collabn1'
CRS-2676: Start of 'ora.asm' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.DATA.dg' on 'collabn1'
CRS-2676: Start of 'ora.DATA.dg' on 'collabn1' succeeded
CRS-2672: Attempting to start 'ora.registry.acfs' on 'collabn1'
CRS-2676: Start of 'ora.registry.acfs' on 'collabn1' succeeded
148
Install Grid Infrastructure (Shared Filesystem)
collabn1 2011/03/30 16:59:35 /u01/grid/o
racle/product/11.2.0/grid_1/cdata/collabn1/backup_20110330_165935.olr
Preparing packages for installation...
cvuqdisk-1.0.7-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 968 MB
Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
[root@collabn1 ]# ssh collabn2
root@collabn2's password: racattack
-bash: oraenv: No such file or directory
[root@collabn2 ]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@collabn2 ]# /u01/grid/oracle/product/11.2.0/grid_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/grid/oracle/product/11.2.0/grid_1
Enter the full pathname of the local bin directory:
[/usr/local/bin]: /usr/bin
Copying dbhome to /usr/bin ...
Copying oraenv to /usr/bin ...
Copying coraenv to /usr/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2011-03-30 17:04:26: Parsing the host name
2011-03-30 17:04:26: Checking for super user privileges
2011-03-30 17:04:26: User has super user privileges
Using configuration parameter file:
/u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-4402: The CSS daemon was started in exclusive mode but found an
active CSS daemon on node collabn1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to
join the cluster
CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn2'
CRS-2676: Start of 'ora.mdnsd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'collabn2'
CRS-2676: Start of 'ora.gipcd' on 'collabn2' succeeded
149
Grid Install (Shared Filesystem)
CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn2'
CRS-2676: Start of 'ora.gpnpd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn2'
CRS-2676: Start of 'ora.cssdmonitor' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'collabn2'
CRS-2672: Attempting to start 'ora.diskmon' on 'collabn2'
CRS-2676: Start of 'ora.diskmon' on 'collabn2' succeeded
CRS-2676: Start of 'ora.cssd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'collabn2'
CRS-2676: Start of 'ora.ctssd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'collabn2'
CRS-2676: Start of 'ora.drivers.acfs' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'collabn2'
CRS-2676: Start of 'ora.asm' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'collabn2'
CRS-2676: Start of 'ora.crsd' on 'collabn2' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'collabn2'
CRS-2676: Start of 'ora.evmd' on 'collabn2' succeeded
collabn2 2011/03/30 17:12:32 /u01/grid/o
racle/product/11.2.0/grid_1/cdata/collabn2/backup_20110330_171232.olr
Preparing packages for installation...
cvuqdisk-1.0.7-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 1205 MB
Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
17. After running both scripts, return to the installer window and click OK to continue running
conguration assistants.
Figure 190
150
Install Grid Infrastructure (Shared Filesystem)
18. The Cluster Verication Utility will fail because NTP is not running. If you want to, check the
error message at the very end of the logle. Then click OK to close the messagebox and click
NEXT to continue.
Figure 191
19. You should now see the nal screen! Click CLOSE to exit the installer.
Figure 192
151
Grid Install (Shared Filesystem)
7.5. Increase CRS Fencing Timeout (Shared Filesystem)
These steps are not necessary for a test or production environment. However they might make your
VMware test cluster just a little more stable and they will provide a good learning opportunity about
Grid Infrastructure.
1. Grid Infrastructure must be running on only one node to change these settings. Shutdown the
clusterware on collabn2 as user root.
[oracle@collabn1 ]$ ssh collabn2
Last login: Wed Mar 30 14:50:49 2011
Set environment by typing 'oenv' - default is instance RAC1.
collabn2:/home/oracle[RAC1]$ su -
Password: racattack
[root@collabn2 bin]# crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability
Services-managed resources
on 'collabn2'
CRS-2673: Attempting to stop 'ora.crsd' on 'collabn2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed
resources on 'collabn2'
...
...
...
CRS-2793: Shutdown of Oracle High Availability Services-managed
resources on 'collabn2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2. Return to node collabn1. As the root user, increase the misscount so that CRS waits 1.5 minutes
before it reboots. (VMware can drag a little on some laptops!)
[root@collabn1 ]# crsctl get css misscount
30
[root@collabn1 ]# crsctl set css misscount 90
Configuration parameter misscount is now set to 90.
3. Increase the disktimeout so that CRS waits 10 minutes for I/O to complete before rebooting.
[root@collabn1 ]# crsctl get css disktimeout
200
[root@collabn1 ]# crsctl set css disktimeout 600
Configuration parameter disktimeout is now set to 600.
4. Restart CRS on the other node.
[root@collabn1 bin]# ssh collabn2
[root@collabn2 bin]# crsctl start crs
152
8. RAC Install
8.1. Install Database Software
1. Login to collabn1 as the oracle user and open a terminal. Run CLUVFY to check that you're
ready to start the DB install. The memory, swap and NTP/time checks may fail but everything
else should succeed.
[oracle@collabn1 ]$ /mnt/cdrom
*
/grid/runcluvfy.sh stage -pre dbinst
-n collabn1,collabn2 -r 11gR2
Performing pre-checks for database installation
Checking node reachability...
Node reachability check passed from node "collabn1"
Checking user equivalence...
User equivalence check passed for user "oracle"
Checking node connectivity...
Checking hosts config file...
Verification of the hosts config file successful
Node connectivity passed for subnet "192.168.78.0" with node(s)
collabn2,collabn1
TCP connectivity check passed for subnet "192.168.78.0"
Node connectivity passed for subnet "172.16.100.0" with node(s)
collabn2,collabn1
TCP connectivity check passed for subnet "172.16.100.0"
Interfaces found on subnet "192.168.78.0" that are likely candidates
for VIP are:
collabn2 eth0:192.168.78.52 eth0:192.168.78.250 eth0:192.168.78.62
collabn1 eth0:192.168.78.51 eth0:192.168.78.61
Interfaces found on subnet "172.16.100.0" that are likely candidates
for a private interconnect are:
collabn2 eth1:172.16.100.52
collabn1 eth1:172.16.100.51
Node connectivity check passed
Total memory check failed
Check failed on nodes:
collabn2,collabn1
Available memory check passed
Swap space check failed
Free disk space check passed for
153
RAC Install
"collabn2:/u01/grid/oracle/product/11.2.0/grid_1,collabn2:/tmp"
Free disk space check passed for
"collabn1:/u01/grid/oracle/product/11.2.0/grid_1,collabn1:/tmp"
User existence check passed for "oracle"
Group existence check passed for "oinstall"
Group existence check passed for "dba"
Membership check for user "oracle" in group "oinstall" [as Primary]
passed
Membership check for user "oracle" in group "dba" passed
Run level check passed
Hard limits check passed for "maximum open file descriptors"
Soft limits check passed for "maximum open file descriptors"
Hard limits check passed for "maximum user processes"
Soft limits check passed for "maximum user processes"
System architecture check passed
Kernel version check passed
Kernel parameter check passed for "semmsl"
Kernel parameter check passed for "semmns"
Kernel parameter check passed for "semopm"
Kernel parameter check passed for "semmni"
Kernel parameter check passed for "shmmax"
Kernel parameter check passed for "shmmni"
Kernel parameter check passed for "shmall"
Kernel parameter check passed for "file-max"
Kernel parameter check passed for "ip_local_port_range"
Kernel parameter check passed for "rmem_default"
Kernel parameter check passed for "rmem_max"
Kernel parameter check passed for "wmem_default"
Kernel parameter check passed for "wmem_max"
Kernel parameter check passed for "aio-max-nr"
Package existence check passed for "make-3.81"
Package existence check passed for "binutils-2.17.50.0.6"
Package existence check passed for "gcc-4.1.2"
Package existence check passed for "libgomp-4.1.2"
Package existence check passed for "libaio-0.3.106"
Package existence check passed for "glibc-2.5-24"
Package existence check passed for "compat-libstdc++-33-3.2.3"
Package existence check passed for "elfutils-libelf-0.125"
Package existence check passed for "elfutils-libelf-devel-0.125"
Package existence check passed for
"elfutils-libelf-devel-static-0.125"
Package existence check passed for "glibc-common-2.5"
Package existence check passed for "glibc-devel-2.5"
Package existence check passed for "glibc-headers-2.5"
Package existence check passed for "kernel-headers-2.6.18"
Package existence check passed for "gcc-c++-4.1.2"
Package existence check passed for "libaio-devel-0.3.106"
Package existence check passed for "libgcc-4.1.2"
Package existence check passed for "libstdc++-4.1.2"
Package existence check passed for "libstdc++-devel-4.1.2"
Package existence check passed for "sysstat-7.0.2"
Package existence check passed for "unixODBC-2.2.11"
Package existence check passed for "unixODBC-devel-2.2.11"
Package existence check passed for "ksh-20060214"
Check for multiple users with UID value 0 passed
Current group ID check passed
Default user file creation mask check passed
Checking CRS integrity...
CRS integrity check passed
Checking Cluster manager integrity...
154
Install Database Software
Checking CSS daemon...
Oracle Cluster Synchronization Services appear to be online.
Cluster manager integrity check passed
Checking if Clusterware is installed on all nodes...
Check of Clusterware install passed
Checking if CTSS Resource is running on all nodes...
CTSS resource check passed
Querying CTSS for time offset on all nodes...
Query of CTSS for time offset passed
Check CTSS state started...
CTSS is in Observer state. Switching over to clock synchronization
checks using NTP
Starting Clock synchronization checks using Network Time
Protocol(NTP)...
NTP Configuration file check started...
NTP Configuration file check passed
Checking daemon liveness...
Liveness check failed for "ntpd"
Check failed on nodes:
collabn2,collabn1
PRVF-5415 : Check to see if NTP daemon is running failed
Clock synchronization check using Network Time Protocol(NTP) failed
PRVF-9652 : Cluster Time Synchronization Services check failed
Checking time zone consistency...
Time zone consistency check passed.
Pre-check for database installation was unsuccessful on all the
nodes.
155
RAC Install
2. Launch the database installer with /mnt/cdrom*/database/runInstaller.
Figure 193
3. On the rst screen, leave the email blank and uncheck the "security update" option. Click NEXT
to continue. Choose YES to verify that you don't want to enter an email address.
Figure 194
156
Install Database Software
4. Choose to Install Database Software Only and click NEXT.
Figure 195
5. Choose Real Application Clusters database installation and select all nodes. Click NEXT to
continue.
Figure 196
157
RAC Install
6. Select the English language and click NEXT.
Figure 197
7. Choose Enterprise Edition install and click NEXT.
Figure 198
158
Install Database Software
8. Conrm that the ORACLE_BASE is /u01/app/oracle and change the ORACLE_HOME to
/u01/app/oracle/product/11.2.0/db_1. Click NEXT to continue.
Figure 199
9. Verify that the OSDBA group is dba and the OSOPER group is oper. Click NEXT to continue.
Figure 200
159
RAC Install
10. The prerequisite checks will execute. A warning will be issued saying that three checks failed:
physical memory, swap size and network time protocol. Click the CHECK BOX to Ignore All,
then click NEXT.
Figure 201
11. SAVE a response le called db.rsp in the oracle user home directory. Then click FINISH to
install the oracle database software.
Figure 202
160
Install Database Software
Figure 203
12. When prompted, open a terminal as the root user and run the root.sh script. Enter /usr/bin as the
local bin directory and overwrite the les which were previously installed by grid infrastructure.
Make sure to run it on BOTH NODES!
Figure 204
161
RAC Install
[oracle@collabn1 ]$ su -
Password: racattack
[root@collabn1 ]# /u01/app/oracle/product/11.2.0/db_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory:
[/usr/local/bin]: /usr/bin
The file "dbhome" already exists in /usr/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/bin ...
The file "oraenv" already exists in /usr/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/bin ...
The file "coraenv" already exists in /usr/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
[root@collabn1 ]# ssh collabn2
root@collabn2's password: racattack
Last login: Tue Apr 15 19:34:33 2008 from 192.168.78.1
[root@collabn2 ]# /u01/app/oracle/product/11.2.0/db_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory:
[/usr/local/bin]: /usr/bin
The file "dbhome" already exists in /usr/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/bin ...
The file "oraenv" already exists in /usr/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/bin ...
The file "coraenv" already exists in /usr/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
162
Install Database Software
13. After running both scripts, return to the installer window and click OK to nish the installation.
You should now see the nal screen! Click CLOSE to exit the installer.
Figure 205
163
9. Create Database
9.1. Create DB
1. ASM Databases Only: Login to a terminal as the oracle user. Use the oenv macro to set your
environment for the SID +ASM1. Then, type asmca to launch ASMCA.
collabn1:/home/oracle[RAC1]$ oenv
SIDs here are: grid +ASM1
ORACLE_SID = [RAC1] ? +ASM1
The Oracle base for
ORACLE_HOME=/u01/grid/oracle/product/11.2.0/grid_1
is /u01/app/oracle
collabn1:/home/oracle[+ASM1]$ asmca
2. ASM Databases Only: Verify that both diskgroups are mounted. If you have jumpstarted or
rebooted, then the BACKUP diskgroup may be dismounted. To mount it, right click then choose
Mount on All Nodes. Click EXIT to close the ASM Conguration Assistant.
Figure 206
165
Create Database
3. Type ". oraenv" to setup the environment. Leave the default SID and enter
/u01/app/oracle/product/11.2.0/db_1 for the ORACLE_HOME. Then type dbca to launch
the Database Conguration Assistant.
Figure 207
4. At the rst prompt, choose Real Application Clusters Database and click NEXT.
Figure 208
166
Create DB
5. Choose to CREATE A DATABASE then click NEXT to continue.
Figure 209
6. Select GENERAL PURPOSE OR TRANSACTION PROCESSING then click NEXT to continue.
Figure 210
167
Create Database
7. Choose Admin-Managed Database, Set the global database name to RAC.vm.ardentperf.com and
select all cluster nodes. Then click NEXT to continue.
Figure 211
8. Do not congure Enterprise Manager (there's probably not enough memory here). Uncheck it
and click the Automatic Maintenance Tasks tab.
Figure 212
168
Create DB
9. Disable the automatic maintenance tasks (they can really tax the CPU on your laptop...) After
unchecking the box, click NEXT to continue.
Figure 213
10. Set all passwords to racattack and click NEXT to continue. Choose YES to continue even
though Oracle doesn't like the password.
Figure 214
11. Choose a Storage Type depending on which track of the RAC Attack lab you're doing.
Oracle ASM Shared Filesystem
169
Create Database
Choose a Storage Type of Automatic Stor-
age Management (ASM).
Figure 215
Choose a Storage Type of Cluster File
System.
Figure 216
12. Congure Oracle Managed Files.
Oracle ASM Shared Filesystem
Choose ORACLE MANAGED FILES and
type +DATA for the database area. Then
click NEXT to continue.
Figure 217
Choose ORACLE MANAGED FILES
and type /u51/oradata for the database area.
Then click NEXT to continue.
Figure 218
13. Congure a Flash Recovery Area.
Oracle ASM Shared Filesystem
Choose to SPECIFY FLASH RECOVERY
AREA and type +BACKUP as the destina-
tion. Increase the size to 3000 MBytes. Do
not enable archiving and choose NEXT to
continue.
Figure 219
Choose to SPECIFY FLASH RECOVERY
AREA and type /u52/oradata as the destina-
tion. Increase the size to 3000 MBytes. Do
not enable archiving and choose NEXT to
continue.
Figure 220
Information
Oracle will automatically create a directory tree in the specied location and it will separate les
by type and by database.
170
Create DB
14. Choose to install the sample schemas. After checking the box, click NEXT to continue.
Figure 221
15. Bump the memory target up to 400MB and do not check Automatic Memory Management. Skip
the other tabs and click NEXT to continue.
Figure 222
171
Create Database
16. Accept the default storage settings and click NEXT to continue.
Figure 223
17. Go ahead and generate scripts (in the default location), but leave Create Database option checked.
the Click FINISH to begin database creation.
Figure 224
172
Create DB
18. Review the summary, then click OK to continue.
Figure 225
19. DBCA will inform you after it generates the scripts. Click OK to continue with database creation.
Figure 226
173
Create Database
Figure 227
20. When database creation is complete a summary window will appear. Click EXIT to close the
installer.
Figure 228
174
Create DB
Figure 229
21. One last thing: edit /etc/oratab on both nodes and replace the DB name with the Instance name.
Also edit the bash_prole on node 2 and set the instance name to RAC2.
[oracle@collabn1 ]$ vi /etc/oratab
RAC1:/u01/app/oracle/product/11.1.0/db_1:N
[oracle@collabn1 ]$ ssh collabn2
[oracle@collabn2 ]$ vi /etc/oratab
RAC2:/u01/app/oracle/product/11.1.0/db_1:N
[oracle@collabn2 ]$ vi /home/oracle/.bash_profile
export ORACLE_SID=RAC2
175
10. Rolling Patches
10.1. Patching Grid and Database Software
10.1.1. Patching Overview
Figure 230
Upgrades to the "base version" are very complicated and always use the full Oracle installer (runIn-
staller). Major new features are only introduced in new base versions.
Patch Sets are also installed with the full Oracle installer. Historically, each patchset was installed
on top of the base version (top row in the illustration) by using runInstaller. However, starting with
11.2.0.2 the patch sets can be installed as a new installation without the base version. It is now
recommended to perform Patch Set upgrades "out-of-place" in this manner. Sometimes new features
are also included with Patch Sets (for example RAT data collection).
PSUs are installed with opatch. They include security updates and important bug xes. They are
released quarterly and always include the latest CPU.
CPUs are installed with opatch. CPUs include only security updates, and are also released quarterly.
They cannot be applied after you have applied any PSU. (Until you upgrade to a new patch set or base
version.)
10.1.2. Support Status and Known Issues
Before performing any installation or upgrade of Oracle, you should always check the Support Status
and Known Issues for the release. Metalink note 161818.1 is always the starting point open this note
and review it. Next, follow the link for 11.2.0.X to metalink note 880782.1 and review that note. Finally,
follow the link to note 880707.1 and review the known issues with Oracle 11.2.0.1 which is the version
we will be using for this lab.
Information
177
Rolling Patches
These notes have been saved as HTML les on the the virtual DVD provided by the instructor. It is
available in your Virtual RAC Nodes at /mnt/cdrom5.
10.1.3. Practice Rolling Application
For this lab, the instructor has provided recent PSUs. PSUs and CPUs are collections of one-off patches.
One-off patches can only be applied to an Oracle database in a rolling manner if they have been certied
for rolling upgrades.
1. Review the installation instructions. We're going to install three patches and you can nd the
README les at these locations:
/mnt/cdrom5/patch/psu6-db-12419378/12419378/README.html
/mnt/cdrom5/patch/psu2-gi-9655006/README.html
/mnt/cdrom5/patch/opatch-6880880/README.txt
2. First we need to update the OPatch utility. Find patch 6880880 on the instructor-provided
CDROM and unzip it directly into both the grid home and the database home. Before unzipping
the le, backup the existing OPatch programs.
$ oenv
SIDs here are: grid +ASM1 RAC1
ORACLE_SID = [RAC1] ? grid
$ cd $ORACLE_HOME
$ tar czvf /gi-opatch-backup_$(date +%Y-%m-%d).tgz OPatch/
...
$ unzip -o /mnt/cdrom
*
/patch/opatch-6880880/p6880880_112000_LINUX.zip
...
$ OPatch/opatch version
Invoking OPatch 11.2.0.1.5
OPatch Version: 11.2.0.1.5
OPatch succeeded.
$ oenv
SIDs here are: grid +ASM1 RAC1
ORACLE_SID = [grid] ? RAC1
$ cd $ORACLE_HOME
$ mv OPatch OPatch.backup
$ unzip /mnt/cdrom
*
/patch/opatch-6880880/p6880880_112000_LINUX.zip
...
$ OPatch/opatch version
Invoking OPatch 11.2.0.1.5
OPatch Version: 11.2.0.1.5
OPatch succeeded.
3. Repeat the previous step on node collabn2.
$ ssh collabn2
... repeat previous step ...
$ exit
178
Patching Grid and Database Software
4. This new version of OPatch requires an "OCM response le" for certain operations. Use the
OCM utility to generate this le. We don't want to congure OCM; leave your username blank
and conrm that "YES" you don't want to enter any account information.
$ $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -output /home/oracle/ocm.rsp
OCM Installation Response Generator 10.3.4.0.0 - Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights
reserved.
Provide your email address to be informed of security issues,
install and
initiate Oracle Configuration Manager. Easier for you if you use
your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: <enter>
You have not provided an email address for notification of security
issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o)
[N]: Y
The OCM configuration response file (/home/oracle/ocm.rsp) was
successfully created.
5. Find the Grid Infrastructure and Database PSUs on the instructor-provided DVD.
$ cd /mnt/cdrom5/patch
$ ls
opatch-6880880 psu2-gi-9655006 psu6-db-12419378
6. We know that these PSUs can be applied in a rolling manner, but verify this.
$ for D in psu
*
/[0-9]
*
; do
echo -n $D:
cd $D
$ORACLE_HOME/OPatch/opatch query -is_rolling_patch | grep rolling
cd ../..
done
psu2-gi-9655006/9654983: Patch is a rolling patch: true
psu2-gi-9655006/9655006: Patch is a rolling patch: true
psu6-db-12419378/12419378: Patch is a rolling patch: true
7. We also know that there won't be any patch conicts (since these are the rst patches we're
installing) but verify this too.
$ oenv
ORACLE_SID = [RAC1] ? grid
[grid]$ cd psu2-gi-9655006
psu2-gi-9655006[grid]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir ./9655006
...
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
179
Rolling Patches
[grid]$ oenv
ORACLE_SID = [RAC1] ? RAC1
[RAC1]$ cd ../psu6-db-12419378/
psu6-db-12419378[RAC1]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir ./12419378
...
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
8. The automated patch application process will automatically shutdown and restart all database
processes on the node. However, we don't want the automatic restart because we are applying
two PSUs (one for grid and one for database). Disable the instance auto-start for node collabn1
and manually shutdown the instance for patch application.
Information
On a production system, all active connections would need to be migrated to the other instance
before doing this (for example, with services).
collabn1$ srvctl disable instance -d rac -i RAC1
collabn1$ srvctl stop instance -d rac -i RAC1
9. We will use automated patch application to apply the grid infrastructure PSU. First use oenv to
enter the grid environment, then switch to the root user and run opatch auto.
Note: any database processes on this node will be automatically shutdown during patching.
When prompted for the OCM response le path, enter /home/oracle/ocm.rsp and press enter.
When prompted about the grid home being shared, type yes to continue.
Warning
Make sure to specify the grid home on the command line so that the patch doesn't nd the database
home and apply itself there in addition.
$ oenv
SIDs here are: grid +ASM1 RAC1
ORACLE_SID = [RAC1] ? grid
The Oracle base for
ORACLE_HOME=/u01/grid/oracle/product/11.2.0/grid_1 is /u01/app/oracle
[grid]$ cd /mnt/cdrom5/patch/psu2-gi-9655006
psu2-gi-9655006[grid]$ su
Password: racattack
psu2-gi-9655006# $ORACLE_HOME/OPatch/opatch auto . -oh $ORACLE_HOME
Executing /usr/bin/perl
/u01/grid/oracle/product/11.2.0/grid_1/OPatch/crs/patch112.pl
-patchdir . -patchn . -oh /u01/grid/oracle/product/11.2.0/grid_1
-paramfile
/u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
opatch auto log file location is /u01/grid/oracle/product/11.2.0/
grid_1/OPatch/crs/../../cfgtoollogs/opatchauto2011-04-01_22-44-08.log
Detected Oracle Clusterware install
Using configuration parameter file:
/u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
180
Patching Grid and Database Software
OPatch is bundled with OCM, Enter the absolute OCM response file
path:
/home/oracle/ocm.rsp
Can't change permissions of ./.: Read-only file system
Unable to determine if /u01/grid/oracle/product/11.2.0/grid_1 is
shared oracle home
Enter 'yes' if this is not a shared home or if the prerequiste
actions are performed to patch this shared home (yes/no): yes
Successfully unlock /u01/grid/oracle/product/11.2.0/grid_1
patch ././9655006 apply successful for home
/u01/grid/oracle/product/11.2.0/grid_1
patch ././9654983 apply successful for home
/u01/grid/oracle/product/11.2.0/grid_1
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9312: Existing ADVM/ACFS installation detected.
ACFS-9314: Removing previous ADVM/ACFS installation.
ACFS-9315: Previous ADVM/ACFS components successfully removed.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies - this may take some time.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-4123: Oracle High Availability Services has been started.
10. Return to the oracle user and nd the Database PSU on the instructor-provided DVD. Use oenv
to enter the database environment, then run opatch apply.
Run OPatch in local mode so that it does not attempt an automatic rolling install across the
entire cluster.
When prompted about OCM, leave your username blank and conrm with "y" that you don't
want to enter any account information.
When prompted whether the local home is ready for patching, type "y" to continue.
# exit
$ cd ../psu6-db-12419378
psu6-db-12419378$ oenv
SIDs here are: grid +ASM1 RAC1
ORACLE_SID = [grid] ? RAC1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
is /u01/app/oracle
psu6-db-12419378[RAC1]$ cd 12419378
12419378[RAC1]$ $ORACLE_HOME/OPatch/opatch apply -local
Invoking OPatch 11.2.0.1.5
Oracle Interim Patch Installer version 11.2.0.1.5
Copyright (c) 2010, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.5
OUI version : 11.2.0.1.0
OUI location : /u01/app/oracle/product/11.2.0/db_1/oui
Log file location : /u01/app/oracle/p
roduct/11.2.0/db_1/cfgtoollogs/opatch/opatch2011-04-02_16-10-50PM.log
181
Rolling Patches
Patch history file: /u01
/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
ApplySession applying interim patch '12419378' to OH
'/u01/app/oracle/product/11.2.0/db_1'
Running prerequisite checks...
Patch 12419378: Optional component(s) missing : [ oracle.client,
11.2.0.1.0 ]
Provide your email address to be informed of security issues,
install and
initiate Oracle Configuration Manager. Easier for you if you use
your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: <enter>
You have not provided an email address for notification of security
issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o)
[N]: Y
You selected -local option, hence OPatch will patch the local system
only.
Please shutdown Oracle instances running out of this ORACLE_HOME on
the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the
Oracle Home
Backing up files affected by the patch '12419378' for restore. This
might take a while...
Backing up files affected by the patch '12419378' for rollback. This
might take a while...
Execution of 'sh
/mnt/cdrom5/patch/psu6-db-12419378/12419378/custom/scripts/pre -apply
12419378 ':
Return Code = 0
Patching component oracle.rdbms.rsf, 11.2.0.1.0...
...
...
...
...
Running make for target itnslsnr
ApplySession adding interim patch '12419378' to inventory
Verifying the update...
Inventory check OK: Patch ID 12419378 is registered in Oracle Home
inventory with proper meta-data.
Files check OK: Files from Patch ID 12419378 are present in Oracle
Home.
The local system has been patched and can be restarted.
OPatch succeeded.
182
Patching Grid and Database Software
11. Enable and start the Oracle database instance on node collabn1. After the instance is running,
stop and disable the instance on node collabn2. There should be no point at which the database is
not running.
$ srvctl enable instance -d rac -i RAC1
$ srvctl start instance -d rac -i RAC1
Information
On a production system, all active connections would need to be migrated to the other instance at
this point (for example, with services).
$ srvctl disable instance -d rac -i RAC2
$ srvctl stop instance -d rac -i RAC2
12. Use automated patch application to apply the grid infrastructure PSU to collabn2.
Note: any database processes on this node will be automatically shutdown during patching.
Copy the OCM response le (/home/oracle/ocm.rsp) to collabn2.
When prompted about the grid home being shared, type yes to continue.
Warning
Make sure to specify the grid home on the command line so that the patch doesn't nd the database
home and apply itself there in addition.
$ scp /home/oracle/ocm.rsp collabn2:/home/oracle/
$ ssh collabn2
$ oenv
SIDs here are: grid +ASM2 RAC2
ORACLE_SID = [RAC2] ? grid
The Oracle base for
ORACLE_HOME=/u01/grid/oracle/product/11.2.0/grid_1 is /u01/app/oracle
[grid]$ cd /mnt/cdrom5/patch/psu2-gi-9655006
psu2-gi-9655006[grid]$ su
Password: racattack
psu2-gi-9655006# $ORACLE_HOME/OPatch/opatch auto . -oh $ORACLE_HOME
Executing /usr/bin/perl
/u01/grid/oracle/product/11.2.0/grid_1/OPatch/crs/patch112.pl
-patchdir . -patchn . -oh /u01/grid/oracle/product/11.2.0/grid_1
-paramfile
/u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
opatch auto log file location is /u01/grid/oracle/product/11.2.0/
grid_1/OPatch/crs/../../cfgtoollogs/opatchauto2011-04-02_16-42-52.log
Detected Oracle Clusterware install
Using configuration parameter file:
/u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
OPatch is bundled with OCM, Enter the absolute OCM response file
path:
/home/oracle/ocm.rsp
Can't change permissions of ./.: Read-only file system
Unable to determine if /u01/grid/oracle/product/11.2.0/grid_1 is
183
Rolling Patches
shared oracle home
Enter 'yes' if this is not a shared home or if the prerequiste
actions are performed to patch this shared home (yes/no):yes
Successfully unlock /u01/grid/oracle/product/11.2.0/grid_1
patch ././9655006 apply successful for home
/u01/grid/oracle/product/11.2.0/grid_1
patch ././9654983 apply successful for home
/u01/grid/oracle/product/11.2.0/grid_1
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9312: Existing ADVM/ACFS installation detected.
ACFS-9314: Removing previous ADVM/ACFS installation.
ACFS-9315: Previous ADVM/ACFS components successfully removed.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies - this may take some time.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-4123: Oracle High Availability Services has been started.
13. Return to the oracle user and nd the Database PSU on the instructor-provided DVD. Use oenv
to enter the database environment, then run opatch apply.
Run OPatch in local mode so that it does not attempt an automatic rolling install across the
entire cluster.
When prompted about OCM, leave your username blank and conrm with "y" that you don't
want to enter any account information.
When prompted whether the local home is ready for patching, type "y" to continue.
# exit
$ cd ../psu6-db-12419378
psu6-db-12419378$ oenv
SIDs here are: grid +ASM2 RAC2
ORACLE_SID = [grid] ? RAC2
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
is /u01/app/oracle
psu6-db-12419378[RAC2]$ cd 12419378
12419378[RAC2]$ $ORACLE_HOME/OPatch/opatch apply -local
Invoking OPatch 11.2.0.1.5
Oracle Interim Patch Installer version 11.2.0.1.5
Copyright (c) 2010, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.5
OUI version : 11.2.0.1.0
OUI location : /u01/app/oracle/product/11.2.0/db_1/oui
Log file location : /u01/app/oracle/p
roduct/11.2.0/db_1/cfgtoollogs/opatch/opatch2011-04-02_17-11-00PM.log
Patch history file: /u01
/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
ApplySession applying interim patch '12419378' to OH
'/u01/app/oracle/product/11.2.0/db_1'
184
Patching Grid and Database Software
Running prerequisite checks...
Patch 12419378: Optional component(s) missing : [ oracle.client,
11.2.0.1.0 ]
Provide your email address to be informed of security issues,
install and
initiate Oracle Configuration Manager. Easier for you if you use
your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: <enter>
You have not provided an email address for notification of security
issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o)
[N]: Y
You selected -local option, hence OPatch will patch the local system
only.
Please shutdown Oracle instances running out of this ORACLE_HOME on
the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the
Oracle Home
Backing up files affected by the patch '12419378' for restore. This
might take a while...
Backing up files affected by the patch '12419378' for rollback. This
might take a while...
Execution of 'sh
/mnt/cdrom5/patch/psu6-db-12419378/12419378/custom/scripts/pre -apply
12419378 ':
Return Code = 0
Patching component oracle.rdbms.rsf, 11.2.0.1.0...
...
...
...
...
Running make for target itnslsnr
ApplySession adding interim patch '12419378' to inventory
Verifying the update...
Inventory check OK: Patch ID 12419378 is registered in Oracle Home
inventory with proper meta-data.
Files check OK: Files from Patch ID 12419378 are present in Oracle
Home.
The local system has been patched and can be restarted.
OPatch succeeded.
14. Enable and restart the Oracle database instance on node collabn2.
$ srvctl enable instance -d rac -i RAC2
$ srvctl start instance -d rac -i RAC2
185
Rolling Patches
$ srvctl status database -d rac
Instance RAC1 is running on node collabn1
Instance RAC2 is running on node collabn2
15. Run the catbundle.sql script.
$ ss
SQL> @?/rdbms/admin/catbundle.sql psu apply
$ less /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/catbundle/ catbundle_PSU_-
RAC_APPLY_2011Apr02_17_28_19.log
16. Optional: if you want more practice working with patches, then try rolling back the database
PSU and then try applying it in automated rolling mode (without local ag) or in the minimum
downtime mode.
186
Part II.
Exploring RAC
187
11. Clusterware Testing
11.1. Clusterware and Fencing
The goal of this lab is to demonstrate Oracle Clusterwares fencing ability by forcing a conguration
that will trigger Oracle Clusterwares built-in fencing features. With Oracle Clusterware, fencing is
handled at the node level by rebooting the non-responsive or failed node. This is similar to the as Shoot
The Other Machine In The Head (STOMITH) algorithm, but its really a suicide instead of affecting
the other machine. There are many good sources for more information online. For more information, I
highly recommend reading this blog posting from Kevin Closson (now with Oracle):
http://kevinclosson.wordpress.com/2007/08/17/oracle-clusterware-and-fencingagain/
1. Start with a normal, running cluster with the database instances up and running.
2. Monitor the logles for clusterware on each node. On each node, start a new window and run the
following command:
[oracle@<node_name> ]$ tail -f \
> /u01/grid/oracle/product/11.2.0/grid_1/log/hostname -s/crsd/crsd.log
[oracle@<node_name> ]$ tail -f \
> /u01/grid/oracle/product/11.2.0/grid_1/log/hostname -s/cssd/ocssd.log
3. We will simulate unplugging the network interface by taking one of the private network
interfaces down. On the collabn2 node, take the private network interface down by running the
following command (as the root user):
[root@collabn2 ]# ifconfig eth1 down
189
Clusterware Testing
Alternatively, you can also simulate this by physically taking the HostOnly network adapter
ofine in VMware.
Figure 231
Figure 232
4. Following this command, watch the logles you began monitoring in step 2 above. You should
see errors in those logles and eventually (could take a minute or two, literally) you will observe
one node reboot itself.
If you used ifcong to trigger a failure, then the node will rejoin the cluster and the instance
should start automatically.
If you used VMware to trigger a failure then the node will not rejoin the cluster.
Which le has the error messages that indicate why the node is not rejoining the cluster?
Is the node that reboots always the same as the node with the failure? Why or why not?
11.2. Clusterware Callouts
The goal of this lab is to demonstrate Oracle Fast Application Notication (FAN) Callouts. In versions
prior to 11g, these were also known as Oracle Clusterware Callouts.
190
Clusterware Callouts
This feature is a relatively little-known capability for Oracle Clusterware to re a script (or a whole
directory full of them) to perform whatever tasks you may want performed when a cluster-wide event
happens.
For more information, consult the documentation here: http://download.oracle.com/docs/
cd/B28359_01/rac.111/b28254/hafeats.htm#BABGCEBF
For this exercise, well congure some FAN callout scripts on each node and then trigger various cluster
events to see how each one triggers the callout script.
1. Start with a normal, running cluster with both nodes up and running.
2. From a shell prompt (logged in as oracle) on each server, navigate to
/u01/grid/oracle/product/11.2.0/grid_1/racg/usrco. Create le there called callout1.sh us-
ing vi (or your favorite editor). The contents of the le should be this:
#!/bin/ksh
umask 022
FAN_LOGFILE=/tmp/hostname_uptime.log
echo $
*
"reported="date >> $FAN_LOGFILE &
Warning
Note the use of backticks around the hostname and date commands.
3. Make sure that the permissions on the le are set to 755 using the following command:
[oracle@<node_name> ]$ chmod 755 \
> /u01/grid/oracle/product/11.2.0/grid_1/racg/usrcocallout1.sh
4. Monitor the logles for clusterware on each node. On each node, start a new window and run the
following command:
[oracle@<node_name> ]$ tail -f \
/u01/grid/oracle/product/11.2.0/grid_1/log/hostname -s/crsd/crsd.log
5. Next, we need to trigger an event that will cause the callout to re. One such event is node
shutdown. Shutdown the clusterware on node collabn2.
[root@collabn2 ]# crsctl stop crs
Stopping resources.
This could take several minutes.
Successfully stopped Oracle Clusterware resources
Stopping Cluster Synchronization Services.
Shutting down the Cluster Synchronization Services daemon.
Shutdown request successfully issued.
6. Following this command, watch the logles you began monitoring in step 2 above. Because we
set long timeouts on our test cluster, you might have to wait for a few minutes before you see
anything.
191
Clusterware Testing
You should eventually observe entries noting that the node has failed and shortly following that,
you should observe an entry placed in the /tmp/<hostname>_uptime.log le indicating that the
node is down.
Note which members run the clusterware callout script. (A surviving member could run
commands to notify clients and/or application servers that one of the cluster nodes has died.)
You should see these messages in the /tmp/*.log les:
NODE VERSION=1.0 host=collabn2 incarn=0 status=nodedown
reason=public_nw_down timestamp=30-Aug-2009 01:56:12 reported=Sun Aug
30 01:56:13 CDT 2009
NODE VERSION=1.0 host=collabn2 incarn=147028525 status=nodedown
reason=member_leave timestamp=30-Aug-2009 01:57:19 reported=Sun Aug
30 01:57:20 CDT 2009
7. Restart the clusterware. Is there a node up event?
[root@collabn2 bin]# crsctl start crs
8. Try powering off one of the virtual machines is there an difference from the previous test? What
if you disable a linux network interface or VMware network card?
9. You may conduct more testing, if you wish. Another interesting event is a database instance
going down unexpectedly. Come back to this lab after installing a database to test that situation.
[oracle@collabn2 ]$sqlplus "/ as sysdba"
SQL
*
Plus: Release 11.1.0.6.0 - Production on Fri Aug 1 14:49:29 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 -
Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> shutdown abort;
ORACLE instance shut down.
SQL>
INSTANCE VERSION=1.0 service=RAC.vm.ardentperf.com database=RAC
instance=RAC2 host=collabn2 status=down reason=user
timestamp=01-Aug-2008 12:34:02 reported=Fri Aug 1 12:34:03 CDT 2008
Information
One popular use for clusterware callouts is to notify administrators (possibly via email) that a
cluster event has occurred. You may use the arguments to the script (youll see the arguments in
the logle weve created) to conditionally perform notication as well. For example, you may not
want to notify anyone unless a node crashes unexpectedly. By testing some of these arguments,
you may be able to send notications only when desired.
192
12. Services, Failover and Load Balancing
12.1. Install Instant Client
In order to test failover it would be best to connect from a client outside the cluster, so we'll start by
downloading and installing Oracle's Basic Instant Client (English-only) and the Instant Client SQLPlus
package.
1. Login to the node collabn1 as user oracle and open a connection to the database as SYSDBA
and unlock the SH user account. Also grant DBA access.
SQL> alter user sh identified by sh account unlock;
User altered.
SQL> grant dba to sh;
Grant succeeded.
2. Download Oracle's Basic (English-only) Instant Client and Oracle's Instant Client SQLPlus
package. The lab instructor may have made them available, or they can also be downloaded from
Oracle's website here:
http://www.oracle.com/technetwork/topics/winsoft-085727.html
The two les you need are:
instantclient-basiclite-*.zip
instantclient-sqlplus-*.zip
193
Services, Failover and Load Balancing
3. Each archive contains a folder named "instantclient_11_2". Extract this folder (from both archives)
into C:\. (In Explorer you can drag-and-drop or you can choose "Extract All" from the File menu.)
Figure 233
4. Edit c:\windows\system32\drivers\etc\hosts and add IP addresses for the RAC nodes.
Information
Your database connections won't work without this - you can't just create a tnsnames that uses IP
addresses. Try it out by doing step 4 a few times in a row before this step. Does step 4 sometimes
just hang? Do you know why? We'll explore it more later...
192.168.78.250 collab-scan.vm.ardentperf.com collab-scan
192.168.78.61 collabn1-vip.vm.ardentperf.com collabn1-vip
192.168.78.62 collabn2-vip.vm.ardentperf.com collabn2-vip
192.168.78.51 collabn1.vm.ardentperf.com collabn1
192.168.78.52 collabn2.vm.ardentperf.com collabn2
194
Install Instant Client
Figure 234
5. Test your Instant Client installation by connecting to the database.
C:\instantclient_11_2> sqlplus
sh/sh@//collab-scan/RAC.vm.ardentperf.com
Figure 235
6. Create a TNSNAMES les and copy the RAC, RAC1 and RAC2 entries from either cluster
database node.
C:\instantclient_11_2> notepad C:\instantclient_11_2\tnsnames.ora
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = collab-scan)(PORT = 1521))
(CONNECT_DATA =
195
Services, Failover and Load Balancing
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.vm.ardentperf.com)
)
)
RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = collabn-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.vm.ardentperf.com)
(INSTANCE_NAME = RAC2)
)
)
RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = collabn-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.vm.ardentperf.com)
(INSTANCE_NAME = RAC1)
)
)
7. Test your TNSNAMES by setting the TNS_ADMINenvironment variable and running SQLPLUS.
C:\instantclient_11_2>set TNS_ADMIN=c:\instantclient_11_2
C:\instantclient_11_2>sqlplus sh/sh@RAC
Figure 236
12.2. Service Failover
1. Login to collabn1 as the oracle user. Create a new service svctest with RAC1 as a preferred
instance and RAC2 as an available instance. This means that it will normally run on the RAC1
instance but will failover to the RAC2 instance if RAC1 becomes unavailable.
196
Service Failover
collabn1:/home/oracle[RAC1]$ srvctl add service -d RAC
-s svctest -r RAC1 -a RAC2 -P BASIC
collabn1:/home/oracle[RAC1]$ srvctl start service -d RAC
-s svctest
2. Examine where the service is running by checking lsnrctl on both nodes and looking at the
SERVICE_NAMES init parameter on both nodes.
Warning
You should never directly change the SERVICE_NAMES init parameter on a RAC database!! This
parameter is maintained automatically by the clusterware.
collabn1:/home/oracle[RAC1]$ srvctl status service -d RAC -s svctest
Service svctest is running on instance(s) RAC1
collabn1:/home/oracle[RAC1]$ lsnrctl services
Service "svctest.vm.ardentperf.com" has 1 instance(s).
Instance "RAC1", status READY, has 2 handler(s) for this
service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=collabn1.vm.ardentperf.com)(PORT=1521))
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
collabn1:/home/oracle[RAC1]$ ssh collabn2
Last login: Sun Aug 3 13:13:16 2008 from collabn1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
is /u01/app/oracle
Set environment by typing 'oenv' - default is instance RAC1.
collabn2:/home/oracle[RAC2]$ lsnrctl services
collabn2:/home/oracle[RAC2]$ lsnrctl services
Service "svctest.vm.ardentperf.com" has 1 instance(s).
Instance "RAC1", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=collabn1.vm.ardentperf.com)(PORT=1521))
SQL> col value format a60
SQL> select inst_id, value from gv$parameter where NAME='service_names';
INST_ID VALUE
----------
------------------------------------------------------------
1 svctest, RAC.vm.ardentperf.com
2 RAC.vm.ardentperf.com
3. Use SHUTDOWN ABORT to kill the instance where service svctest is running.
SQL> show user
USER is "SYS"
197
Services, Failover and Load Balancing
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RAC1
SQL> shutdown abort;
ORACLE instance shut down.
SQL>
4. Wait a few moments and then repeat step 2. What has happened?
collabn1:/home/oracle[RAC1]$ srvctl status service -d RAC -s svctest
5. Restart the instance that you killed.
Information
This does not initiate any instance recovery at all. Do you know why?
collabn1:/home/oracle[RAC1]$ srvctl status database -d RAC
Instance RAC1 is not running on node collabn1
Instance RAC2 is running on node collabn2
collabn1:/home/oracle[RAC1]$ srvctl start instance -d RAC -i RAC1
collabn1:/home/oracle[RAC1]$ srvctl status database -d RAC
Instance RAC1 is running on node collabn1
Instance RAC2 is running on node collabn2
collabn1:/home/oracle[RAC1]$
6. Repeat step 2. Where is the service running now?
collabn1:/home/oracle[RAC1]$ srvctl status service -d RAC -s svctest
7. Manually failover the service. Conrm where it is now running. Note that this does not
disconnect any current sessions
collabn1:/home/oracle[RAC1]$ srvctl relocate service -d RAC -s svctest -i RAC2 -t
RAC1
collabn1:/home/oracle[RAC1]$ srvctl status service -d RAC -s svctest
12.3. Connection Failover
IMPORTANT NOTE:This lab was written for Oracle 11gR1 and the information here is crucial when
working with this and older versions. It will demonstrate how failover works and the importance of
using proper addresses in TNSNAMES. However, starting with 11gR2 the node VIPs should not be used
to connect to the database the SCAN VIP should always be used instead. The 11gR2 client has this
same failover functionality built-in for multiple SCAN VIPs returned on a single DNS entry.
198
Connection Failover
1. On your local computer edit the TNSNAMES.ORA le used by the Instance Client. Add two
entries called CFTEST and CFTEST-NOVIP which connect to the RAC service with no load
balancing. Explicitly enable connection failover even though it is already enabled by default
anyway. Don't use the VIP's for the second entry (this is wrong but we'll test it to see what
happens).
C:\instantclient_11_2> notepad c:\instantclient_11_2\tnsnames.ora
CFTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = collabn1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = collabn2-vip)(PORT = 1521))
(LOAD_BALANCE = no)
(FAILOVER = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.vm.ardentperf.com)
)
)
CFTEST-NOVIP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = collabn1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = collabn2)(PORT = 1521))
(LOAD_BALANCE = no)
(FAILOVER = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.vm.ardentperf.com)
)
)
2. On collabn1 check the number of established connections from the listener to the RAC service.
Connect from Windows to CFTEST and CFTEST-NOVIP several times and then check the lsnrctl
statistics again. All connections from the Windows machine are attaching to listener on collabn1
but this listener is spreading the connections between both instances.
First look at the number of established connections on node 1. It's ok if they're not all zero.
collabn1:/home/oracle[RAC1]$ lsnrctl services
Service "RAC.vm.ardentperf.com" has 2 instance(s).
Instance "RAC1", status READY, has 2 handler(s) for this
service...
Handler(s):
"DEDICATED" established:0refused:0 state:ready
LOCAL SERVER
"DEDICATED" established:0refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=collabn1.vm.ardentperf.com)(PORT=1521))
Instance "RAC2", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=collabn2.vm.ardentperf.com)(PORT=1521))
199
Services, Failover and Load Balancing
Second, connect to the database several times in a row and use both service names. You can exit
each session after you check how long it takes to connect. All of the sessions should connect
quickly. Count the number of times you connect.
C:\instantclient_11_2> sqlplus sh/sh@CFTEST
C:\instantclient_11_2> sqlplus sh/sh@CFTEST
C:\instantclient_11_2> sqlplus sh/sh@CFTEST-NOVIP
C:\instantclient_11_2> sqlplus sh/sh@CFTEST-NOVIP
C:\instantclient_11_2> sqlplus sh/sh@CFTEST
C:\instantclient_11_2> sqlplus sh/sh@CFTEST-NOVIP
Third, check the listener connections on node 1 again. Make sure that the total number of
established connections shows an increase by at least the same number of sessions that you
connected. (That is, conrm that all of your sessions connected to this node.) There might be
more connections; that's ok.
Also, notice how the listener is distributing connections to both instances - even though our client
is only connecting to the listener on one node. It doesn't matter how many connections go to each
instance; it's ok of you don't see 3 and 3.
collabn1:/home/oracle[RAC1]$ lsnrctl services
Service "RAC.vm.ardentperf.com" has 2 instance(s).
Instance "RAC1", status READY, has 2 handler(s) for this
service...
Handler(s):
"DEDICATED" established:3refused:0 state:ready
LOCAL SERVER
"DEDICATED" established:0refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=collabn1.vm.ardentperf.com)(PORT=1521))
Instance "RAC2", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED" established:3 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=collabn2.vm.ardentperf.com)(PORT=1521))
200
Connection Failover
3. In the VMware Console, make sure that you have opened the node collabn1 which you are
connecting to from Windows. Simulate a complete node failure by choosing Power Off from the
Virtual Machine menu.
Figure 237
4. Wait about a minute (so that the cluster can detect the failed node). Then, from Windows, connect
to the CFTEST and CFTEST-VIP services again. What happens when you use the NOVIP
connection?
C:\instantclient_11_2> sqlplus sh/sh@CFTEST
C:\instantclient_11_2> sqlplus sh/sh@CFTEST
C:\instantclient_11_2> sqlplus sh/sh@CFTEST-NOVIP
C:\instantclient_11_2> sqlplus sh/sh@CFTEST-NOVIP
C:\instantclient_11_2> sqlplus sh/sh@CFTEST
C:\instantclient_11_2> sqlplus sh/sh@CFTEST-NOVIP
Information
The purpose of this lab is to demonstrate why you should always use VIP connections!
201
Services, Failover and Load Balancing
12.4. Runtime Failover
1. Power on collabn1 from the VMware Console. After it has started, login as the oracle user and
failback the svctest service which we created earlier in this lab.
Figure 238
[root@collabn1 ]# srvctl status database -d RAC
Instance RAC1 is running on node collabn1
Instance RAC2 is running on node collabn2
collabn1:/home/oracle[RAC1]$ srvctl status service -d RAC -s svctest
Service svctest is running on instance(s) RAC2
collabn1:/home/oracle[RAC1]$ srvctl relocate service -d RAC -s svctest -i RAC2 -t
RAC1
collabn1:/home/oracle[RAC1]$ srvctl status service -d RAC -s svctest
Service svctest is running on instance(s) RAC1
2. On your local computer edit the TNSNAMES.ORA le used by the Instance Client. Add
a new entry called SVCTEST which connects to the svctest service and make sure that the
connection works. Also check your TAF settings after connecting. (Side note: we did not
congure this service with a domain name, but you can't connect to it unless you specify one in
the TNSNAMES entry. Try it. Where did this domain name come from?)
C:\instantclient_11_2> notepad c:\instantclient_11_2\tnsnames.ora
SVCTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = collab-scan)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = svctest.vm.ardentperf.com)
)
)
SVCTEST-NOVIP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = collabn1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = collabn2)(PORT = 1521))
202
Runtime Failover
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = svctest.vm.ardentperf.com)
)
)
C:\instantclient_11_2> sqlplus sh/sh@svctest
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RAC1
SQL> col service_name format a20
SQL> col username format a10
SQL> select username, service_name, failover_method, failover_type
2 from v$session where sid=(select max(sid) from v$mystat);
USERNAME SERVICE_NAME FAILOVER_M FAILOVER_TYPE
---------- -------------------- ---------- -------------
SH svctest NONE NONE
3. From your Windows SQLPlus session, update the server-side TAF (Transparent Application
Failover) settings for the svctest service.
begin
dbms_service.modify_service(
service_name=>'svctest',
failover_type=>dbms_service.failover_type_select,
failover_method=>dbms_service.failover_method_basic,
failover_delay=>5,
failover_retries=>60
);
end;
/
PL/SQL procedure successfully completed.
4. Reconnect and check your session's TAF settings again.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release
11.1.0.6.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
C:\instantclient_11_2> sqlplus sh/sh@svctest
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RAC1
SQL> col service_name format a20
SQL> col username format a10
203
Services, Failover and Load Balancing
SQL> select username, service_name, failover_method, failover_type
2 from v$session where sid=(select max(sid) from v$mystat);
USERNAME SERVICE_NAME FAILOVER_M FAILOVER_TYPE
---------- -------------------- ---------- -------------
SH svctest BASIC SELECT
5. Simultaneously open a second sqlplus session connected to the NOVIP service.
C:\> cd \instantclient_11_2
C:\instantclient_11_2> set TNS_ADMIN=c:\instantclient_11_2
C:\instantclient_11_2> sqlplus sh/sh@svctest-novip
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RAC1
SQL> col service_name format a20
SQL> col username format a10
SQL> select username, service_name, failover_method, failover_type
2 from v$session where sid=(select max(sid) from v$mystat);
USERNAME SERVICE_NAME FAILOVER_M FAILOVER_TYPE
---------- -------------------- ---------- -------------
SH svctest BASIC SELECT
6. Start a long-running query in both queries. While the query is running, Power Down the node
that they are connected to. What happens to each session?
select c.cust_last_name, p.prod_name, s.quantity_sold
from products p, sales s, customers c
where p.prod_id = s.prod_id and c.cust_id = s.cust_id;
12.5. Client Load Balancing
Note: This lab was written for 11.1 and does not show the same behavior in 11.2 - it needs to be
updated!
--
204
Client Load Balancing
1. Power on both nodes from the VMware Console.
Figure 239
[root@collabn1 ]# srvctl status database -d RAC
Instance RAC1 is running on node collabn1
Instance RAC2 is running on node collabn2
2. Open a SQLPlus session on the database and conrm that there are no sessions for the SH user.
SQL> select inst_id, count(
*
) from gv$session where username='SH' group by inst_-
id;
no rows selected
3. Disable server-side load balancing on both instances by clearing the REMOTE_LISTENER
init param and re-registering. Before registering with the listeners, restart them to reset the
connection statistics.
SQL> alter system set remote_listener=;
System altered.
collabn1:/home/oracle[RAC1]$ lsnrctl stop
collabn1:/home/oracle[RAC1]$ lsnrctl start
SQL> -- instance RAC1
SQL> alter system register;
System altered.
collabn1:/home/oracle[RAC1]$ lsnrctl services
Service "RAC.vm.ardentperf.com" has 1 instance(s).
Instance "RAC1", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
205
Services, Failover and Load Balancing
collabn2:/home/oracle[RAC2]$ lsnrctl stop
collabn2:/home/oracle[RAC2]$ lsnrctl start
SQL> -- instance RAC2
SQL> alter system register;
System altered.
collabn2:/home/oracle[RAC2]$ lsnrctl services
Service "RAC.vm.ardentperf.com" has 1 instance(s).
Instance "RAC2", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
4. In your other connected SQLPlus session, keep an eye on the balance of connections. At the
same time, open a new shell session and run this script which will open 160 connections to the
database.
a=160; while [ $a -gt 0 ]; do
sqlplus sh/sh@RAC &
a=$((a-1))
done
How were the connections distributed between the database instances during client-side load
balancing?
Information
Note: In 11.2 these connections are load balanced across the SCAN listeners instead of the RAC
nodes.
5. Terminate all of the sqlplus sessions by running these two commands. After you run the second
command, press <Ctrl-C> after you start seeing the message "no more job".
killall sqlplus
while true; do fg; done
<Ctrl-C>
12.6. Server Load Balancing
1. Open a SQLPlus session on the database and conrm that there are no sessions for the SH user.
SQL> select inst_id, count(
*
) from gv$session
where username='SH' group by inst_id;
no rows selected
206
Server Load Balancing
If there are any sessions, you can kill them with the output of this SQL:
select 'alter system disconnect session '''|| sid||','||serial#||''' immediate;'
from v$session where username='SH';
2. Re-enable server-side load balancing on both instances by setting the REMOTE_LISTENER init
parameter back to its default (collab-scan:1521) and re-registering. Before registering with the
listeners, restart them to reset the connection statistics.
SQL> alter system set remote_listener='collab-scan:1521';
System altered.
collabn1:/home/oracle[RAC1]$ lsnrctl stop
collabn1:/home/oracle[RAC1]$ lsnrctl start
collabn2:/home/oracle[RAC2]$ lsnrctl stop
collabn2:/home/oracle[RAC2]$ lsnrctl start
Why is it true that you only need to run the "alter system" command once, but you need to run the
lsnrctl command on both nodes?
SQL> -- instance RAC1
SQL> alter system register;
System altered.
collabn1:/home/oracle[RAC1]$ lsnrctl services
Service "RAC.vm.ardentperf.com" has 1 instance(s).
Instance "RAC1", status READY, has 2 handler(s) for this
service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=collabn1.vm.ardentperf.com)(PORT=1521))
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Instance "RAC2", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=collabn2.vm.ardentperf.com)(PORT=1521))
3. Edit the TNSNAMES.ORA le on the server you're connected to. Add an entry called LBTEST
that connects to the RAC service - but only uses one listener.
[root@collabn1 ]# vi $ORACLE_HOME/network/admin/tnsnames.ora
LBTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = collab-scan)(PORT = 1521))
(LOAD_BALANCE = no)
(CONNECT_DATA =
207
Services, Failover and Load Balancing
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.vm.ardentperf.com)
)
)
4. In your other connected SQLPlus session, keep an eye on the balance of connections. At the
same time, open a new shell session and run this script which will open 160 connections to the
database - but this time it will use the LBTEST connection.
a=160; while [ $a -gt 0 ]; do
sqlplus sh/sh@LBTEST &
a=$((a-1))
done
How were the connections distributed between the database instances during server-side load
balancing?
5. Terminate all of the sqlplus sessions by running these two commands. After you run the second
command, press <Ctrl-C> after you start seeing the message "no more job".
killall sqlplus
while true; do fg; done
<Ctrl-C>
208
13. RAC SQL and PLSQL
13.1. Install Runstats
1. Connect to the database as SYSDBA.
2. First, install the DBMS_LOCK package by running ?/rdbms/admin/dbmslock.sql
SQL> @?/rdbms/admin/dbmslock.sql
Package created.
Synonym created.
Grant succeeded.
3. Tom Kytes runstats package is available from http://asktom.oracle.com/pls/
apex/ASKTOM.download_file?p_file=6551378329289980701. First, create the
run_stats global temporary table:
create global temporary table run_stats
( runid varchar2(15),
name varchar2(80),
value int )
on commit preserve rows;
4. Next, create the stats view.
create or replace view stats
as select 'STAT...' || a.name name, b.value
from v$statname a, v$mystat b
where a.statistic# = b.statistic#
union all
select 'LATCH.' || name, gets
from v$latch
union all
select 'STAT...Elapsed Time', hsecs from v$timer;
5. Finally, create the runstats package itself:
create or replace package runstats_pkg
as
procedure rs_start;
procedure rs_middle;
procedure rs_stop( p_difference_threshold in number default 0 );
end;
209
RAC SQL and PLSQL
/
create or replace package body runstats_pkg
as
g_start number;
g_run1 number;
g_run2 number;
procedure rs_start
is
begin
delete from run_stats;
insert into run_stats
select 'before', stats.
*
from stats;
g_start := dbms_utility.get_time;
end;
procedure rs_middle
is
begin
g_run1 := (dbms_utility.get_time-g_start);
insert into run_stats
select 'after 1', stats.
*
from stats;
g_start := dbms_utility.get_time;
end;
procedure rs_stop(p_difference_threshold in number default 0)
is
begin
g_run2 := (dbms_utility.get_time-g_start);
dbms_output.put_line
( 'Run1 ran in ' || g_run1 || ' hsecs' );
dbms_output.put_line
( 'Run2 ran in ' || g_run2 || ' hsecs' );
dbms_output.put_line
( 'run 1 ran in ' || round(g_run1/g_run2
*
100,2) ||
'% of the time' );
dbms_output.put_line( chr(9) );
insert into run_stats
select 'after 2', stats.
*
from stats;
dbms_output.put_line
( rpad( 'Name', 30 ) || lpad( 'Run1', 12 ) ||
lpad( 'Run2', 12 ) || lpad( 'Diff', 12 ) );
for x in
( select rpad( a.name, 30 ) ||
to_char( b.value-a.value, '999,999,999' ) ||
to_char( c.value-b.value, '999,999,999' ) ||
to_char( ( (c.value-b.value)-(b.value-a.value)),
'999,999,999' ) data
from run_stats a, run_stats b, run_stats c
where a.name = b.name
and b.name = c.name
and a.runid = 'before'
and b.runid = 'after 1'
210
Sequence Test
and c.runid = 'after 2'
-- and (c.value-a.value) > 0
and abs( (c.value-b.value) - (b.value-a.value) )
> p_difference_threshold
order by abs( (c.value-b.value)-(b.value-a.value))
) loop
dbms_output.put_line( x.data );
end loop;
dbms_output.put_line( chr(9) );
dbms_output.put_line
( 'Run1 latches total versus runs -- difference and pct' );
dbms_output.put_line
( lpad( 'Run1', 12 ) || lpad( 'Run2', 12 ) ||
lpad( 'Diff', 12 ) || lpad( 'Pct', 10 ) );
for x in
( select to_char( run1, '999,999,999' ) ||
to_char( run2, '999,999,999' ) ||
to_char( diff, '999,999,999' ) ||
to_char( round( run1/run2
*
100,2 ), '99,999.99' ) || '%'
data
from ( select sum(b.value-a.value) run1,
sum(c.value-b.value) run2,
sum( (c.value-b.value)-(b.value-a.value)) diff
from run_stats a, run_stats b, run_stats c
where a.name = b.name
and b.name = c.name
and a.runid = 'before'
and b.runid = 'after 1'
and c.runid = 'after 2'
and a.name like 'LATCH%'
)
) loop
dbms_output.put_line( x.data );
end loop;
end;
end;
/
13.2. Sequence Test
The rst test we will perform is a sequence test. Sequential elds often become points of contention in
cluster database systems.
1. First, open a connection to the database as SYSDBA on both nodes.
2. Setup a table and several sequence types for comparison. Also enable serveroutput.
create table SEQTEST (seqid varchar2(30), highval number);
insert into SEQTEST values ('MYTABLE', 1);
commit;
create sequence SEQTEST_O_NC ORDER NOCACHE;
create sequence SEQTEST_O_C ORDER CACHE 100;
create sequence SEQTEST_NO_NC NOORDER NOCACHE;
211
RAC SQL and PLSQL
create sequence SEQTEST_NO_C NOORDER CACHE 100;
set serveroutput on;
3. On node collabn1 measure the differences between various methods. Run this two or three times
to warm up the machines. (Note: subtract 500 from the runtimes reported (in hsecs) to account
for time in DBMS_LOCK.SLEEP.)
exec runstats_pkg.rs_start;
DECLARE
myval number;
BEGIN
FOR counter IN 1..10
LOOP
select highval into myval from SEQTEST where seqid='MYTABLE' for
update;
update SEQTEST set highval=highval+1 where seqid='MYTABLE';
dbms_lock.sleep(0.5);
commit;
END LOOP;
END;
/
exec runstats_pkg.rs_middle;
DECLARE
myval number;
BEGIN
FOR counter IN 1..10
LOOP
myval := SEQTEST_O_C.NEXTVAL;
dbms_lock.sleep(0.5);
commit;
END LOOP;
END;
/
exec runstats_pkg.rs_stop;
4. On the other node - collabn2 - start an anonymous PL/SQL block that retrieves a value every half
second.
DECLARE
myval number;
BEGIN
LOOP
select highval into myval from SEQTEST where seqid='MYTABLE' for
update;
update SEQTEST set highval=highval+1 where seqid='MYTABLE';
select SEQTEST_O_NC.NEXTVAL into myval from dual;
select SEQTEST_O_C.NEXTVAL into myval from dual;
select SEQTEST_NO_NC.NEXTVAL into myval from dual;
select SEQTEST_NO_C.NEXTVAL into myval from dual;
dbms_lock.sleep(0.5);
commit;
END LOOP;
212
Parallel Query Test
END;
/
5. Repeat step 3 on node collabn1. See how the results are different as soon as cluster contention is
introduced.
6. Perform more tests, comparing different types of sequences. What conclusions can you draw
about sequences? Does caching matter for ORDER sequences?
exec runstats_pkg.rs_start;
DECLARE
myval number;
BEGIN
FOR counter IN 1..10
LOOP
myval := SEQTEST_O_NC.NEXTVAL;
dbms_lock.sleep(0.5);
commit;
END LOOP;
END;
/
exec runstats_pkg.rs_middle;
DECLARE
myval number;
BEGIN
FOR counter IN 1..10
LOOP
myval := SEQTEST_O_C.NEXTVAL;
dbms_lock.sleep(0.5);
commit;
END LOOP;
END;
/
exec runstats_pkg.rs_stop;
13.3. Parallel Query Test
1. Login to the node collabn1 and open a connection to the database as SYSDBA and unlock the SH
user account. Also grant it DBA access.
SQL> alter user sh identified by sh account unlock;
User altered.
SQL> grant dba to sh;
Grant succeeded.
213
RAC SQL and PLSQL
2. Reconnect to the database as the sh user with the RAC1 service name. Check your SID and the
service you're connected to.
SQL> connect sh/sh@RAC1
Connected.
SQL> select sid from v$mystat where rownum=1;
SID
----------
145
SQL> col sid format 9999
SQL> col username format a10
SQL> col program format a40
SQL> col service_name format a20
SQL> set linesize 100
SQL> select sid, username, program, service_name from v$session where
username='SH';
SID USERNAME PROGRAM
SERVICE_NAME
----- ---------- ----------------------------------------
--------------
145 SH sqlplus@collabn1.vm.ardentperf.com (TNS
RAC.vm.ardent
3. Enable tracing and run a parallel query on the SH schema. Look for the trace les to determine
where the slaves ran. Which nodes to the slaves run on?
exec dbms_session.set_identifier('racpx01');
alter session set tracefile_identifier = 'racpx01';
exec dbms_monitor.client_id_trace_enable(client_id=>'racpx01');
select /
*
+parallel
*
/ p.prod_name, sum(s.amount_sold)
from products p, sales s
where p.prod_id = s.prod_id
group by p.prod_name;
exec dbms_monitor.client_id_trace_disable(client_id=>'racpx01');
SQL> col value format a60
SQL> select inst_id, value from gv$parameter where name='user_dump_dest';
INST_ID VALUE
----------
------------------------------------------------------------
1 /u01/app/oracle/diag/rdbms/rac/RAC1/trace
2 /u01/app/oracle/diag/rdbms/rac/RAC2/trace
SQL> host ssh collabn1 ls -sh /u01/app/oracle/diag/rdbms/rac/RAC1/trace/
*
racpx01.trc
SQL> host ssh collabn2 ls -sh /u01/app/oracle/diag/rdbms/rac/RAC2/trace/
*
racpx01.trc
4. Create a new service which only runs on node 2 and repeat the test (from collabn1). Which
nodes to the slaves run on now? How is this different from Oracle 10g?
214
Scheduler Test
collabn1:/home/oracle[RAC1]$ srvctl add service -d RAC -s pxtest -r RAC2 -a RAC1
collabn1:/home/oracle[RAC1]$ srvctl start service -d RAC -s pxtest
collabn1:/home/oracle[RAC1]$ lsnrctl services
Services Summary...
Service "pxtest.vm.ardentperf.com" has 1 instance(s).
Instance "RAC2", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=collabn2.vm.ardentperf.com)(PORT=1521))
collabn1:/home/oracle[RAC1]$ vi $ORACLE_HOME/network/admin/tnsnames.ora
PXTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = collabn1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = collabn2-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PXTEST.vm.ardentperf.com)
)
)
collabn1:/home/oracle[RAC1]$ sqlplus sh/sh@pxtest
SQL> col sid format 9999
SQL> col username format a10
SQL> col program format a40
SQL> col service_name format a20
SQL> select sid, username, program, service_name from v$session where
username='SH';
SID USERNAME PROGRAM
SERVICE_NAME
----- ---------- ----------------------------------------
--------------
124 SH sqlplus@collabn1.vm.ardentperf.com (TNS V1-V3)
pxtest
exec dbms_session.set_identifier('racpx05');
alter session set tracefile_identifier = 'racpx05';
exec dbms_monitor.client_id_trace_enable(client_id=>'racpx05');
select /
*
+parallel
*
/ p.prod_name, sum(s.amount_sold)
from products p, sales s
where p.prod_id = s.prod_id
group by p.prod_name;
exec dbms_monitor.client_id_trace_disable(client_id=>'racpx05');
host ssh collabn1 ls -sh /u01/app/oracle/diag/rdbms/rac/RAC1/trace/
*
racpx05.trc
host ssh collabn2 ls -sh /u01/app/oracle/diag/rdbms/rac/RAC2/trace/
*
racpx05.trc
13.4. Scheduler Test
In RAC, PL/SQL can execute on either node - and this must be taken into account when processes are
architected. We will take a brief look at this property through two simple tests.
215
RAC SQL and PLSQL
First we'll have a look at the scheduler. Note that this lab relies on the PXTEST service created in the
Parallel Query Test .
1. Login to the node collabn1 as oracle and conrm that the pxtest service is running on instance
RAC2.
collabn1:/home/oracle[RAC1]$ srvctl status service -d RAC -s pxtest
Service pxtest is running on instance(s) RAC2
collabn1:/home/oracle[RAC1]$
2. Shutdown the service.
collabn1:/home/oracle[RAC1]$ srvctl stop service -d RAC -s pxtest
collabn1:/home/oracle[RAC1]$
3. Login to the RAC1 service as sh and create a job class and a PL/SQL procedure that we can
execute from the job. Note that the service name is case sensitive!
collabn1:/home/oracle[RAC1]$ sqlplus sh/sh@RAC1
exec dbms_scheduler.create_job_class('TESTOFF1',service=>'pxtest');
create or replace procedure traceme(id varchar2) as
x number;
begin
execute immediate 'alter session set tracefile_identifier=||id||';
dbms_session.session_trace_enable(true,true);
select count(
*
) into x from sh.customers;
dbms_session.session_trace_disable();
end;
/
4. Schedule the job to run immediately with the job class that's tied to the PXTEST service. Check
to see if it ran. Query the user_schedule_jobs table a few times in a row. Did anything happen?
select job_name, schedule_type, job_class, enabled, auto_drop, state
from user_scheduler_jobs;
begin
dbms_scheduler.create_job('TESTJOB1','PLSQL_BLOCK',
job_action=>'traceme(scheduler01);',
job_class=>'TESTOFF1',enabled=>true);
end;
/
select job_name, schedule_type, job_class, enabled, auto_drop, state
from user_scheduler_jobs;
5. Startup the PXTEST service and check the status of the job again. Make sure to query the
user_schedule_jobs table a few times in a row. (Be patient for at least one minute.) Did the job
execute? If so, then on which node?
216
File Test
host srvctl start service -d RAC -s pxtest
select job_name, schedule_type, job_class, enabled, auto_drop, state
from user_scheduler_jobs;
host ssh collabn2 ls -sh
/u01/app/oracle/diag/rdbms/rac/RAC2/trace/
*
scheduler01.trc
host ssh collabn1 ls -sh
/u01/app/oracle/diag/rdbms/rac/RAC1/trace/
*
scheduler01.trc
6. Modify the PXTEST service to run on both nodes and stop it.
SQL> host srvctl modify service -d RAC -s pxtest -n -i RAC1,RAC2
SQL> host srvctl stop service -d RAC -s pxtest
7. Submit 20 jobs to run the program and then enable the service. (This way all of the jobs should
get scheduled nearly concurrently.) On which node(s) did they execute?
begin
FOR i IN 10..29
LOOP
dbms_scheduler.create_job('TESTJOB'||i,'PLSQL_BLOCK',
job_action=>'traceme(scheduler'||i||);',
job_class=>'TESTOFF1',enabled=>true);
END LOOP;
end;
/
select job_name, schedule_type, job_class, enabled, auto_drop, state
from user_scheduler_jobs;
SQL> host srvctl start service -d RAC -s pxtest
select job_name, schedule_type, job_class, enabled, auto_drop, state
from user_scheduler_jobs;
host ssh collabn2 ls -sh
/u01/app/oracle/diag/rdbms/rac/RAC2/trace/
*
scheduler
*
.trc
host ssh collabn1 ls -sh
/u01/app/oracle/diag/rdbms/rac/RAC1/trace/
*
scheduler
*
.trc
13.5. File Test
Our second PL/SQL test will look at the UTL_FILE package. With any PL/SQL operations on RAC you
must be aware that the code could execute on any node where its service lives. This could also impact
packages like DBMS_PIPE, UTL_MAIL, UTL_HTTP (proxy server source IP rules for example), or
even DBMS_RLS (refreshing policies).
217
RAC SQL and PLSQL
1. Login to RAC1 as sh and create a le that we can try reading later.
collabn1:/home/oracle[RAC1]$ sqlplus sh/sh@RAC1
create directory orahome as '/home/oracle';
declare
fl utl_file.file_type;
begin
fl := utl_file.fopen('ORAHOME','data.txt','w');
utl_file.put_line(fl, 'Some sample data for an oracle test.',
TRUE);
utl_file.fclose(fl);
end;
/
2. Exit SQLPLUS. At the prompt, copy this command to connect to the RAC service as sh againand
attempt to read the le you just wrote. Run this command 10-20 times in a row. (Cut-and-paste is
recommended.) What happens? Why?
sqlplus -S sh/sh@RAC <<EOF
declare
fl utl_file.file_type;
data varchar2(1024);
begin
fl := utl_file.fopen('ORAHOME','data.txt','r');
utl_file.get_line(fl, data);
utl_file.fclose(fl);
end;
/
exit;
EOF
218
14. RAC Backups and Recovery
14.1. Setup Backups
During this lab we will intentionally miscongure the cluster database backups and make some common
mistakes with local, non-shared storage.
1. Login to a terminal on collabn1 as the user oracle.
2. On collabn1 create a directory /u01/app/oradata and try to congure it as the Flash Recovery
Area (FRA) through the init param db_recovery_le_dest. The operation will fail.
collabn1:/home/oracle[RAC1]$ mkdir /u01/app/oradata
collabn1:/home/oracle[RAC1]$ ss
SQL
*
Plus: Release 11.1.0.6.0 - Production on Mon May 4 07:39:57 2009
SQL> show parameter recovery_file
NAME TYPE VALUE
------------------------------- -----------
------------------------------
db_recovery_file_dest string +FRA
db_recovery_file_dest_size big integer 4000M
SQL> alter system set db_recovery_file_dest='/u01/app/oradata';
alter system set db_recovery_file_dest='/u01/app/oradata'
*
ERROR at line 1:
ORA-32008: error while processing parameter update at instance RAC2
ORA-02097: parameter cannot be modified because specified value is
invalid
ORA-01261: Parameter db_recovery_file_dest destination string cannot
be
translated
ORA-01262: Stat failed on a file destination directory
Linux Error: 2: No such file or director
Information
The error occurred on the remote node, but was reported here. It was also recorded on the remote
node do you know where it is recorded? What kind of monitoring would need to be in place to
be proactively alerted by messages like this?
3. Now create the directory on the remote node and re-run the operation. This should succeed but it
is still a poor conguration; we will investigate the reasons later in this lab.
219
RAC Backups and Recovery
SQL> host ssh collabn2 mkdir /u01/app/oradata
SQL> alter system set db_recovery_file_dest='/u01/app/oradata';
System altered.
4. Shutdown the database across the cluster. Then mount it on collabn1 and put the database into
archivelog mode. No archivelog destination is assigned where will the archivelogs go and why?
Information
You do not need to disable the cluster_database init param for this.
collabn1:/home/oracle[RAC1]$ srvctl stop database -d RAC
collabn1:/home/oracle[RAC1]$ srvctl status database -d RAC
Instance RAC1 is not running on node collabn1
Instance RAC2 is not running on node collabn2
collabn1:/home/oracle[RAC1]$ ss
SQL
*
Plus: Release 11.1.0.6.0 - Production on Mon May 4 09:08:01 2009
SQL> startup mount
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
collabn1:/home/oracle[RAC1]$ srvctl start database -d RAC
14.2. Flashback Database
1. Before opening the database, enable ashback database.
SQL> alter database flashback on;
Database altered.
SQL> alter database open;
Database altered.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
SQL> select oldest_flashback_scn,flashback_size from
v$flashback_database_log;
OLDEST_FLASHBACK_SCN FLASHBACK_SIZE
-------------------- --------------
610425 8192000
2. Now, login to collabn2 and startup the database from sqlplus. You will get an error message.
220
Flashback Database
collabn2:/home/oracle[RAC2]$ ss
SQL
*
Plus: Release 11.1.0.6.0 - Production on Mon May 4 09:21:25 2009
SQL> startup
ORACLE instance started.
Total System Global Area 318054400 bytes
Fixed Size 1299624 bytes
Variable Size 142609240 bytes
Database Buffers 167772160 bytes
Redo Buffers 6373376 bytes
Database mounted.
ORA-38760: This database instance failed to turn on flashback
database
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
SQL> select oldest_flashback_scn,flashback_size from
v$flashback_database_log;
OLDEST_FLASHBACK_SCN FLASHBACK_SIZE
-------------------- --------------
0 16384000
3. Interestingly, the database seems to be running alright. Investigate the alert log for error messages.
collabn2:/home/oracle[RAC2]$ cdd
collabn2:/u01/app/oracle/diag[RAC2]$ cd rdbms/rac/RAC2/trace/
collabn2:/u01/app/oracle/diag/rdbms/rac/RAC2/trace[RAC2]$ less
alert_RAC2.log
Mon May 04 09:22:07 2009
Errors in file
/u01/app/oracle/diag/rdbms/rac/RAC2/trace/RAC2_ora_22856.trc:
ORA-38701: Flashback database log 1 seq 1 thread 1:
"/u01/app/oradata/RAC/flashb
ack/o1_mf_4zxxs99n_.flb"
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
4. Investigate the alert log on collabn1 do any error messages appear here? Do any other problems
occur?
Information
You might have to wait for a few minutes. Check the output of "srvctl status database -d RAC" too.
5. Disable ashback database. You do not need to shutdown for the disable operation.
SQL> alter database flashback off;
Database altered.
221
RAC Backups and Recovery
14.3. Block Change Tracking
1. Enable block change tracking on the database and explicitly choose the local FRA destination.
(Typically the block change tracking le is created in the OMF DB destination rather than the
FRA.)
SQL> alter database enable block change tracking
2 using file '/u01/app/oradata/changetracking.ctf';
What happens? Make sure to check the alert logs. Try it with only one instance open, and then
open the other instance to see what happens.
2. Disable block change tracking.
SQL> alter database disable block change tracking;
SQL> col filename format a40
SQL> select
*
from v$block_change_tracking;
STATUS FILENAME BYTES
---------- ---------------------------------------- ----------
DISABLED
14.4. Archived Logs
1. Look at the sequence number of the two current logs.
SQL> select thread#, sequence# from v$log where status='CURRENT';
THREAD# SEQUENCE#
---------- ----------
1 6
2 3
2. Execute alter system switch logle and check the result. What happened?
SQL> alter system switch logfile;
System altered.
SQL> select thread#, sequence# from v$log where status='CURRENT';
THREAD# SEQUENCE#
---------- ----------
1 6
2 4
3. Execute alter system archive log current and check the result. What happened now?
222
Archived Logs
SQL> alter system archive log current;
System altered.
SQL> select thread#, sequence# from v$log where status='CURRENT';
THREAD# SEQUENCE#
---------- ----------
1 7
2 5
4. Check where the archived logs are being stored by default. (Was this what you expected?)
Explicitly assign them to the FRA and test to see if your changes took effect.
SQL> col t format a5
SQL> col name format a70
SQL> select thread#||'.'||sequence# t, name from v$archived_log;
T NAME
----- -
---------------------------------------------------------------------
1.6 /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_6_685220246.dbf
1.6
/u01/app/oradata/RAC/archivelog/2009_05_04/o1_mf_1_6_4zy1wofw_.arc
2.4 /u01/app/oracle/product/11.1.0/db_1/dbs/arch2_4_685220246.dbf
2.4
/u01/app/oradata/RAC/archivelog/2009_05_04/o1_mf_2_4_4zy1wpn9_.arc
SQL> alter system set
log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST';
System altered.
SQL> alter system archive log current;
System altered.
SQL> select thread#||'.'||sequence# t, name from v$archived_log;
T NAME
----- -
---------------------------------------------------------------------
2.5
/u01/app/oradata/RAC/archivelog/2009_05_04/o1_mf_2_5_4zy2xzv3_.arc
1.7
/u01/app/oradata/RAC/archivelog/2009_05_04/o1_mf_1_7_4zy2y1q6_.arc
5. Take a backup of all the current archivelogs, using the default RMAN conguration. Why does it
fail?
collabn1:/home/oracle[RAC1]$ rman target /
Recovery Manager: Release 11.1.0.6.0 - Production on Mon May 4
10:43:45 2009
connected to target database: RAC (DBID=2273202257)
RMAN> backup archivelog all;
Starting backup at 04-MAY-09
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=113 instance=RAC1 device type=DISK
archived log
/u01/app/oradata/RAC/archivelog/2009_05_04/o1_mf_1_4_4zy03zdh_.arc
not found or out of sync with catalog
223
RAC Backups and Recovery
trying alternate file for archived log of thread 1 with sequence 4
RMAN-00571:
===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
===============
RMAN-00571:
===========================================================
RMAN-03002: failure of backup command at 05/04/2009 10:47:56
RMAN-06059: expected archived log not found, lost of archived log
compromises recoverability
ORA-19625: error identifying file
/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_4_685220246.dbf
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
6. Crosscheck the archived logs; most will fail. Then copy the les from the local FRA on collabn2
and crosscheck them again.
RMAN> crosscheck archivelog all;
RMAN> list archivelog all;
List of Archived Log Copies for database with db_unique_name RAC
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - ---------
6 1 4 X 26-APR-09
Name:
/u01/app/oradata/RAC/archivelog/2009_05_04/o1_mf_1_4_4zy03zdh_.arc
RMAN> host 'scp -r collabn2:/u01/app/oradata/RAC/archivelog/
*
/u01/app/oradata/RAC/archivelog/';
o1_mf_1_5_4zy044nl_.arc 100% 1024 1.0KB/s
00:00
o1_mf_2_6_4zy3k2s0_.arc 100% 12KB 11.5KB/s
00:00
o1_mf_2_3_4zy1txkr_.arc 100% 13KB 12.5KB/s
00:01
o1_mf_1_4_4zy03zdh_.arc 100% 29MB 4.9MB/s
00:06
o1_mf_2_2_4zy1dksv_.arc 100% 1209KB 1.2MB/s
00:01
o1_mf_2_4_4zy1wpn9_.arc 100% 233KB 233.0KB/s
00:00
o1_mf_2_5_4zy2xzv3_.arc 100% 19KB 19.0KB/s
00:00
RMAN> crosscheck archivelog all;
RMAN> list archivelog all;
List of Archived Log Copies for database with db_unique_name RAC
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - ---------
6 1 4 A 26-APR-09
Name:
/u01/app/oradata/RAC/archivelog/2009_05_04/o1_mf_1_4_4zy03zdh_.arc
224
Database Backups
14.5. Database Backups
We will congure backups to take full advantage of the cluster by running in parallel.
1. Congure the RMAN default channels and parallelism.
RMAN> configure device type disk parallelism 2 backup type to
compressed backupset;
RMAN> configure channel 1 device type disk connect
'sys/racattack@rac1';
RMAN> configure channel 2 device type disk connect
'sys/racattack@rac2';
RMAN> show all;
2. Take a complete hot backup of the entire database.
RMAN> backup database plus archivelog;
Starting backup at 04-MAY-09
current log archived
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_2: starting compressed archived log backup set
...
Finished backup at 04-MAY-09
Starting backup at 04-MAY-09
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_2: starting compressed full datafile backup set
...
Finished backup at 04-MAY-09
Starting backup at 04-MAY-09
current log archived
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_2: starting compressed archived log backup set
...
Finished backup at 04-MAY-09
3. Crosscheck the backup. What happens and why?
RMAN> list backupset summary;
Key TY LV S Device Type Completion Time #Pieces #Copies
Compressed
------- -- -- - ----------- --------------- ------- -------
----------
1 B A A DISK 04-MAY-09 1 1 YES
2 B A A DISK 04-MAY-09 1 1 YES
3 B A A DISK 04-MAY-09 1 1 YES
4 B A A DISK 04-MAY-09 1 1 YES
5 B F A DISK 04-MAY-09 1 1 YES
6 B F A DISK 04-MAY-09 1 1 YES
7 B F A DISK 04-MAY-09 1 1 YES
8 B F A DISK 04-MAY-09 1 1 YES
9 B A A DISK 04-MAY-09 1 1 YES
10 B A A DISK 04-MAY-09 1 1 YES
RMAN> allocate channel for maintenance device type disk;
225
RAC Backups and Recovery
released channel: ORA_DISK_1
released channel: ORA_DISK_2
allocated channel: ORA_MAINT_DISK_1
channel ORA_MAINT_DISK_1: SID=111 instance=RAC1 device type=DISK
RMAN> crosscheck backup;
RMAN> list backupset summary;
Information
Try this again, without allocating the maintenance channel. What happens and why?
14.6. Database Recovery
This exercise depends on the completion of the previous exercises.
1. Clear the RMAN channels and parallelism conguration.
RMAN> configure channel 1 device type disk clear;
RMAN> configure channel 2 device type disk clear;
RMAN> configure device type disk parallelism 1;
RMAN> show all;
2. Preview a restore of the entire database. Why does it fail? How can you remediate this?
RMAN> restore database preview;
Starting restore at 04-MAY-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=114 instance=RAC1 device type=DISK
RMAN-00571:
===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
===============
RMAN-00571:
===========================================================
RMAN-03002: failure of restore command at 05/04/2009 11:44:53
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
3. Revert the FRA to the correct shared location, assigned during DB creation before lab 6.
SQL> alter system set db_recovery_file_dest='+FRA';
System altered.
4. Now, repeat the Database Backups exercise and this exercise with shared storage.
226
15. Contributors
Edits User
432 ArdentPerf
1
1 Mabdul
2
1 MartinNash
3
96 QUBot
4
1 http://en.wikibooks.org/w/index.php?title=User:ArdentPerf
2 http://en.wikibooks.org/w/index.php?title=User:Mabdul
3 http://en.wikibooks.org/w/index.php?title=User:MartinNash
4 http://en.wikibooks.org/w/index.php?title=User:QUBot
227
List of Figures
GFDL: Gnu Free Documentation License. http://www.gnu.org/licenses/fdl.html
cc-by-sa-3.0: Creative Commons Attribution ShareAlike 3.0 License. http://
creativecommons.org/licenses/by-sa/3.0/
cc-by-sa-2.5: Creative Commons Attribution ShareAlike 2.5 License. http://
creativecommons.org/licenses/by-sa/2.5/
cc-by-sa-2.0: Creative Commons Attribution ShareAlike 2.0 License. http://
creativecommons.org/licenses/by-sa/2.0/
cc-by-sa-1.0: Creative Commons Attribution ShareAlike 1.0 License. http://
creativecommons.org/licenses/by-sa/1.0/
cc-by-2.0: Creative Commons Attribution 2.0 License. http://creativecommons.org/
licenses/by/2.0/
cc-by-2.0: Creative Commons Attribution 2.0 License. http://creativecommons.org/
licenses/by/2.0/deed.en
cc-by-2.5: Creative Commons Attribution 2.5 License. http://creativecommons.org/
licenses/by/2.5/deed.en
cc-by-3.0: Creative Commons Attribution 3.0 License. http://creativecommons.org/
licenses/by/3.0/deed.en
GPL: GNU General Public License. http://www.gnu.org/licenses/gpl-2.0.txt
LGPL: GNU Lesser General Public License. http://www.gnu.org/licenses/lgpl.
html
PD: This image is in the public domain.
ATTR: The copyright holder of this le allows anyone to use it for any purpose, provided that the
copyright holder is properly attributed. Redistribution, derivative work, commercial use, and all
other use is permitted.
EURO: This is the common (reverse) face of a euro coin. The copyright on the design of the
common face of the euro coins belongs to the European Commission. Authorised is reproduction
in a format without relief (drawings, paintings, lms) provided they are not detrimental to the
image of the euro.
LFK: Lizenz Freie Kunst. http://artlibre.org/licence/lal/de
CFR: Copyright free use.
229
List of Figures
EPL: Eclipse Public License. http://www.eclipse.org/org/documents/epl-v10.
php
MS: Copyright Microsoft Corporation.
FAIR: Fair Use
WEB: Copyrighted Web Page
Copies of the GPL, the LGPL as well as a GFDL are included in chapter Licenses
5
. Please note that
images in the public domain do not require attribution. You may click on the image numbers in the
following table to open the webpage of the images in your webbrower.
5 Chapter 16 on page 239
230
List of Figures
1 ArdentPerf
6
GFDL
2 ArdentPerf
7
GFDL
3 Microsoft Corporation, Jeremy Schneider MS
4 Microsoft Corporation, Jeremy Schneider MS
5 Microsoft Corporation, Jeremy Schneider MS
6 Microsoft Corporation, Jeremy Schneider MS
7 Nominally User:Stannered
8
PD
8 Microsoft Corporation, Jeremy Schneider MS
9 VMware Inc, Firefox Contributers, Jeremy Schneider WEB
10 VMware Inc, Firefox Contributers, Jeremy Schneider WEB
11 VMware Inc, Jeremy Schneider FAIR
12 VMware Inc, Jeremy Schneider FAIR
13 VMware Inc, Jeremy Schneider FAIR
14 VMware Inc, Jeremy Schneider FAIR
15 VMware Inc, Diego Pafumi FAIR
16 Microsoft Corporation, Jeremy Schneider FAIR
17 VMware, Jeremy Schneider FAIR
18 VMware, Jeremy Schneider FAIR
19 VMware, Jeremy Schneider FAIR
20 VMware, Jeremy Schneider FAIR
21 VMware, Jeremy Schneider FAIR
22 VMware, Jeremy Schneider FAIR
23 Microsoft Corporation, Jeremy Schneider FAIR
24 Firefox Contributers, Jeremy Schneider GPL
25 Microsoft Corporation, Jeremy Schneider FAIR
26 VMware, Jeremy Schneider FAIR
27 VMware, Jeremy Schneider FAIR
28 VMware, Jeremy Schneider FAIR
29 VMware, Jeremy Schneider FAIR
30 Oracle, Jeremy Schneider WEB
31 Oracle, Jeremy Schneider WEB
32 Oracle, Jeremy Schneider WEB
33 Oracle, Jeremy Schneider WEB
34 VMware, Jeremy Schneider FAIR
35 VMware, Jeremy Schneider FAIR
36 VMware, Jeremy Schneider FAIR
37 VMware, Jeremy Schneider FAIR
38 VMware, Jeremy Schneider FAIR
39 VMware, Jeremy Schneider FAIR
40 VMware, Jeremy Schneider FAIR
41 VMware, Jeremy Schneider FAIR
42 VMware, Jeremy Schneider FAIR
43 VMware, Jeremy Schneider FAIR
44 VMware, Jeremy Schneider FAIR
45 VMware, Jeremy Schneider FAIR
6 http://en.wikibooks.org/wiki/User%3AArdentPerf
7 http://en.wikibooks.org/wiki/User%3AArdentPerf
8 http://en.wikibooks.org/wiki/User%3AStannered
231
List of Figures
46 VMware, Jeremy Schneider FAIR
47 VMware, Jeremy Schneider FAIR
48 VMware, Jeremy Schneider FAIR
49 VMware, Jeremy Schneider FAIR
50 VMware, Jeremy Schneider FAIR
51 VMware, Jeremy Schneider FAIR
52 VMware, Jeremy Schneider FAIR
53 VMware, Jeremy Schneider FAIR
54 VMware, Jeremy Schneider FAIR
55 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
56 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
57 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
58 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
59 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
60 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
61 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
62 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
63 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
64 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
65 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
66 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
67 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
68 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
69 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
70 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
71 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
72 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
73 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
74 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
75 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
76 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
77 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
78 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
79 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
80 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
81 Oracle Corporation, VMware Inc, OEL contributers, Jeremy Schnei-
der
FAIR
82 Gnome Contributors, Jeremy Schneider GPL
83 Gnome Terminal Contributors, Jeremy Schneider GPL
84 Oracle Corporation, VMware Inc, OEL Contributers, Jeremy Schnei-
der
FAIR
85 Gnome Terminal Contributors, Jeremy Schneider GPL
86 Gnome Terminal Contributors, Jeremy Schneider GPL
87 Gnome Contributors, Jeremy Schneider GPL
88 VMware Inc, Gnome Contributers, Jeremy Schneider FAIR
89 VMware Inc, Jeremy Schneider FAIR
90 VMware Inc, Gnome Contributers, Oracle Corporation, Jeremy
Schneider
FAIR
232
List of Figures
91 VMware Inc, Gnome Contributers, Oracle Corporation, Jeremy
Schneider
FAIR
92 Oracle Corporation, VMware Inc, OEL Contributers, Jeremy Schnei-
der
FAIR
93 Oracle Corporation, VMware Inc, OEL contributers, Jeremy Schnei-
der
FAIR
94 Gnome Contributors, Jeremy Schneider GPL
95 Gnome Terminal Contributors, Jeremy Schneider GPL
96 Oracle Corporation, VMware Inc, OEL Contributers, Jeremy Schnei-
der
FAIR
97 Gnome Terminal Contributors, Jeremy Schneider GPL
98 Gnome Terminal Contributors, Jeremy Schneider GPL
99 Gnome Contributors, Jeremy Schneider GPL
100 VMware, Jeremy Schneider FAIR
101 VMware, Jeremy Schneider FAIR
102 VMware, Jeremy Schneider FAIR
103 VMware, Jeremy Schneider FAIR
104 VMware, Jeremy Schneider FAIR
105 VMware, Jeremy Schneider FAIR
106 VMware, Jeremy Schneider FAIR
107 VMware, Jeremy Schneider FAIR
108 VMware, Jeremy Schneider FAIR
109 VMware, Jeremy Schneider FAIR
110 VMware, Jeremy Schneider FAIR
111 VMware, Jeremy Schneider FAIR
112 VMware, Jeremy Schneider FAIR
113 Microsoft Corporation, VMware Inc, Jeremy Schneider FAIR
114 Microsoft Corporation, Jeremy Schneider MS
115 Microsoft Corporation, VMware Inc, Jeremy Schneider FAIR
116 Microsoft Corporation, VMware Inc, Jeremy Schneider FAIR
117 VMware, Jeremy Schneider FAIR
118 VMware, Jeremy Schneider FAIR
119 Oracle Corporation, VMware Inc, OEL contributers, Jeremy Schnei-
der
FAIR
120 Oracle Corporation, VMware Inc, OEL Contributers, Jeremy Schnei-
der
FAIR
121 Gnome and Linux Contributors, Oracle Corporation, VMware Inc,
Jeremy Schneider
FAIR
122 VMware Inc, Jeremy Schneider FAIR
123 VMware Inc, Jeremy Schneider FAIR
124 VMware Inc, Jeremy Schneider FAIR
125 VMware Inc, Jeremy Schneider FAIR
126 VMware, Jeremy Schneider FAIR
127 Oracle Corporation, VMware Inc, OEL contributers, Jeremy Schnei-
der
FAIR
128 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
129 Oracle Corporation, VMware Inc, Jeremy Schneider FAIR
233
List of Figures
130 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
131 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
132 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
133 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
134 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
135 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
136 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
137 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
138 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
139 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
140 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
141 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
142 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
143 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
144 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
145 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
146 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
147 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
148 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
149 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
150 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
151 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
152 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
153 Oracle Corporation, TightVNC Group, Jeremy Schneider FAIR
154 Oracle Corporation, TightVNC Group, Jeremy Schneider FAIR
155 Oracle Corporation, TightVNC Group, Jeremy Schneider FAIR
156 Oracle Corporation, TightVNC Group, Jeremy Schneider FAIR
234
List of Figures
157 Oracle Corporation, TightVNC Group, Jeremy Schneider FAIR
158 Oracle Corporation, TightVNC Group, Jeremy Schneider FAIR
159 Oracle Corporation, TightVNC Group, Jeremy Schneider FAIR
160 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
161 OCFS2 Contributers, Gnome Contributors, Oracle Corporation,
VMware Inc, Jeremy Schneider
FAIR
162 OCFS2 Contributers, Gnome Contributors, Oracle Corporation,
VMware Inc, Jeremy Schneider
FAIR
163 OCFS2 Contributers, Gnome Contributors, Oracle Corporation,
VMware Inc, Jeremy Schneider
FAIR
164 OCFS2 Contributers, Gnome Contributors, Oracle Corporation,
VMware Inc, Jeremy Schneider
FAIR
165 OCFS2 Contributers, Gnome Contributors, Oracle Corporation,
VMware Inc, Jeremy Schneider
FAIR
166 OCFS2 Contributers, Gnome Contributors, Oracle Corporation,
VMware Inc, Jeremy Schneider
FAIR
167 OCFS2 Contributers, Gnome Contributors, Oracle Corporation,
VMware Inc, Jeremy Schneider
FAIR
168 OCFS2 Contributers, Gnome Contributors, Oracle Corporation,
VMware Inc, Jeremy Schneider
FAIR
169 OCFS2 Contributers, Gnome Contributors, Oracle Corporation,
VMware Inc, Jeremy Schneider
FAIR
170 OCFS2 Contributers, Gnome Contributors, Oracle Corporation,
VMware Inc, Jeremy Schneider
FAIR
171 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
172 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
173 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
174 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
175 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
176 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
177 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
178 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
179 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
180 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
181 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
182 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
235
List of Figures
183 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
184 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
185 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
186 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
187 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
188 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
189 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
190 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
191 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
192 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
193 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
194 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
195 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
196 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
197 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
198 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
199 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
200 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
201 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
202 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
203 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
204 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
205 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
206 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
207 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
236
List of Figures
208 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
209 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
210 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
211 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
212 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
213 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
214 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
215 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
216 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
217 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
218 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
219 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
220 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
221 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
222 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
223 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
224 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
225 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
226 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
227 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
228 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
229 Gnome Contributors, Oracle Corporation, VMware Inc, Jeremy
Schneider
FAIR
230 ArdentPerf
9
GFDL
231 VMware, Jeremy Schneider FAIR
232 VMware, Jeremy Schneider FAIR
9 http://en.wikibooks.org/wiki/User%3AArdentPerf
237
List of Figures
233 Microsoft Corporation, Jeremy Schneider FAIR
234 Microsoft Corporation, Jeremy Schneider FAIR
235 Microsoft Corporation, Jeremy Schneider MS
236 Microsoft Corporation, Jeremy Schneider MS
237 VMware, Jeremy Schneider FAIR
238 VMware, Jeremy Schneider FAIR
239 VMware, Jeremy Schneider FAIR
238
16. Licenses
16.1. Fair Use
Screenshots of proprietary software and websites are copyrighted. It is impossi-
ble to create public domain or free screenshots of proprietary software or web-
sites. These screenshots are being used under "fair use" to illustrate how to use
certain proprietary software.
These screenshots may contain copyrighted computer software, and the copy-
right for their contents is most likely held by the author(s) or the company that
created the software. It is believed that the limited use of these screenshots:
for identication of, and critical commentary on, the software in question
in the absence of a free alternative,
in this free educational textbook created and maintained by the professional
community
qualies as fair use under United States copyright law. Any other uses of these
images may be copyright infringement.
16.2. Copyrighted Web
Pages
These images may contain screenshots of copyrighted web pages, and the copy-
right for them is most likely held by owner(s) of the website(s). They may also
contain trademarked logos, which are likely not afliated with RAC Attack. It
is believed that the limited use of
for identication and critical commentary relating to the website in question
in this free educational textbook created and maintained by the professional
community
qualies as fair use under United States copyright law. Any other uses of these
images may be copyright infringement.
16.3. Use of Microsoft
Copyrighted
Content
This screenshot of Microsoft software (or parts of it) is copyrighted by Mi-
crosoft Corporation.
Microsoft permits the use of unmodied screenshots in documentation (includ-
ing educational brochures), tutorial books, and on websites, as declared below:
Used with permission from Microsoft.
http://www.microsoft.com/en-us/legal/intellectualproperty/Permissions/default.aspx
16.4. GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed. Preamble
The GNU General Public License is a free, copyleft license for software and
other kinds of works.
The licenses for most software and other practical works are designed to take
away your freedom to share and change the works. By contrast, the GNU Gen-
eral Public License is intended to guarantee your freedom to share and change
all versions of a programto make sure it remains free software for all its users.
We, the Free Software Foundation, use the GNU General Public License for
most of our software; it applies also to any other work released this way by its
authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom
to distribute copies of free software (and charge for them if you wish), that you
receive source code or can get it if you want it, that you can change the software
or use pieces of it in new free programs, and that you know you can do these
things.
To protect your rights, we need to prevent others from denying you these rights
or asking you to surrender the rights. Therefore, you have certain responsibili-
ties if you distribute copies of the software, or if you modify it: responsibilities
to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for
a fee, you must pass on to the recipients the same freedoms that you received.
You must make sure that they, too, receive or can get the source code. And you
must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) as-
sert copyright on the software, and (2) offer you this License giving you legal
permission to copy, distribute and/or modify it.
For the developers and authors protection, the GPL clearly explains that there
is no warranty for this free software. For both users and authors sake, the GPL
requires that modied versions be marked as changed, so that their problems
will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modied ver-
sions of the software inside them, although the manufacturer can do so. This
is fundamentally incompatible with the aim of protecting users freedom to
change the software. The systematic pattern of such abuse occurs in the area of
products for individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the practice for
those products. If such problems arise substantially in other domains, we stand
ready to extend this provision to those domains in future versions of the GPL,
as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States
should not allow patents to restrict development and use of software on general-
purpose computers, but in those that do, we wish to avoid the special danger
that patents applied to a free program could make it effectively proprietary. To
prevent this, the GPL assures that patents cannot be used to render the program
non-free.
The precise terms and conditions for copying, distribution and modication fol-
low. TERMS AND CONDITIONS 0. Denitions.
This License refers to version 3 of the GNU General Public License.
Copyright also means copyright-like laws that apply to other kinds of works,
such as semiconductor masks.
The Program refers to any copyrightable work licensed under this License.
Each licensee is addressed as you. Licensees and recipients may be indi-
viduals or organizations.
To modify a work means to copy from or adapt all or part of the work in a
fashion requiring copyright permission, other than the making of an exact copy.
The resulting work is called a modied version of the earlier work or a work
based on the earlier work.
A covered work means either the unmodied Program or a work based on the
Program.
To propagate a work means to do anything with it that, without permission,
would make you directly or secondarily liable for infringement under applicable
copyright law, except executing it on a computer or modifying a private copy.
Propagation includes copying, distribution (with or without modication), mak-
ing available to the public, and in some countries other activities as well.
To convey a work means any kind of propagation that enables other parties
to make or receive copies. Mere interaction with a user through a computer
network, with no transfer of a copy, is not conveying.
An interactive user interface displays Appropriate Legal Notices to the extent
that it includes a convenient and prominently visible feature that (1) displays an
appropriate copyright notice, and (2) tells the user that there is no warranty for
the work (except to the extent that warranties are provided), that licensees may
convey the work under this License, and how to view a copy of this License.
If the interface presents a list of user commands or options, such as a menu, a
prominent item in the list meets this criterion. 1. Source Code.
The source code for a work means the preferred form of the work for making
modications to it. Object code means any non-source form of a work.
A Standard Interface means an interface that either is an ofcial standard de-
ned by a recognized standards body, or, in the case of interfaces specied for
a particular programming language, one that is widely used among developers
working in that language.
The System Libraries of an executable work include anything, other than the
work as a whole, that (a) is included in the normal form of packaging a Major
Component, but which is not part of that Major Component, and (b) serves only
to enable use of the work with that Major Component, or to implement a Stan-
dard Interface for which an implementation is available to the public in source
code form. A Major Component, in this context, means a major essential
component (kernel, window system, and so on) of the specic operating system
(if any) on which the executable work runs, or a compiler used to produce the
work, or an object code interpreter used to run it.
The Corresponding Source for a work in object code form means all the
source code needed to generate, install, and (for an executable work) run the
object code and to modify the work, including scripts to control those activities.
However, it does not include the works System Libraries, or general-purpose
tools or generally available free programs which are used unmodied in per-
forming those activities but which are not part of the work. For example, Corre-
sponding Source includes interface denition les associated with source les
for the work, and the source code for shared libraries and dynamically linked
subprograms that the work is specically designed to require, such as by inti-
mate data communication or control ow between those subprograms and other
parts of the work.
The Corresponding Source need not include anything that users can regenerate
automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work. 2.
Basic Permissions.
All rights granted under this License are granted for the term of copyright on
the Program, and are irrevocable provided the stated conditions are met. This
License explicitly afrms your unlimited permission to run the unmodied Pro-
gram. The output from running a covered work is covered by this License only
if the output, given its content, constitutes a covered work. This License ac-
knowledges your rights of fair use or other equivalent, as provided by copyright
law.
You may make, run and propagate covered works that you do not convey, with-
out conditions so long as your license otherwise remains in force. You may
convey covered works to others for the sole purpose of having them make mod-
ications exclusively for you, or provide you with facilities for running those
works, provided that you comply with the terms of this License in conveying all
material for which you do not control copyright. Those thus making or running
the covered works for you must do so exclusively on your behalf, under your
direction and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the condi-
tions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure
under any applicable law fullling obligations under article 11 of the WIPO
copyright treaty adopted on 20 December 1996, or similar laws prohibiting or
restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circum-
vention of technological measures to the extent such circumvention is effected
by exercising rights under this License with respect to the covered work, and
you disclaim any intention to limit operation or modication of the work as a
means of enforcing, against the works users, your or third parties legal rights
to forbid circumvention of technological measures. 4. Conveying Verbatim
Copies.
You may convey verbatim copies of the Programs source code as you receive
it, in any medium, provided that you conspicuously and appropriately publish
on each copy an appropriate copyright notice; keep intact all notices stating that
this License and any non-permissive terms added in accord with section 7 apply
to the code; keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you
may offer support or warranty protection for a fee. 5. Conveying Modied
Source Versions.
You may convey a work based on the Program, or the modications to produce
it from the Program, in the form of source code under the terms of section 4,
provided that you also meet all of these conditions:
* a) The work must carry prominent notices stating that you modied it, and
giving a relevant date. * b) The work must carry prominent notices stating that
it is released under this License and any conditions added under section 7. This
requirement modies the requirement in section 4 to keep intact all notices. *
c) You must license the entire work, as a whole, under this License to anyone
who comes into possession of a copy. This License will therefore apply, along
with any applicable section 7 additional terms, to the whole of the work, and all
its parts, regardless of how they are packaged. This License gives no permission
to license the work in any other way, but it does not invalidate such permission
if you have separately received it. * d) If the work has interactive user inter-
faces, each must display Appropriate Legal Notices; however, if the Program
has interactive interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
239
Licenses
A compilation of a covered work with other separate and independent works,
which are not by their nature extensions of the covered work, and which are
not combined with it such as to form a larger program, in or on a volume of
a storage or distribution medium, is called an aggregate if the compilation
and its resulting copyright are not used to limit the access or legal rights of the
compilations users beyond what the individual works permit. Inclusion of a
covered work in an aggregate does not cause this License to apply to the other
parts of the aggregate. 6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections
4 and 5, provided that you also convey the machine-readable Corresponding
Source under the terms of this License, in one of these ways:
* a) Convey the object code in, or embodied in, a physical product (including
a physical distribution medium), accompanied by the Corresponding Source
xed on a durable physical medium customarily used for software interchange.
* b) Convey the object code in, or embodied in, a physical product (including a
physical distribution medium), accompanied by a written offer, valid for at least
three years and valid for as long as you offer spare parts or customer support for
that product model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the product that is cov-
ered by this License, on a durable physical medium customarily used for soft-
ware interchange, for a price no more than your reasonable cost of physically
performing this conveying of source, or (2) access to copy the Corresponding
Source from a network server at no charge. * c) Convey individual copies of
the object code with a copy of the written offer to provide the Corresponding
Source. This alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord with subsec-
tion 6b. * d) Convey the object code by offering access from a designated place
(gratis or for a charge), and offer equivalent access to the Corresponding Source
in the same way through the same place at no further charge. You need not re-
quire recipients to copy the Corresponding Source along with the object code. If
the place to copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party) that supports
equivalent copying facilities, provided you maintain clear directions next to the
object code saying where to nd the Corresponding Source. Regardless of what
server hosts the Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements. * e) Convey the
object code using peer-to-peer transmission, provided you inform other peers
where the object code and Corresponding Source of the work are being offered
to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the
Corresponding Source as a System Library, need not be included in conveying
the object code work.
A User Product is either (1) a consumer product, which means any tangi-
ble personal property which is normally used for personal, family, or household
purposes, or (2) anything designed or sold for incorporation into a dwelling. In
determining whether a product is a consumer product, doubtful cases shall be
resolved in favor of coverage. For a particular product received by a particular
user, normally used refers to a typical or common use of that class of product,
regardless of the status of the particular user or of the way in which the partic-
ular user actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial com-
mercial, industrial or non-consumer uses, unless such uses represent the only
signicant mode of use of the product.
Installation Information for a User Product means any methods, procedures,
authorization keys, or other information required to install and execute modi-
ed versions of a covered work in that User Product from a modied version
of its Corresponding Source. The information must sufce to ensure that the
continued functioning of the modied object code is in no case prevented or
interfered with solely because modication has been made.
If you convey an object code work under this section in, or with, or specically
for use in, a User Product, and the conveying occurs as part of a transaction in
which the right of possession and use of the User Product is transferred to the
recipient in perpetuity or for a xed term (regardless of how the transaction is
characterized), the Corresponding Source conveyed under this section must be
accompanied by the Installation Information. But this requirement does not ap-
ply if neither you nor any third party retains the ability to install modied object
code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a require-
ment to continue to provide support service, warranty, or updates for a work that
has been modied or installed by the recipient, or for the User Product in which
it has been modied or installed. Access to a network may be denied when the
modication itself materially and adversely affects the operation of the network
or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in ac-
cord with this section must be in a format that is publicly documented (and
with an implementation available to the public in source code form), and must
require no special password or key for unpacking, reading or copying. 7. Addi-
tional Terms.
Additional permissions are terms that supplement the terms of this License by
making exceptions from one or more of its conditions. Additional permissions
that are applicable to the entire Program shall be treated as though they were
included in this License, to the extent that they are valid under applicable law. If
additional permissions apply only to part of the Program, that part may be used
separately under those permissions, but the entire Program remains governed
by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any
additional permissions from that copy, or from any part of it. (Additional per-
missions may be written to require their own removal in certain cases when you
modify the work.) You may place additional permissions on material, added by
you to a covered work, for which you have or can give appropriate copyright
permission.
Notwithstanding any other provision of this License, for material you add to a
covered work, you may (if authorized by the copyright holders of that material)
supplement the terms of this License with terms:
* a) Disclaiming warranty or limiting liability differently from the terms of sec-
tions 15 and 16 of this License; or * b) Requiring preservation of specied rea-
sonable legal notices or author attributions in that material or in the Appropriate
Legal Notices displayed by works containing it; or * c) Prohibiting misrepresen-
tation of the origin of that material, or requiring that modied versions of such
material be marked in reasonable ways as different from the original version;
or * d) Limiting the use for publicity purposes of names of licensors or authors
of the material; or * e) Declining to grant rights under trademark law for use
of some trade names, trademarks, or service marks; or * f) Requiring indem-
nication of licensors and authors of that material by anyone who conveys the
material (or modied versions of it) with contractual assumptions of liability to
the recipient, for any liability that these contractual assumptions directly impose
on those licensors and authors.
All other non-permissive additional terms are considered further restrictions
within the meaning of section 10. If the Program as you received it, or any part
of it, contains a notice stating that it is governed by this License along with a
term that is a further restriction, you may remove that term. If a license docu-
ment contains a further restriction but permits relicensing or conveying under
this License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does not survive
such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place,
in the relevant source les, a statement of the additional terms that apply to
those les, or a notice indicating where to nd the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a
separately written license, or stated as exceptions; the above requirements apply
either way. 8. Termination.
You may not propagate or modify a covered work except as expressly provided
under this License. Any attempt otherwise to propagate or modify it is void,
and will automatically terminate your rights under this License (including any
patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a par-
ticular copyright holder is reinstated (a) provisionally, unless and until the copy-
right holder explicitly and nally terminates your license, and (b) permanently,
if the copyright holder fails to notify you of the violation by some reasonable
means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated perma-
nently if the copyright holder noties you of the violation by some reasonable
means, this is the rst time you have received notice of violation of this License
(for any work) from that copyright holder, and you cure the violation prior to
30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of
parties who have received copies or rights from you under this License. If your
rights have been terminated and not permanently reinstated, you do not qualify
to receive new licenses for the same material under section 10. 9. Acceptance
Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy
of the Program. Ancillary propagation of a covered work occurring solely as a
consequence of using peer-to-peer transmission to receive a copy likewise does
not require acceptance. However, nothing other than this License grants you
permission to propagate or modify any covered work. These actions infringe
copyright if you do not accept this License. Therefore, by modifying or prop-
agating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a
license from the original licensors, to run, modify and propagate that work, sub-
ject to this License. You are not responsible for enforcing compliance by third
parties with this License.
An entity transaction is a transaction transferring control of an organization,
or substantially all assets of one, or subdividing an organization, or merging or-
ganizations. If propagation of a covered work results from an entity transaction,
each party to that transaction who receives a copy of the work also receives
whatever licenses to the work the partys predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the Correspond-
ing Source of the work from the predecessor in interest, if the predecessor has
it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted
or afrmed under this License. For example, you may not impose a license fee,
royalty, or other charge for exercise of rights granted under this License, and
you may not initiate litigation (including a cross-claim or counterclaim in a
lawsuit) alleging that any patent claim is infringed by making, using, selling,
offering for sale, or importing the Program or any portion of it. 11. Patents.
A contributor is a copyright holder who authorizes use under this License of
the Program or a work on which the Program is based. The work thus licensed
is called the contributors contributor version.
A contributors essential patent claims are all patent claims owned or con-
trolled by the contributor, whether already acquired or hereafter acquired, that
would be infringed by some manner, permitted by this License, of making, us-
ing, or selling its contributor version, but do not include claims that would be
infringed only as a consequence of further modication of the contributor ver-
sion. For purposes of this denition, control includes the right to grant patent
sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent li-
cense under the contributors essential patent claims, to make, use, sell, offer
for sale, import and otherwise run, modify and propagate the contents of its
contributor version.
In the following three paragraphs, a patent license is any express agreement or
commitment, however denominated, not to enforce a patent (such as an express
permission to practice a patent or covenant not to sue for patent infringement).
To grant such a patent license to a party means to make such an agreement or
commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the
Corresponding Source of the work is not available for anyone to copy, free of
charge and under the terms of this License, through a publicly available net-
work server or other readily accessible means, then you must either (1) cause
the Corresponding Source to be so available, or (2) arrange to deprive yourself
of the benet of the patent license for this particular work, or (3) arrange, in a
manner consistent with the requirements of this License, to extend the patent
license to downstream recipients. Knowingly relying means you have actual
knowledge that, but for the patent license, your conveying the covered work in a
country, or your recipients use of the covered work in a country, would infringe
one or more identiable patents in that country that you have reason to believe
are valid.
If, pursuant to or in connection with a single transaction or arrangement, you
convey, or propagate by procuring conveyance of, a covered work, and grant
a patent license to some of the parties receiving the covered work authorizing
them to use, propagate, modify or convey a specic copy of the covered work,
then the patent license you grant is automatically extended to all recipients of
the covered work and works based on it.
A patent license is discriminatory if it does not include within the scope of its
coverage, prohibits the exercise of, or is conditioned on the non-exercise of one
or more of the rights that are specically granted under this License. You may
not convey a covered work if you are a party to an arrangement with a third party
that is in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying the work,
and under which the third party grants, to any of the parties who would receive
the covered work from you, a discriminatory patent license (a) in connection
with copies of the covered work conveyed by you (or copies made from those
copies), or (b) primarily for and in connection with specic products or compi-
lations that contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied
license or other defenses to infringement that may otherwise be available to you
under applicable patent law. 12. No Surrender of Others Freedom.
If conditions are imposed on you (whether by court order, agreement or other-
wise) that contradict the conditions of this License, they do not excuse you from
the conditions of this License. If you cannot convey a covered work so as to sat-
isfy simultaneously your obligations under this License and any other pertinent
obligations, then as a consequence you may not convey it at all. For example,
if you agree to terms that obligate you to collect a royalty for further conveying
from those to whom you convey the Program, the only way you could satisfy
both those terms and this License would be to refrain entirely from conveying
the Program. 13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to
link or combine any covered work with a work licensed under version 3 of the
GNU Affero General Public License into a single combined work, and to con-
vey the resulting work. The terms of this License will continue to apply to the
part which is the covered work, but the special requirements of the GNU Affero
General Public License, section 13, concerning interaction through a network
will apply to the combination as such. 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the
GNU General Public License from time to time. Such new versions will be
similar in spirit to the present version, but may differ in detail to address new
problems or concerns.
Each version is given a distinguishing version number. If the Program species
that a certain numbered version of the GNU General Public License or any
later version applies to it, you have the option of following the terms and con-
ditions either of that numbered version or of any later version published by the
Free Software Foundation. If the Program does not specify a version number of
the GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program species that a proxy can decide which future versions of the
GNU General Public License can be used, that proxys public statement of ac-
ceptance of a version permanently authorizes you to choose that version for the
Program.
Later license versions may give you additional or different permissions. How-
ever, no additional obligations are imposed on any author or copyright holder as
a result of your choosing to follow a later version. 15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PER-
MITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED
IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM AS IS WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIM-
ITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO
THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE
COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16.
Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED
TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER
PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PER-
MITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAM-
AGES ARISING OUT OF THE USE OR INABILITY TO USE THE PRO-
GRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
BEINGRENDEREDINACCURATE ORLOSSES SUSTAINEDBYYOUOR
THIRDPARTIES ORAFAILURE OF THE PROGRAMTOOPERATE WITH
ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17.
Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot
be given local legal effect according to their terms, reviewing courts shall apply
local law that most closely approximates an absolute waiver of all civil liability
in connection with the Program, unless a warranty or assumption of liability
accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS How to Apply These Terms to Your
New Programs
If you develop a new program, and you want it to be of the greatest possible
use to the public, the best way to achieve this is to make it free software which
everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them
to the start of each source le to most effectively state the exclusion of warranty;
240
GNU Free Documentation License
and each le should have at least the copyright line and a pointer to where the
full notice is found.
<one line to give the programs name and a brief idea of what it does.> Copy-
right (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Soft-
ware Foundation, either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABIL-
ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this
when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author> This program comes with
ABSOLUTELY NO WARRANTY; for details type show w. This is free soft-
ware, and you are welcome to redistribute it under certain conditions; type
show c for details.
The hypothetical commands show w and show c should show the appropri-
ate parts of the General Public License. Of course, your programs commands
might be different; for a GUI interface, you would use an about box.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a copyright disclaimer for the program, if necessary. For
more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you may con-
sider it more useful to permit linking proprietary applications with the library. If
this is what you want to do, use the GNU Lesser General Public License instead
of this License. But rst, please read <http://www.gnu.org/philosophy/why-not-
lgpl.html>.
16.5. GNU Free Documentation License
Version 1.3, 3 November 2008
Copyright 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
<http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed. 0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other functional
and useful document "free" in the sense of freedom: to assure everyone the ef-
fective freedom to copy and redistribute it, with or without modifying it, either
commercially or noncommercially. Secondarily, this License preserves for the
author and publisher a way to get credit for their work, while not being consid-
ered responsible for modications made by others.
This License is a kind of "copyleft", which means that derivative works of the
document must themselves be free in the same sense. It complements the GNU
General Public License, which is a copyleft license designed for free software.
We have designed this License in order to use it for manuals for free software,
because free software needs free documentation: a free program should come
with manuals providing the same freedoms that the software does. But this Li-
cense is not limited to software manuals; it can be used for any textual work,
regardless of subject matter or whether it is published as a printed book. We
recommend this License principally for works whose purpose is instruction or
reference. 1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that contains
a notice placed by the copyright holder saying it can be distributed under the
terms of this License. Such a notice grants a world-wide, royalty-free license,
unlimited in duration, to use that work under the conditions stated herein. The
"Document", below, refers to any such manual or work. Any member of the
public is a licensee, and is addressed as "you". You accept the license if you
copy, modify or distribute the work in a way requiring permission under copy-
right law.
A "Modied Version" of the Document means any work containing the Doc-
ument or a portion of it, either copied verbatim, or with modications and/or
translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of the
Document that deals exclusively with the relationship of the publishers or au-
thors of the Document to the Documents overall subject (or to related matters)
and contains nothing that could fall directly within that overall subject. (Thus,
if the Document is in part a textbook of mathematics, a Secondary Section may
not explain any mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal, commercial,
philosophical, ethical or political position regarding them.
The "Invariant Sections" are certain Secondary Sections whose titles are des-
ignated, as being those of Invariant Sections, in the notice that says that the
Document is released under this License. If a section does not t the above
denition of Secondary then it is not allowed to be designated as Invariant. The
Document may contain zero Invariant Sections. If the Document does not iden-
tify any Invariant Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed, as Front-
Cover Texts or Back-Cover Texts, in the notice that says that the Document is
released under this License. A Front-Cover Text may be at most 5 words, and a
Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy, repre-
sented in a format whose specication is available to the general public, that is
suitable for revising the document straightforwardly with generic text editors or
(for images composed of pixels) generic paint programs or (for drawings) some
widely available drawing editor, and that is suitable for input to text formatters
or for automatic translation to a variety of formats suitable for input to text for-
matters. A copy made in an otherwise Transparent le format whose markup,
or absence of markup, has been arranged to thwart or discourage subsequent
modication by readers is not Transparent. An image format is not Transparent
if used for any substantial amount of text. A copy that is not "Transparent" is
called "Opaque".
Examples of suitable formats for Transparent copies include plain ASCII with-
out markup, Texinfo input format, LaTeX input format, SGML or XML using a
publicly available DTD, and standard-conforming simple HTML, PostScript or
PDF designed for human modication. Examples of transparent image formats
include PNG, XCF and JPG. Opaque formats include proprietary formats that
can be read and edited only by proprietary word processors, SGML or XML
for which the DTD and/or processing tools are not generally available, and the
machine-generated HTML, PostScript or PDF produced by some word proces-
sors for output purposes only.
The "Title Page" means, for a printed book, the title page itself, plus such fol-
lowing pages as are needed to hold, legibly, the material this License requires to
appear in the title page. For works in formats which do not have any title page
as such, "Title Page" means the text near the most prominent appearance of the
works title, preceding the beginning of the body of the text.
The "publisher" means any person or entity that distributes copies of the Docu-
ment to the public.
A section "Entitled XYZ" means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following text
that translates XYZ in another language. (Here XYZ stands for a specic sec-
tion name mentioned below, such as "Acknowledgements", "Dedications", "En-
dorsements", or "History".) To "Preserve the Title" of such a section when you
modify the Document means that it remains a section "Entitled XYZ" according
to this denition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty Disclaimers
are considered to be included by reference in this License, but only as regards
disclaiming warranties: any other implication that these Warranty Disclaimers
may have is void and has no effect on the meaning of this License. 2. VERBA-
TIM COPYING
You may copy and distribute the Document in any medium, either commercially
or noncommercially, provided that this License, the copyright notices, and the
license notice saying this License applies to the Document are reproduced in
all copies, and that you add no other conditions whatsoever to those of this Li-
cense. You may not use technical measures to obstruct or control the reading or
further copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough number
of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and you may
publicly display copies. 3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have printed
covers) of the Document, numbering more than 100, and the Documents li-
cense notice requires Cover Texts, you must enclose the copies in covers that
carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front
cover, and Back-Cover Texts on the back cover. Both covers must also clearly
and legibly identify you as the publisher of these copies. The front cover must
present the full title with all words of the title equally prominent and visible.
You may add other material on the covers in addition. Copying with changes
limited to the covers, as long as they preserve the title of the Document and
satisfy these conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to t legibly, you should
put the rst ones listed (as many as t reasonably) on the actual cover, and con-
tinue the rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more
than 100, you must either include a machine-readable Transparent copy along
with each Opaque copy, or state in or with each Opaque copy a computer-
network location from which the general network-using public has access to
download using public-standard network protocols a complete Transparent copy
of the Document, free of added material. If you use the latter option, you must
take reasonably prudent steps, when you begin distribution of Opaque copies in
quantity, to ensure that this Transparent copy will remain thus accessible at the
stated location until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of the Document
well before redistributing any large number of copies, to give them a chance to
provide you with an updated version of the Document. 4. MODIFICATIONS
You may copy and distribute a Modied Version of the Document under the
conditions of sections 2 and 3 above, provided that you release the Modied
Version under precisely this License, with the Modied Version lling the role
of the Document, thus licensing distribution and modication of the Modied
Version to whoever possesses a copy of it. In addition, you must do these things
in the Modied Version:
* A. Use in the Title Page (and on the covers, if any) a title distinct from that
of the Document, and from those of previous versions (which should, if there
were any, be listed in the History section of the Document). You may use the
same title as a previous version if the original publisher of that version gives
permission. * B. List on the Title Page, as authors, one or more persons or
entities responsible for authorship of the modications in the Modied Version,
together with at least ve of the principal authors of the Document (all of its
principal authors, if it has fewer than ve), unless they release you from this
requirement. * C. State on the Title page the name of the publisher of the
Modied Version, as the publisher. * D. Preserve all the copyright notices of
the Document. * E. Add an appropriate copyright notice for your modica-
tions adjacent to the other copyright notices. * F. Include, immediately after
the copyright notices, a license notice giving the public permission to use the
Modied Version under the terms of this License, in the form shown in the Ad-
dendum below. * G. Preserve in that license notice the full lists of Invariant
Sections and required Cover Texts given in the Documents license notice. *
H. Include an unaltered copy of this License. * I. Preserve the section Entitled
"History", Preserve its Title, and add to it an item stating at least the title, year,
new authors, and publisher of the Modied Version as given on the Title Page.
If there is no section Entitled "History" in the Document, create one stating the
title, year, authors, and publisher of the Document as given on its Title Page,
then add an item describing the Modied Version as stated in the previous sen-
tence. * J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise the network
locations given in the Document for previous versions it was based on. These
may be placed in the "History" section. You may omit a network location for
a work that was published at least four years before the Document itself, or if
the original publisher of the version it refers to gives permission. * K. For any
section Entitled "Acknowledgements" or "Dedications", Preserve the Title of
the section, and preserve in the section all the substance and tone of each of the
contributor acknowledgements and/or dedications given therein. * L. Preserve
all the Invariant Sections of the Document, unaltered in their text and in their
titles. Section numbers or the equivalent are not considered part of the section
titles. * M. Delete any section Entitled "Endorsements". Such a section may
not be included in the Modied Version. * N. Do not retitle any existing section
to be Entitled "Endorsements" or to conict in title with any Invariant Section.
* O. Preserve any Warranty Disclaimers.
If the Modied Version includes new front-matter sections or appendices that
qualify as Secondary Sections and contain no material copied from the Docu-
ment, you may at your option designate some or all of these sections as invari-
ant. To do this, add their titles to the list of Invariant Sections in the Modied
Versions license notice. These titles must be distinct from any other section
titles.
You may add a section Entitled "Endorsements", provided it contains nothing
but endorsements of your Modied Version by various partiesfor example,
statements of peer review or that the text has been approved by an organization
as the authoritative denition of a standard.
You may add a passage of up to ve words as a Front-Cover Text, and a pas-
sage of up to 25 words as a Back-Cover Text, to the end of the list of Cover
Texts in the Modied Version. Only one passage of Front-Cover Text and one
of Back-Cover Text may be added by (or through arrangements made by) any
one entity. If the Document already includes a cover text for the same cover,
previously added by you or by arrangement made by the same entity you are
acting on behalf of, you may not add another; but you may replace the old one,
on explicit permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License give per-
mission to use their names for publicity for or to assert or imply endorsement
of any Modied Version. 5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this Li-
cense, under the terms dened in section 4 above for modied versions, pro-
vided that you include in the combination all of the Invariant Sections of all of
the original documents, unmodied, and list them all as Invariant Sections of
your combined work in its license notice, and that you preserve all their War-
ranty Disclaimers.
The combined work need only contain one copy of this License, and multiple
identical Invariant Sections may be replaced with a single copy. If there are
multiple Invariant Sections with the same name but different contents, make
the title of each such section unique by adding at the end of it, in parentheses,
the name of the original author or publisher of that section if known, or else
a unique number. Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled "History" in the
various original documents, forming one section Entitled "History"; likewise
combine any sections Entitled "Acknowledgements", and any sections Entitled
"Dedications". You must delete all sections Entitled "Endorsements". 6. COL-
LECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this License
in the various documents with a single copy that is included in the collection,
provided that you follow the rules of this License for verbatim copying of each
of the documents in all other respects.
You may extract a single document from such a collection, and distribute it indi-
vidually under this License, provided you insert a copy of this License into the
extracted document, and follow this License in all other respects regarding ver-
batim copying of that document. 7. AGGREGATION WITH INDEPENDENT
WORKS
A compilation of the Document or its derivatives with other separate and in-
dependent documents or works, in or on a volume of a storage or distribution
medium, is called an "aggregate" if the copyright resulting from the compila-
tion is not used to limit the legal rights of the compilations users beyond what
the individual works permit. When the Document is included in an aggregate,
this License does not apply to the other works in the aggregate which are not
themselves derivative works of the Document.
241
Licenses
If the Cover Text requirement of section 3 is applicable to these copies of the
Document, then if the Document is less than one half of the entire aggregate, the
Documents Cover Texts may be placed on covers that bracket the Document
within the aggregate, or the electronic equivalent of covers if the Document is
in electronic form. Otherwise they must appear on printed covers that bracket
the whole aggregate. 8. TRANSLATION
Translation is considered a kind of modication, so you may distribute transla-
tions of the Document under the terms of section 4. Replacing Invariant Sec-
tions with translations requires special permission from their copyright holders,
but you may include translations of some or all Invariant Sections in addition to
the original versions of these Invariant Sections. You may include a translation
of this License, and all the license notices in the Document, and any Warranty
Disclaimers, provided that you also include the original English version of this
License and the original versions of those notices and disclaimers. In case of a
disagreement between the translation and the original version of this License or
a notice or disclaimer, the original version will prevail.
If a section in the Document is Entitled "Acknowledgements", "Dedications",
or "History", the requirement (section 4) to Preserve its Title (section 1) will
typically require changing the actual title. 9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as
expressly provided under this License. Any attempt otherwise to copy, modify,
sublicense, or distribute it is void, and will automatically terminate your rights
under this License.
However, if you cease all violation of this License, then your license from a par-
ticular copyright holder is reinstated (a) provisionally, unless and until the copy-
right holder explicitly and nally terminates your license, and (b) permanently,
if the copyright holder fails to notify you of the violation by some reasonable
means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated perma-
nently if the copyright holder noties you of the violation by some reasonable
means, this is the rst time you have received notice of violation of this License
(for any work) from that copyright holder, and you cure the violation prior to
30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of
parties who have received copies or rights from you under this License. If your
rights have been terminated and not permanently reinstated, receipt of a copy
of some or all of the same material does not give you any rights to use it. 10.
FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of the GNU
Free Documentation License from time to time. Such new versions will be
similar in spirit to the present version, but may differ in detail to address new
problems or concerns. See http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number. If the
Document species that a particular numbered version of this License "or any
later version" applies to it, you have the option of following the terms and con-
ditions either of that specied version or of any later version that has been pub-
lished (not as a draft) by the Free Software Foundation. If the Document does
not specify a version number of this License, you may choose any version ever
published (not as a draft) by the Free Software Foundation. If the Document
species that a proxy can decide which future versions of this License can be
used, that proxys public statement of acceptance of a version permanently au-
thorizes you to choose that version for the Document. 11. RELICENSING
"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World
Wide Web server that publishes copyrightable works and also provides promi-
nent facilities for anybody to edit those works. A public wiki that anybody can
edit is an example of such a server. A "Massive Multiauthor Collaboration"
(or "MMC") contained in the site means any set of copyrightable works thus
published on the MMC site.
"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license
published by Creative Commons Corporation, a not-for-prot corporation with
a principal place of business in San Francisco, California, as well as future
copyleft versions of that license published by that same organization.
"Incorporate" means to publish or republish a Document, in whole or in part, as
part of another Document.
An MMC is "eligible for relicensing" if it is licensed under this License, and
if all works that were rst published under this License somewhere other than
this MMC, and subsequently incorporated in whole or in part into the MMC,
(1) had no cover texts or invariant sections, and (2) were thus incorporated prior
to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the site un-
der CC-BY-SA on the same site at any time before August 1, 2009, provided
the MMC is eligible for relicensing. ADDENDUM: How to use this License
for your documents
To use this License in a document you have written, include a copy of the Li-
cense in the document and put the following copyright and license notices just
after the title page:
Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute
and/or modify this document under the terms of the GNU Free Documentation
License, Version 1.3 or any later version published by the Free Software Foun-
dation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled "GNU Free Doc-
umentation License".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, re-
place the "with . . . Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover
Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other combination
of the three, merge those two alternatives to suit the situation.
If your document contains nontrivial examples of programcode, we recommend
releasing these examples in parallel under your choice of free software license,
such as the GNU General Public License, to permit their use in free software.
16.6. GNU Lesser General Public License
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates the terms
and conditions of version 3 of the GNU General Public License, supplemented
by the additional permissions listed below. 0. Additional Denitions.
As used herein, this License refers to version 3 of the GNU Lesser General
Public License, and the GNU GPL refers to version 3 of the GNU General
Public License.
The Library refers to a covered work governed by this License, other than an
Application or a Combined Work as dened below.
An Application is any work that makes use of an interface provided by the
Library, but which is not otherwise based on the Library. Dening a subclass of
a class dened by the Library is deemed a mode of using an interface provided
by the Library.
A Combined Work is a work produced by combining or linking an Appli-
cation with the Library. The particular version of the Library with which the
Combined Work was made is also called the Linked Version.
The Minimal Corresponding Source for a Combined Work means the Corre-
sponding Source for the Combined Work, excluding any source code for por-
tions of the Combined Work that, considered in isolation, are based on the Ap-
plication, and not on the Linked Version.
The Corresponding Application Code for a Combined Work means the object
code and/or source code for the Application, including any data and utility pro-
grams needed for reproducing the Combined Work from the Application, but
excluding the System Libraries of the Combined Work. 1. Exception to Section
3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License without
being bound by section 3 of the GNU GPL. 2. Conveying Modied Versions.
If you modify a copy of the Library, and, in your modications, a facility refers
to a function or data to be supplied by an Application that uses the facility (other
than as an argument passed when the facility is invoked), then you may convey
a copy of the modied version:
* a) under this License, provided that you make a good faith effort to ensure that,
in the event an Application does not supply the function or data, the facility still
operates, and performs whatever part of its purpose remains meaningful, or * b)
under the GNU GPL, with none of the additional permissions of this License
applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a header
le that is part of the Library. You may convey such object code under terms of
your choice, provided that, if the incorporated material is not limited to numer-
ical parameters, data structure layouts and accessors, or small macros, inline
functions and templates (ten or fewer lines in length), you do both of the follow-
ing:
* a) Give prominent notice with each copy of the object code that the Library
is used in it and that the Library and its use are covered by this License. *
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken to-
gether, effectively do not restrict modication of the portions of the Library
contained in the Combined Work and reverse engineering for debugging such
modications, if you also do each of the following:
* a) Give prominent notice with each copy of the Combined Work that the Li-
brary is used in it and that the Library and its use are covered by this License.
* b) Accompany the Combined Work with a copy of the GNU GPL and this
license document. * c) For a Combined Work that displays copyright notices
during execution, include the copyright notice for the Library among these no-
tices, as well as a reference directing the user to the copies of the GNU GPL and
this license document. * d) Do one of the following: o 0) Convey the Minimal
Corresponding Source under the terms of this License, and the Corresponding
Application Code in a form suitable for, and under terms that permit, the user to
recombine or relink the Application with a modied version of the Linked Ver-
sion to produce a modied Combined Work, in the manner specied by section
6 of the GNU GPL for conveying Corresponding Source. o 1) Use a suitable
shared library mechanism for linking with the Library. A suitable mechanism
is one that (a) uses at run time a copy of the Library already present on the
users computer system, and (b) will operate properly with a modied version
of the Library that is interface-compatible with the Linked Version. * e) Pro-
vide Installation Information, but only if you would otherwise be required to
provide such information under section 6 of the GNU GPL, and only to the ex-
tent that such information is necessary to install and execute a modied version
of the Combined Work produced by recombining or relinking the Application
with a modied version of the Linked Version. (If you use option 4d0, the In-
stallation Information must accompany the Minimal Corresponding Source and
Corresponding Application Code. If you use option 4d1, you must provide the
Installation Information in the manner specied by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the Library side by side
in a single library together with other library facilities that are not Applications
and are not covered by this License, and convey such a combined library under
terms of your choice, if you do both of the following:
* a) Accompany the combined library with a copy of the same work based on
the Library, uncombined with any other library facilities, conveyed under the
terms of this License. * b) Give prominent notice with the combined library
that part of it is a work based on the Library, and explaining where to nd the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions of the
GNU Lesser General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to address new
problems or concerns.
Each version is given a distinguishing version number. If the Library as you
received it species that a certain numbered version of the GNU Lesser Gen-
eral Public License or any later version applies to it, you have the option of
following the terms and conditions either of that published version or of any
later version published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser General Pub-
lic License, you may choose any version of the GNU Lesser General Public
License ever published by the Free Software Foundation.
If the Library as you received it species that a proxy can decide whether future
versions of the GNU Lesser General Public License shall apply, that proxys
public statement of acceptance of any version is permanent authorization for
you to choose that version for the Library.
242

Anda mungkin juga menyukai