D50311GC11 sg2
D50311GC11 sg2
D50311GC11 sg2
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
Oracle Database
@ sic de11g: nt RAC
e r de Stu
Administration
v i lav e this
ic i o_ Volume
o usII • Student Guide
r
ab nse t
( f
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
D50311GC11
Edition 1.1
September 2008
D56242
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Author Copyright © 2008, Oracle. All rights reserved.
lav e this
names may be trademarks of their respective owners.
Roderick Manalac
v i
Sabiha Miri
ic i o_ o us
Philip Newlan
( f a br se t
Roman Niehoff
r d e licen
Erik Peterson
V e ble
Stefan Pommerenk
V a
il fera
r i c i rans
MarshalloPresser
FabSrinivas
Rick Pulliam
o n -t
n Putrevu
Roy Rossebo
Ira Singer
Linda Smalley
Ranbir Singh
Harald van Breederode
Michael Zoll
Editors
Raj Kumar
Richard Wallis
Nita Pavitran
Amitha Narayan
Graphic Designer
Satish Bettegowda
Publishers
Nita Brozowski
Unauthorized
Veenareproduction
Narasimhan or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Contents
I Introduction
Overview I-2
Course Objectives I-3
Typical Schedule I-4
A History of Innovation I-5
What Is a Cluster? I-6
Oracle Real Application Clusters I-7
s a
Benefits of Using RAC I-8
)h a
Clusters and Scalability I-9
m ฺbr
Levels of Scalability I-10 i ฺ c o deฺ
Scaleup and Speedup I-11 r e d Gui
Speedup/Scaleup and Workloads I-12 @ sic dent
I/O Throughput Balanced: Example I-13
e r de Stu
i lav e this
Performance of Typical Components I-14
v
i o_ o us
Complete Integrated Clusterware I-15
ic
( f abr nse t
Necessity of Global Resources I-16
rde le lice
Global Resources Coordination I-17
e
l a V ab
Global Cache Coordination: Example I-18
i
V sfer
Write to Disk Coordination: Example I-19
i o
ic -tran
Dynamic Reconfiguration I-20
b r
Fa non Object Affinity and Dynamic Remastering I-21
Global Dynamic Performance Views I-22
Additional Memory Requirement for RAC I-23
Efficient Internode Row-Level Locking I-24
Parallel Execution with RAC I-25
RAC Software Principles I-26
RAC Software Storage Principles I-27
RAC Database Storage Principles I-28
RAC and Shared Storage Technologies I-29
Oracle Cluster File System I-31
Automatic Storage Management I-32
CFS or Raw? I-33
Typical Cluster Stack with RAC I-34
RAC Certification Matrix I-35
iii
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
RAC and Services I-36
Available Demonstrations I-37
ic i o_ o us
Linux Operating System Parameters 1-20
Cluster Setup Tasks 1-22
( f abr nse t
Verifying Cluster Setup with cluvfy 1-23
e rde le lice
Installing Oracle Clusterware 1-24
l a V ab
i
V sfer
Specifying the Inventory Directory 1-25
i o
ic -tran
Specify Home Details 1-26
b r
Fa nonProduct-Specific Prerequisite Checks 1-27
Cluster Configuration 1-28
Private Interconnect Enforcement 1-29
Oracle Cluster Registry File 1-30
Voting Disk File 1-31
Summary and Install 1-32
Run Configuration Scripts on All Nodes 1-33
End of Installation 1-34
Verifying the Oracle Clusterware Installation 1-35
Summary 1-37
Practice 1: Overview 1-38
iv
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Install Location 2-5
Hardware Cluster Installation Mode 2-6
Product-Specific Prerequisite Checks 2-7
Select Configuration Option 2-8
Privileged Operating System Groups 2-9
Summary 2-10
Execute Configuration Scripts 2-11
End of Installation 2-12
ASM Configuration 2-13
Creating ASM Disk Groups 2-17
Select a Product to Install 2-19
Select Installation Type 2-20
s a
Install Location 2-21
)h a
Specify Cluster Installation 2-22
m ฺbr
Products Prerequisite Check 2-23
i ฺ c o deฺ
Select Configuration Option 2-24
r e d Gui
Privileged Operating System Groups 2-25
@ sic dent
Check Summary 2-26
e r de Stu
root.sh Script 2-27
v i lav e this
ic i o_ o us
Required Tasks Prior to Database Creation 2-28
e rde le lice
Practice 2: Overview 2-32
l a V ab
i
V Database f er Creation
i
3 o RAC
ic Objectives s
an 3-2
b r - t r
Fa non Management Agent Installation: Specify Installation Type 3-3
Specify Installation Location 3-4
Specify Cluster Installation Mode 3-5
Prerequisite Check and OMS Location 3-6
Agent Registration Password 3-7
Management Agent Installation Finish 3-8
Executing the root.sh Script 3-9
Creating the Cluster Database 3-10
Node Selection 3-11
Select Database Type 3-12
Database Identification 3-13
Cluster Database Management Method 3-14
Passwords for Database Schema Owners 3-15
Storage Options for Database Files 3-16
ASM Disk Groups 3-18
v
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Database File Locations 3-19
Recovery Configuration 3-20
Database Content 3-21
Initialization Parameters 3-22
Security Settings and Maintenance Tasks 3-23
Database Storage Options 3-24
Create the Database 3-25
Monitor Progress 3-26
Postinstallation Tasks 3-27
Check Managed Targets 3-28
Single Instance to RAC Conversion 3-29
Single-Instance Conversion Using the DBCA 3-30
s a
Conversion Steps 3-31
)h a
Single-Instance Conversion Using rconfig 3-34
m ฺbr
Single-Instance Conversion Using Grid Control 3-36
i ฺ c o deฺ
Summary 3-38 r e d Gui
Practice 3: Overview 3-39
@ sic dent
e r de Stu
4 RAC Database Administration
v i lav e this
Objectives 4-2
ic i o_ o us
Cluster Database Home Page b4-3
a r et
Cluster Database Instance e ( f
Home Page ns 4-5
d li c e
r lAdministration
Cluster Database e Instance e Page 4-6
a V a b
Cluster Home
V il Pagefer4-7
The
i o a s
ciConfiguration
n Section 4-8
b r t r
- Viewer 4-10
Fa Topology
non
Enterprise Manager Alerts and RAC 4-11
Enterprise Manager Metrics and RAC 4-12
Enterprise Manager Alert History and RAC 4-14
Enterprise Manager Blackouts and RAC 4-15
Redo Log Files and RAC 4-16
Automatic Undo Management and RAC 4-17
Starting and Stopping RAC Instances 4-18
Starting and Stopping RAC Instances with SQL*Plus 4-19
Starting and Stopping RAC Instances with SRVCTL 4-20
Switch Between the Automatic and Manual Policies 4-21
RAC Initialization Parameter Files 4-22
SPFILE Parameter Values and RAC 4-23
EM and SPFILE Parameter Values 4-24
RAC Initialization Parameters 4-26
Parameters That Require Identical Settings 4-28
vi
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Parameters That Require Unique Settings 4-29
Quiescing RAC Databases 4-30
Terminating Sessions on a Specific Instance 4-31
How SQL*Plus Commands Affect Instances 4-32
Transparent Data Encryption and Wallets in RAC 4-33
ASM: General Architecture 4-34
ASM Instance and Crash Recovery in RAC 4-36
ASM Instance Initialization Parameters and RAC 4-37
ASM and SRVCTL with RAC 4-38
ASM and SRVCTL with RAC: Examples 4-39
ASM Disk Groups with EM in RAC 4-40
Disk Group Performance Page and RAC 4-41 a
Summary 4-42 as
Practice 4: Overview 4-43
)h
ฺbr
c m
o deฺ
i ฺ
d Gui
5 Managing Backup and Recovery in RAC r e
Objectives 5-2
@ sic dent
Protecting Against Media Failure 5-3
e r de Stu
Archived Log File Configurations 5-4
v i lav e this
RAC and the Flash RecoveryiArea
ic o_ 5-5 o us
r t
(fab Settings
RAC Backup and Recovery Using EM 5-6
Configure RAC e Recovery e n se with EM 5-7
e
Archived Redo e ic
rdFilelConventions
l in RAC 5-8
a V b
V il RAC
Configure
f e raBackup Settings with EM 5-9
o
ici Oracle a s
nRecovery Manager 5-10
b r - t r
Fa nonConfigure RMAN Snapshot Control File Location 5-11
Configure Control File and SPFILE Autobackup 5-12
Crosschecking on Multiple RAC Clusters Nodes 5-13
Channel Connections to Cluster Instances 5-14
RMAN Channel Support for the Grid 5-15
RMAN Default Autolocation 5-16
Distribution of Backups 5-17
One Local Drive CFS Backup Scheme 5-18
Multiple Drives CFS Backup Scheme 5-19
Non-CFS Backup Scheme 5-20
Restoring and Recovering 5-21
Summary 5-22
Practice 5: Overview 5-23
vii
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
6 RAC Performance Tuning
Objectives 6-2
CPU and Wait Time Tuning Dimensions 6-3
RAC-Specific Tuning 6-4
RAC and Instance or Crash Recovery 6-5
Instance Recovery and Database Availability 6-7
Instance Recovery and RAC 6-8
Analyzing Cache Fusion Impact in RAC 6-10
Typical Latencies for RAC Operations 6-11
Wait Events for RAC 6-12
Wait Event Views 6-13
Global Cache Wait Events: Overview 6-14 a
2-way Block Request: Example 6-16 as
3-way Block Request: Example 6-17 ฺbr )h
2-way Grant: Example 6-18 c m
o deฺ
i ฺ
d Gui
Global Enqueue Waits: Overview 6-19 r e
Session and System Statistics 6-20
@ sic dent
Most Common RAC Tuning Tips 6-21
e r de Stu
v i lav e this
Index Block Contention: Considerations 6-23
ic i o_ o us
Oracle Sequences and Index Contention 6-24
( f abr nse t
Undo Block Considerations 6-25
rde le lice
High-Water Mark Considerations 6-26
e
Concurrent Cross-Instance Calls: Considerations 6-27
V ab
i l a
V sfer
Monitoring RAC Database and Cluster Performance 6-28
i o
ic -tran
Cluster Database Performance Page 6-29
b r
Fa nonDetermining Cluster Host Load Average 6-30
Determining Global Cache Block Access Latency 6-31
Determining Average Active Sessions 6-32
Determining Database Throughput 6-33
Accessing the Cluster Cache Coherency Page 6-35
Viewing Cluster Interconnects Page 6-37
Viewing the Database Locks Page 6-39
AWR Snapshots in RAC 6-40
AWR Reports and RAC: Overview 6-41
Automatic Database Diagnostic Monitor for RAC 6-43
What Does ADDM Diagnose for RAC? 6-45
EM Support for ADDM for RAC 6-46
Summary 6-47
Practice 6: Overview 6-48
viii
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
7 Services
Objectives 7-2
Traditional Workload Dispatching 7-3
Grid Workload Dispatching 7-4
Data Warehouse: Example 7-5
RAC and Data Warehouse: An Optimal Solution 7-6
Next Step 7-7
What Is a Service? 7-8
High Availability of Services in RAC 7-9
Possible Service Configuration with RAC 7-10
Service Attributes 7-11
Service Types 7-12 a
Service Goodness 7-13 as
Create Services with Enterprise Manager 7-14 ฺbr )h
Create Services with SRVCTL 7-15 c m
o deฺ
i ฺ
d Gui
Preferred and Available Instances 7-16 r e
sic dent
Modify Services with the DBMS_SERVICE Package 7-17
@
Everything Switches to Services 7-18
e r de Stu
v i lav e this
Use Services with Client Applications 7-19
ic i o_ o us
Use Services with the Resource Manager 7-20
( f abr nse t
Services and Resource Manager with EM 7-21
Services and the Resource Manager: Example 7-22
e rde le lice
Use Services with the Scheduler 7-23
l a V ab
i
V sfer
Services and the Scheduler with EM 7-24
i o
ic -tran
Services and the Scheduler: Example 7-26
b r
Fa non Use Services with Parallel Operations 7-27
Use Services with Metric Thresholds 7-28
Change Service Thresholds by Using EM 7-29
Services and Metric Thresholds: Example 7-30
Service Aggregation and Tracing 7-31
Top Services Performance Page 7-32
Service Aggregation Configuration 7-33
Service Aggregation: Example 7-34
trcsess Utility 7-35
Service Performance Views 7-36
Generalized Trace Enabling 7-37
Manage Services 7-38
Manage Services with Enterprise Manager 7-40
Manage Services with EM 7-41
Manage Services: Example 7-42
Manage Services: Scenario 7-43
ix
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Using Distributed Transactions with RAC 7-44
Restricted Session and Services 7-46
Summary 7-47
Practice 7: Overview 7-48
ic i o_ o us
Server-Side Callout Parse: Example 8-15
( f abr nse t
Server-Side Callout Filter: Example 8-16
Configuring the Server-Side ONS 8-17
e rde le lice
Optionally Configure the Client-Side ONS 8-18
l a V ab
i
V sfer
JDBC Fast Connection Failover: Overview 8-19
i o
ic -tran
Using Oracle Streams Advanced Queuing for FAN 8-20
b r
Fa nonJDBC/ODP.NET FCF Benefits 8-21
Load Balancing Advisory 8-22
JDBC/ODP.NET Runtime Connection Load Balancing: Overview 8-23
Connection Load Balancing in RAC 8-24
Load Balancing Advisory: Summary 8-25
Monitor LBA FAN Events 8-26
FAN Release Map 8-27
Transparent Application Failover: Overview 8-28
TAF Basic Configuration Without FAN: Example 8-29
TAF Basic Configuration with FAN: Example 8-30
TAF Preconnect Configuration: Example 8-31
TAF Verification 8-32
FAN Connection Pools and TAF Considerations 8-33
Summary 8-34
Practice 8: Overview 8-35
x
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
9 Oracle Clusterware Administration
Objectives 9-2
Oracle Clusterware: Overview 9-3
Oracle Clusterware Run-Time View 9-4
Manually Control Oracle Clusterware Stack 9-6
CRS Resources 9-7
RAC Resources 9-8
Resource Attributes: Example 9-9
Main Voting Disk Function 9-11
Important CSS Parameters 9-13
Multiplexing Voting Disks 9-14
Change Voting Disk Configuration 9-15 a
Back Up and Recover Your Voting Disks 9-16 as
OCR Architecture 9-17 ฺbr )h
OCR Contents and Organization 9-19 c m
o deฺ
i ฺ
d Gui
Managing OCR Files and Locations: Overview 9-20
r e
Automatic OCR Backups 9-21
@ sic dent
Back Up OCR Manually 9-22
e r de Stu
v i lav e this
Recover OCR Using Physical Backups 9-23
ic i o_ o us
Recover OCR Using Logical Backups 9-24
( f abr nse t
Replace an OCR Mirror: Example 9-25
Repair OCR Configuration: Example 9-26
e rde le lice
OCR Considerations 9-27
l a V ab
i
V sfer
Change VIP Addresses 9-28
i o
ic -tran
Change Public/Interconnect IP Subnet Configuration: Example 9-30
b r
Fa non Third-Party Application Protection: Overview 9-31
Application VIP and RAC VIP Differences 9-32
Use CRS Framework: Overview 9-33
Use CRS Framework: Example 9-35
Summary 9-38
Practice 9: Overview 9-39
xi
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Cluster Verify Locations 10-10
Cluster Verify Configuration File 10-11
Cluster Verify: Examples 10-13
Cluster Verify Output: Example 10-15
Summary 10-16
Practice 10: Overview 10-17
ic i o_ o us
Add an Instance to Your RAC Database Using EM 11-18
( f abr nse t
Main Steps to Delete a Node from a RAC Cluster 11-21
Delete the Instance on the Node to Be Deleted 11-22
e rde le lice
Clean Up the ASM Instance 11-24
l a V ab
i
V sfer
Remove the Listener from the Node to Be Deleted 11-25
i o
ic -tran
Remove the Node from the Database 11-26
b r
Fa non
Remove the Node from ASM 11-27
Remove the Node from the Oracle Clusterware 11-28
Node Addition and Deletion and the SYSAUX Tablespace 11-30
Summary 11-31
Practice 11: Overview 11-32
xii
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Fast-Start Failover: Overview 12-12
Data Guard Broker Configuration Files 12-14
Real-Time Query Physical Standby Database 12-15
Hardware Assisted Resilient Data 12-16
Oracle Clusterware Rolling Upgrade 12-17
Clustered ASM Rolling Upgrade 12-18
Patches and the RAC Environment 12-20
Inventory List Locks 12-21
OPatch Support for RAC: Overview 12-22
Rolling Patch Upgrade Using RAC 12-23
Download and Install Patch Updates 12-24
Rolling Release Upgrade Using SQL Apply 12-26
s a
Database High Availability: Best Practices 12-27
)h a
How Many ASM Disk Groups per Database 12-28
m ฺbr
Database Storage Consolidation 12-29
i ฺ c o deฺ
e d Gui
Which RAID Configuration for Best Availability? 12-30
r
Should You Use RAID 1 or RAID 5? 12-31
@ sic dent
e r de Stu
Should You Use ASM Mirroring Protection? 12-32
v i lav e this
What Type of Striping Works Best? 12-33
ASM Striping Only 12-34
ic i o_ o us
( f abr nse t
Hardware RAID–Striped LUNs 12-35
Hardware RAID–Striped LUNs HA 12-36
e rde le lice
It Is Real Simple 12-37
l a V ab
i
V sfer
Extended RAC: Overview 12-38
i o
ic -tran
Extended RAC Connectivity 12-39
b r
Fa non Extended RAC Disk Mirroring 12-40
Achieving Quorum with Extended RAC 12-41
ASM Preferred Mirror Read: Overview 12-42
ASM Preferred Mirror Read: Setup 12-43
Enterprise Manager ASM Configuration Page 12-44
ASM Preferred Mirror Read: Best Practice 12-45
Additional Data Guard Benefits 12-46
Using a Test Environment 12-47
Summary 12-48
xiii
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Node Addition and Removal
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Objectives
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 2
Add and Delete Nodes and Instances: Overview
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
VNodessfander Instances: Overview
i
Add and Deleteo anhow to add and delete nodes and instances in Oracle Real Application Clusters
b ric describes
Thisalesson - t r
F non
(RAC) databases. There are mainly three methods you can use to add and delete nodes in a RAC
environment:
• Silent cloning procedures. Cloning enables you to copy images of Oracle Clusterware and RAC
software onto the other nodes that have identical hardware and software.
• Enterprise Manager Grid Control. This is basically a GUI interface to cloning procedures.
• Interactive or silent procedures using addNode.sh/rootdeletenode.sh and the Database
Configuration Assistant (DBCA)
The preferred method to add multiple nodes and instances to RAC databases is to use the cloning
procedures. This is especially relevant when you are massively deploying software across your
enterprise. Refer to the Oracle Real Application Clusters Administration and Deployment Guide as
well as the Oracle Clusterware Administration and Deployment Guide for more information about
cloning procedures.
However, in this lesson you are going to see how you can directly use Oracle Universal Installer
(OUI) and DBCA to add one node to and delete one node from your cluster.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 3
Main Steps to Add a Node to a RAC Cluster
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 4
Check Prerequisites Before
Oracle Clusterware Installation
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sBeforef er Oracle Clusterware Installation
i o
Check Prerequisites
an with the Oracle Clusterware installation on the node you want to add to your
ic can-proceed
b r t r
Fa non
Before you
RAC cluster, you must make sure that all operating system and hardware prerequisites are met.
Because installation and configuration of your operating system is not the scope of this lesson, refer
to the first lessons of this course for more information.
After this is done, you can verify that the system has been configured properly for Oracle
Clusterware by using the following Cluster Verify command from one of the nodes that is already
part of your cluster: \
cluvfy stage -pre crsinst -n <list of all nodes> -r 11gR1
The example shown in the slide assumes that you have only one node currently as part of your
cluster, and you want to add a new one called VX0313. If any errors are reported during the
preceding verification, fix them before proceeding to the next step.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 5
Add Oracle Clusterware to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfetor the New Node
Add Oracleio Clusterware
b
Logain rasicthe oracle
- t r an user and execute the addNode.sh script located in your Oracle Clusterware
F non
home directory on the first node. This script runs the Oracle Universal Installer.
On the Welcome screen, click Next.
On the Specify Cluster Nodes to Add to Installation screen, OUI recognizes the existing nodes and
asks you to enter the “short” public node name of the host you want to add to your cluster. That
should automatically populate the corresponding Private Node Name and “Virtual host name” fields.
Make sure that those three names are correct and click Next.
You next see the Cluster Node Addition Summary screen, where you can review the list of products
to be installed. Click Install.
Note: It is also possible to execute OUI in silent mode. Here is a possible example where you want to
add a new node called newnode:
addNode.sh -silent -responseFile myinstallresponsefile
Here, myinstallresponsefile contains the following:
CLUSTER_NEW_NODES = {"newnode"}
CLUSTER_NEW_PRIVATE_NODE_NAMES = {"newnode-priv"} CLUSTER_NEW_VIRTUAL_HOSTNAMES =
{"newnode-vip"}
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 6
Add Oracle Clusterware to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfetor the New Node (continued)
Add Oracleio
Clusterware
b c tran
rinow
Youacan - the installation progression from the Cluster Node Addition Progress screen.
follow
F non
The OUI copies the Oracle Clusterware software to the new node, and then asks you to run few
scripts as the root user on both nodes. Make sure that you run the scripts on the correct node as
specified one after another.
You have to execute the rootaddnode.sh script on the first node. Basically, this script adds the
nodeapps of the new node to the OCR configuration.
After this is done, you have to execute the root.sh script from the new node. This script starts the
Oracle Clusterware stack on the new node and then uses VIPCA (Virtual IP Configuration Assistant)
in silent mode for configuring nodeapps.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 7
Add Oracle Clusterware to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfetor the New Node (continued)
Add Oracleio Clusterware
b r icscripts
- t r anexecuted successfully, you can check your Oracle Cluster Registry (OCR)
Fa non
After both are
configuration as shown in the slide. At this point, the crs_stat command reports three new
resources on the new node. These resources correspond to nodeapps.
Click OK on the Execute Configuration scripts screen to reach the end of the Oracle Clusterware
installation.
On the End of Installation screen, click Exit.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 8
Configure the New ONS
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
V i fer
i
Configure theo New n s
ONS
b ricneed to-tradd
Youanow
a the new node ONS (Oracle Notification Server) configuration information to
F no n
the shared ONS configuration information stored in OCR. From the first node, and looking at the
ons.config file located in the <Oracle Clusterware home>/opmn/conf directory, you
can determine the ONS remote port to be used (6251 in the slide). You need to use this port in the
racgons add_config command as shown in the slide to make sure that the ONS on the first
node can communicate with the ONS on the new node.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 9
Add ASM Home to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V to thesfNewer Node
Add ASM Home i o n
b ricis needed
Thisastep - t r aonly if you use a specific home directory to host ASM. If you run ASM and your
F non
RAC database out of the same Oracle Home, you can skip this step.
From the first node, you need to execute the addNode.sh script from the ASM home directory as
shown in the slide. The scenario is identical to the one shown for the Oracle Clusterware installation.
However, in the case of an Oracle Home, you just need to select the name of the node you want to
add on the Specify Cluster Nodes to Add to Installation screen, and then run the root.sh script
from the new node after OUI has copied the database software.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 10
Add RAC Home to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V to thesfNewer Node
Add RAC Home i o
icfirst node, n
ayou
Fromb r
the - t r need to execute the addNode.sh script from the RAC home directory as
Fa non
shown in the slide. The scenario is identical to the one shown for the ASM home installation.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 11
Add a Listener to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
Vto thesNewf er Node
i
Add a Listenero
icnew node, n
ayou
b r - t r
Fa non
From the need to add a listener. In this example, you are adding a listener from the
ASM Home. You need to use NETCA (NETwork Configuration Assistant) for that.
On the Configuration screen, select “Cluster configuration” and click Next.
On the Active Nodes screen, select the name of the new node and click Next.
On the Welcome screen, select “Listener configuration” and click Next.
On the Listener screen, select Add and click Next.
One the Listener Name screen, enter LISTENER in the “Listener name” field.
On the Select Protocols screen, select TCP and click Next.
On the TCP/IP Protocol screen, select “Use the standard port number of 1521,” and click Next.
Continue to click Next until you exit from NETCA.
The steps above add a listener on the new node with the name LISTENER_<New node name>.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 12
Add an ASM Instance to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sto f r
ethe
Add an ASM
i c i oInstance
a n New Node
r t r
Fab younocann-add your database instance to the new node, you need to add an ASM instance to the
Before
new node. To do so, use DBCA from your ASM home as shown on the above slide.
On the Welcome screen, click Next.
On the Operations screen, select Configure Automatic Storage Management and click Next.
On the Node Selection screen, select the node you want to add, and click Next.
Note: By default if your ASM instance is running out of the same oracle home, then DBCA
automatically extends ASM to the new node when you use DBCA to extend your database instance
to the new node.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 13
Add an ASM Instance to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sto f r
ethe
Add an ASM
i c i oInstance
a n New Node (continued)
r r
-t prompts you for ASM instance addition on your second node. Click Yes.
Faba while,
After
n o nDBCA
DBCA then asks you to enter the password for the ASM administrator. Enter your password and
click OK.
On the ASM Disk Groups screen, you should see all your disk groups mounted on all nodes of your
cluster.
Click Finish.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 14
Add a Database Instance to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V Instance f erto the New Node
i o
Add a Database s
ana database instance to your RAC database. You can do so by using the DBCA
b ricneed to-tradd
Youanow
F non
from the first node.
On the Welcome screen, select “Oracle Real Application Clusters database” and click Next.
On the Operations screen, select Instance Management and click Next.
On the Instance Management screen, select “Add an instance” and click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 15
Add a Database Instance to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V Instance f erto the New Node (continued)
i
Add a Databaseo s
an databases” screen, select your RAC database and enter SYS credentials. Then,
ic of -cluster
On a b
the r“List t r
F non
click Next.
On the “List of cluster database instances” screen, click Next.
On the “Instance naming and node selection” screen, select the node name on which you want to add
the instance, and specify the name of that instance. When done, click Next.
On the Instance Storage screen, click Finish.
On the Summary screen, check the various parameters and click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 16
Add a Database Instance to the New Node
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V Instance f erto the New Node (continued)
i
Add a Database o
ic if-you n
aares
b r t r
Fa non
At this point, using ASM for your database storage, and there is currently no running ASM
instance on your new node, DBCA detects the need for an ASM instance creation on the new node.
This must be done before the DBCA can create the database instance on that node. Click Yes.
The assistant is now adding your instance to your RAC database on the new node. It will also start
that instance at the end of the operation.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 17
Add an Instance to Your RAC Database Using EM
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V to Your f erRAC Database Using EM
i o
Add an Instance
c tran s
b rialso
Youacan - a new instance to your RAC database by using the Add Instance Wizard. From the
add
F non
Cluster Database page, click the Server tab. On the Server tabbed page, click Add Instance in the
Change Database section of the page.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 18
Add an Instance to Your RAC Database Using EM
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V to Your f erRAC Database Using EM (continued)
i o
Add an Instance
c tran s
b rinow
Youaare on- the Cluster Credentials page where you specify the cluster and ASM credentials. The
F non
wizard automatically adds the ASM instance before adding the database instance if it is not already
created.
When done, click Next to go to the Host page where you specify on which host you want to add the
database instance. Select the node in question and click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 19
Add an Instance to Your RAC Database Using EM
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V to Your f erRAC Database Using EM (continued)
i o
Add an Instance
ic -page, s
anclick Submit to start the job’s execution.
On a b
the
rReview t r
F non
On the Confirmation page, click “View job” to see the job’s log. After some refreshes of that page,
you should get a succeeded status.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 20
Main Steps to Delete a Node from a RAC Cluster
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 21
Delete the Instance on the Node to Be Deleted
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V onsfthe er Node to Be Deleted
i o
Delete the Instance
c tran
b ristep
Theafirst is-to remove the database instance from the node that you want to delete. For that, you
F non
use the DBCA from the node you want to delete.
On the Welcome screen, select “Oracle Real Application Clusters database” and click Next.
On the Operations screen, select Instance Management and click Next.
On the Instance Management screen, select “Delete an instance” and click Next.
On the “List of cluster databases” screen, select the RAC database from which you want to delete an
instance, enter SYS and its password, and click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 22
Delete the Instance on the Node to Be Deleted
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V onsfthe er Node to Be Deleted (continued)
i o
Delete the Instance
an database instances” screen, select the instance that you want to delete and
ic of -cluster
On a b
the
r“List t r
F non
click Finish.
In the Database Configuration Assistant dialog box, click OK to validate your choice.
This triggers the remove instance process. When completed, your instance is removed from your
cluster database.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 23
Clean Up the ASM Instance
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V Instance f er
Clean Up thei o ASM
icdatabase n s
ainstance
b r - t r
Fa non
After your
instance.
is removed from the node, you can clean up the corresponding ASM
To do this, you need to use SRVCTL to first stop the ASM instance currently running on the node
that you want to remove, and then remove that ASM instance from the same node. The two
commands are illustrated in the screenshot shown in the slide.
Then, you need to manually remove the initialization parameter file of that ASM instance. As shown
in the slide, you can remove files containing the ASM string from the <ASM home>/dbs directory.
After this is done, you can also remove all the log files of that ASM instance. These files are
generally located in the $ORACLE_BASE/admin directory.
The last thing you can do is to remove the associated ASM entry from the /etc/oratab file.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 24
Remove the Listener from the Node to Be Deleted
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfrom f er the Node to Be Deleted
Remove theioListener
b c tran
rinow
Youacan - the listener from the node that you want to delete. This listener can be from
remove
F non
either the ASM home or the database home depending on when it was created.
To remove the listener, you can use NETCA as shown in the slide.
On the Configuration screen, select “Cluster configuration” and click Next.
On the Active Nodes screen, select the node from which you want to remove the listener and click
Next.
On the Welcome screen, select “Listener configuration” and click Next.
On the Listener screen, select Delete and click Next.
On the “Select listener” screen, select the corresponding listener, normally called LISTENER, and
click Next.
Follow the rest of the screens until the listener is removed from the node.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 25
Remove the Node from the Database
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V from f r
ethe
Remove theioNode
i c a n s Database
r t r
Fab younocann-use the Oracle Universal Installer to remove the database software installation, you
Before
need to update the inventory on the node to be deleted by executing the following command (also
shown in the slide):
./runInstaller –updateNodeList ORACLE_HOME=<Database home> "CLUSTER_NODES=<node to be
removed>" –local
You need to execute this command from the oui/bin subdirectory in the database home.
After this command is executed, you can start OUI from the same directory, and click “Deinstall
products” on the Welcome screen. Then, select the database home and click Remove. This will
remove the database home from the node to be deleted.
You now need to update the corresponding inventory on the remaining nodes. You can use the
following command from the first node:
./runInstaller –updateNodeList ORACLE_HOME=<Database home> "CLUSTER_NODES=<remaining
nodes>"
This command needs to be executed from the oui/bin subdirectory of the database home.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 26
Remove the Node from ASM
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V from f r
eASM
Remove theioNode
ic can-use n
athes
b r t r
Fa non
Before you Oracle Universal Installer to remove the ASM software installation, you need
to update the inventory on the node to be deleted by executing the following command (also shown
in the slide):
./runInstaller –updateNodeList ORACLE_HOME=<ASM home> "CLUSTER_NODES=<node to be
removed>" –local
You need to execute this command from the oui/bin subdirectory in the ASM home.
After this command is executed, you can start OUI from the same directory, and click “Deinstall
products” on the Welcome screen. Then, select the ASM home and click Remove. This will remove
the ASM home from the node to be deleted.
You now need to update the corresponding inventory on the remaining nodes. You can use the
following command from the first node:
./runInstaller –updateNodeList ORACLE_HOME=<ASM home> "CLUSTER_NODES=<remaining
nodes>"
This command needs to be executed from the oui/bin subdirectory of the ASM home.
Note: This step is not needed if you are not using a separate home directory for ASM.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 27
Remove the Node from the Oracle Clusterware
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V from f r
ethe
Remove theioNode
i c a n s Oracle Clusterware
r t r
Fab younocann-use OUI to remove the Oracle Clusterware software installation from the node to be
Before
deleted, you need to perform the following commands:
• The following needs to be done from the first node: <Oracle Clusterware home>/bin/racgons
remove_config <Node to be removed>:6251 (Replace port 6251 in the command above with the
port number that you get in the remoteport section of the ons.config file found in the <Oracle
Clusterware home>/opmn/conf directory.)
• The following needs to be done from the node to be removed as the root user: <Oracle Clusterware
home>/install/rootdelete.sh
• The following needs to be done from the first node as the root user: Determine the node number
to be deleted using <Oracle Clusterware home>/bin/olsnodes –n. Then execute <Oracle Clusterware
home>/install/rootdeletenode.sh <node name to be deleted>,<node number to be deleted>.
These three steps are illustrated in the slide.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 28
Remove the Node from the Oracle Clusterware
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V from f r
ethe
Remove the
i c i oNode
a n s Oracle Clusterware (continued)
r r
b neednto-t update the inventory from the node to be deleted by executing: <Oracle Clusterware
Youanow
F no
home>/oui/bin/runInstaller -updateNodeList ORACLE_HOME=<Oracle Clusterware home>
"CLUSTER_NODES=<Node to be deleted>" CRS=TRUE -local
When done, run OUI from the same directory and choose “Deinstall products” and remove the
Oracle Clusterware installation on the node to be deleted as illustrated in the slide.
You can now update the inventory from the first node by executing the following command: <Oracle
Clusterware home>/oui/bin/runInstaller -updateNodeList ORACLE_HOME=<Oracle Clusterware
home> "CLUSTER_NODES=<Remaining nodes>" CRS=TRUE
To verify the removal of the node from the cluster, run the following commands from the first node:
• srvctl status nodeapps -n <Deleted node> should get a message saying Invalid
node.
• crs_stat | grep -i <Deleted node> should not get any output.
• olsnodes –n should get all the present nodes list without the deleted node.
Note: You should also remove all corresponding oracle homes after this step.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 29
Node Addition and Deletion
and the SYSAUX Tablespace
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 30
Summary
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 31
Practice 11: Overview
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfer
i
Important Note o
c tran
b ristrongly
Youaare - advised to follow directly the solution appendix for this lab.
F non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 11 - 32
Design for High Availability
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Objectives
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 2
Causes of Unplanned Down Time
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 3
Causes of Planned Down Time
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 4
Oracle’s Solution to Down Time
RMAN backup/recovery
Fast-start (Data Recovery Advisor)
RAC
Fault Recovery
Data Guard ASM
Streams
System
failures Flashback
Unplanned
down time
Data HARD
failures
Data Guard s a
& )h a
Rolling upgrades/ Streams
m ฺbr
System Online patching
i ฺ c o deฺ
changes r e d Gui
Planned @ sic dent
Dynamic provisioning
down time
e r de Stu
Data i lavOnline t is
hredefinition
changes io_
v e
r ic t o us
( f ab nse
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V to Downf er Time
i o
Oracle’s Solution
ic -tran s
b r
Fa nodown
Unplanned n time is primarily the result of computer failures or data failures. Planned down time
is primarily due to data changes or system changes:
• RAC provides optimal performance, scalability, and availability gains.
• Fast-Start Fault Recovery enables you to bound the database crash/recovery time. The database
self-tunes checkpoint processing to safeguard the desired recovery time objective.
• ASM provides a higher level of availability using online provisioning of database storage.
• Flashback provides a quick resolution to human errors.
• Oracle Hardware Assisted Resilient Data (HARD) is a comprehensive program designed to
prevent data corruptions before they happen.
• Recovery Manager (RMAN) automates database backup and recovery. Data Recovery Advisor
(not supported for RAC) diagnoses data failures and presents repair options.
• Data Guard must be the foundation of any Oracle database disaster-recovery plan.
• The increased flexibility and capability of Streams over Data Guard with SQL Apply requires
more investment and expertise to maintain an integrated high availability solution.
• With online redefinition, the Oracle database supports many maintenance operations without
disrupting database operations, or users updating or accessing data.
• The Oracle database continues to broaden support for dynamic reconfiguration, enabling it to
adapt to changes in demand and hardware with no disruption of service.
• The Oracle database supports the application of patches to the nodes of a RAC system, as well
as database software upgrades, in a rolling fashion.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 5
RAC and Data Guard Complementarity
Nodes RAC
Component
Instances failure RAC
Software failure s a
)h a
Human
error Data Guard m ฺbr
Data & i ฺ c o deฺ
Environment
r e
Flashback
d Gui
@ sic dent
e r de Stu Data Guard
Site v i lav e this &
_
io o us Streams
r ic t
( f ab nse
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er
VGuardsComplementarity
f
RAC and Datai o
icData Guard antogether provide the benefits of system-level, site-level, and data-level
b r - t r
Fa non
RAC and
protection, resulting in high levels of availability and disaster recovery without loss of data:
• RAC addresses system failures by providing rapid and automatic recovery from failures, such as
node failures and instance crashes.
• Data Guard addresses site failures and data protection through transactionally consistent primary
and standby databases that do not share disks, enabling recovery from site disasters and data
corruption.
Note: Unlike Data Guard using SQL Apply, Oracle Streams enables updates on the replica and
provides support for heterogeneous platforms with different database releases. Therefore, Oracle
Streams may provide the fastest approach for database upgrades and platform migration.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 6
Maximum Availability Architecture
Real-time query
Clients
Oracle Oracle
Application Application
Server Server
WAN Traffic
Manager
Real-time query
s a
)h a
Primary Secondary
m ฺbr
site Data Guard site
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
RAC
v i lav e this RAC databases:
database
ic i o_ o us Phys&log standby
r
ab nse t
( f
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er
V sArchitecture
f
i i o
MaximumcAvailability
a n (MAA)
r r
-t provide the basis of the database MAA solution. MAA provides the most
FabandnData
RAC
onGuard
comprehensive architecture for reducing down time for scheduled outages and preventing, detecting,
and recovering from unscheduled outages. The recommended MAA has two identical sites. The
primary site contains the RAC database, and the secondary site contains both a physical standby
database and a logical standby database on RAC. Identical site configuration is recommended to
ensure that performance is not sacrificed after a failover or switchover. Symmetric sites also enable
processes and procedures to be kept the same between sites, making operational tasks easier to
maintain and execute.
The graphic illustrates identically configured sites. Each site consists of redundant components and
redundant routing mechanisms, so that requests are always serviceable even in the event of a failure.
Most outages are resolved locally. Client requests are always routed to the site playing the production
role.
After a failover or switchover operation occurs due to a serious outage, client requests are routed to
another site that assumes the production role. Each site contains a set of application servers or mid-
tier servers. The site playing the production role contains a production database using RAC to protect
from host and instance failures. The site playing the standby role contains one standby database, and
one logical standby database managed by Data Guard. Data Guard switchover and failover functions
allow the roles to be traded between sites.
Note: For more information, see the following Web site:
http://otn.oracle.com/deploy/availability/htdocs/maa.htm
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 7
RAC and Data Guard Topologies
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 8
RAC and Data Guard Architecture
ARCn
ARCn LGWR RFS
Flash
Primary recovery
database Standby area
Online redo
redo files s a
files Standby )h a
Flash
recovery databasemฺ
br
LGWR RFS i ฺ c o deฺ
area
r e d Gui
@ sic dApply
e nt
ARCn
e r de ARCn S tu
v i lav e this
Primary instance B
ic i o_ o usStandby apply instance D
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er
VGuardsArchitecture
f
RAC and Data i o an possible to use a “RAC to single-instance Data Guard (DG)” configuration,
icit is perfectly
b r - t r
Fa nonthe possibility to use a RAC-to-RAC DG configuration. In this mode, although
Although
you also have
multiple standby instances can receive redo from the primary database, only one standby instance
can apply the redo stream generated by the primary instances.
A RAC-to-RAC DG configuration can be set up in different ways, and the slide shows you one
possibility with a symmetric configuration where each primary instance sends its redo stream to a
corresponding standby instance using standby redo log files. It is also possible for each primary
instance to send its redo stream to only one standby instance that can also apply this stream to the
standby database. However, you can get performance benefits by using the configuration shown in
the slide. For example, assume that the redo generation rate on the primary is too great for a single
receiving instance on the standby side to handle. Suppose further that the primary database is using
the SYNC redo transport mode. If a single receiving instance on the standby cannot keep up with the
primary, then the primary’s progress is going to be throttled by the standby. If the load is spread
across multiple receiving instances on the standby, then this is less likely to occur.
If the standby can keep up with the primary, another approach is to use only one standby instance to
receive and apply the complete redo stream. For example, you can set up the primary instances to
remotely archive to the same Oracle Net service name.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 9
RAC and Data Guard Architecture (continued)
You can then configure one of the standby nodes to handle that service. This instance then both
receives and applies redo from the primary. If you need to do maintenance on that node, then you can
stop the service on that node and start it on another node. This approach allows for the primary
instances to be more independent of the standby configuration because they are not configured to
send redo to a particular instance.
Note: For more information, refer to the Oracle Data Guard Concepts and Administration guide.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 10
Data Guard Broker (DGB) and
Oracle Clusterware (OC) Integration
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 11
Fast-Start Failover: Overview
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 12
Fast-Start Failover: Overview (continued)
For disaster recovery requirements, install the Observer in a location separate from the primary and
standby data centers. If the designated Observer fails, Enterprise Manager can detect the failure and
can be configured to automatically restart the Observer on the same host.
You can install the Observer by installing the Oracle Client Administrator (choose the Administrator
option from the Oracle Universal Installer). Installing the Oracle Client Administrator results in a
small footprint because an Oracle instance is not included on the Observer system. If Enterprise
Manager is used, also install the Enterprise Manager Agent on the Observer system.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 13
Data Guard Broker Configuration Files
*.DG_BROKER_CONFIG_FILE1=+DG1/RACDB/dr1config.dat
*.DG_BROKER_CONFIG_FILE2=+DG1/RACDB/dr2config.dat
RAC01 RAC02
s a
)h a
m ฺbr
i ฺ c o deฺ
Shared storage r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er
V Configuration
f
Data Guardio
i c Broker
a n s Files
r
b ofnthe r
-t Data Guard Broker (DGB) configuration files are maintained for each database so
Facopies
Two
n o
as to always have a record of the last known valid state of the configuration. When the broker is
started for the first time, the configuration files are automatically created and named using a default
path name and file name that is operating system specific.
When using a RAC environment, the DGB configuration files must be shared by all instances of the
same database. You can override the default path name and file name by setting the following
initialization parameters for that database: DG_BROKER_CONFIG_FILE1,
DG_BROKER_CONFIG_FILE2.
You have three possible options to share those files:
• Cluster file system
• Raw devices
• ASM
The example in the slide illustrates a case where those files are stored in an ASM disk group called
DG1. It is assumed that you have already created a directory called RACDB in DG1.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 14
Real-Time Query Physical Standby Database
Primary Standby
Redo apply
cluster cluster
s a
Redo apply
instance
)h a
m ฺbr
RAC diฺc
o deฺ
RAC
r e u i
database
sic dent
database G
@
de Stu
e r
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V Physical f er Standby Database
i o
Real-Time Query
ic Redo s
an (physical standby database) has proven to be a popular solution for disaster
b r - t r
Fa non
Data Guard Apply
recovery due to its relative simplicity, high performance, and superior level of data protection.
Beginning with Oracle Database 11g, a physical standby database can be open read-only while redo
apply is active. This means that you can run queries and reports against an up-to-date physical
standby database without compromising data protection or extending recovery time in the event a
failover is required. This makes every physical standby database able to support productive uses even
while in standby role. To enable real-time query, open the database in read-only mode and then issue
the ALTER DATABASE RECOVER MANAGED STANDBY statement. Real-time query provides an
ultimate high availability solution because it:
• Is totally transparent to applications
• Supports Oracle RAC on the primary and standby databases. Although Redo Apply can be
running on only one Oracle RAC instance, you can have all of the instances running in read-only
mode while Redo Apply is running on one instance.
• Enables queries to return transactionally consistent results that are very close to being up-to-date
with the primary database
• Enables you to use fast-start failover to allow for automatic fast failover if the primary database
fails
Note: The COMPATIBLE parameter must be set to 11.0.0 on both the primary and physical standby
databases.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 15
Hardware Assisted Resilient Data
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 16
Oracle Clusterware Rolling Upgrade
1. unzip p….zip
2. runInstaller from Disk1 directory:
– Choose your Oracle Clusterware home installation.
– Choose all nodes.
– Install.
3. Repeat on each node, one after the other:
– crsctl stop crs
– <crs home>/install/root….sh s a
)h a
Node n Node n Node n
m ฺbr
i ฺ c d ฺ
o Clusterware
e
Oracle Clusterware
x
Oracle Clusterware
x
Oracle
red t Gux+1 i
stop i c
root102
s denOracle RAC/ASM
Oracle RAC/ASM
y
Oracle RAC/ASM
y
d @
e Stu y
r
ve this
i l a
_v use
RDBA1 CRS +ASM1 RDBA1 CRS +ASM1
i o
a b ric e to
e (f ens
e d
e l ic © 2008, Oracle. All rights reserved.
r lCopyright
l a V ab
i
V Rolling f er Upgrade
i o
Oracle Clusterware s
an Clusterware can be performed in a rolling fashion. The slide illustrates how to
Alla b ric to-Oracle
upgrades t r
F
do this.non
Once you installed the new software, you need to execute the two commands described in step 3 (in
sequence, one node at a time). The diagram shows you the configuration evolution after stopping and
running the corresponding root….sh script.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 17
Clustered ASM Rolling Upgrade
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 19
Patches and the RAC Environment
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
Apply a patchset to
e r de Stu
lav e this
/u01/app/oracle
/product/db_1 on v i
all nodes.
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er
V RACsEnvironment
f
Patches and i othe
icpatches anyour RAC installation is a simple process with the OUI. The OUI can keep track
b r - t r
Fa non
Applying to
of multiple ORACLE_HOME deployments. This intelligence prevents potentially destructive or
conflicting patchsets from being applied.
In the example in the slide, a patchset is applied to the /u01/app/oracle/product/db_1
Oracle Home on all the three nodes of your cluster database. Although you execute the installation
on ex0043, you can choose any of the nodes to perform this task. The steps that you must perform
to add a patchset through the OUI are essentially the same as those to install a new release. You must
change directory to $ORACLE_HOME/bin. After starting the OUI, perform the following steps:
1. Select “Installation from a stage location,” and enter the appropriate patchset source on the
Welcome screen.
2. Select the nodes on the Node Selection screen, where you need to add the patch, and ensure that
they are all available. In this example, this should be all three of the nodes because
/u01/app/oracle/product/db_1 is installed on all of them.
3. Check the Summary screen to confirm that space requirements are met for each node.
4. Continue with the installation and monitor the progress as usual.
The OUI automatically manages the installation progress, including the copying of files to remote
nodes, just as it does with the Oracle Clusterware and database binary installations.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 20
Inventory List Locks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 21
OPatch Support for RAC: Overview
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 22
Rolling Patch Upgrade Using RAC
Clients 1 Clients 2
Oracle
A B Patch patch
upgrades
Operating
Initial RAC configuration Clients on A , patch B system
upgrades a
as
4 Clients Clients 3
ฺbr )h
c o m eฺ
Hardware
ฺ
di upgrades
uid
Patch
s icre ent G
r d e@ Stud
i l a ve this
Upgrade complete cio_ Clients
v seon B , patch A
r i t o u
b
(fa ense
e ic © 2008, Oracle. All rights reserved.
rd lCopyright
l
e
V ab e
i l a
V sfeUsing r
Rolling Patch
i c i o Upgrade
a n RAC
r
b supported
Thisais r
-t only for single patches that are marked as rolling upgrade compatible.
F o n
n patching allows the interoperation of a patched node and an unpatched node
Rolling RAC
simultaneously. This means only one node is out of commission while it is patched.
Using the OPATCH tool to apply a rolling RAC patch, you are prompted to stop the instances on the
node to be patched. First, the local node is patched, and then you are asked for the next node to patch
from a list. As each node is patched, the user is prompted when it is safe to restart the patched node.
The cycle of prompting for a node, of stopping the instances on the node, of patching the node, and
of restarting the instances continues until you stop the cycle or until all nodes are patched. After you
download the patch to your node, you need to unzip it before you can apply it. You can determine
whether the patch is flagged as rolling upgradable by checking the
Patch_number/etc/config/inventory file. Near the end of that file, you must see the
following mark: <online_rac_installable>true</online_rac_installable>
It is important to stress that although rolling patch upgrade allows you to test the patch before
propagating it to the other nodes, it is preferable to test patches in a test environment rather than
directly on your production system.
Note: Some components cannot be changed one node at a time. The classic example is the data
dictionary. Because there is only a single data dictionary, all instances need to be shut down. In these
cases, Oracle Data Guard and physical standby databases are the recommended solutions. Of course,
using Online Patching is the recommended solution for avoiding downtime when an
online patch is available.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 23
Download and Install Patch Updates
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er Updates
VInstallsPatch
f
Download and i o
c tran
ithe
b r
Refer to n-
Fa noOracleMetaLink Web site for required patch updates for your installation.
To download the required patch updates:
1. Use a Web browser to log in to the OracleMetaLink Web site: http://metalink.oracle.com.
2. On the main OracleMetaLink page, click Patches and Updates.
3. On the Patches & Updates page, click Advanced Search.
4. On the Advanced Search page, click the search icon next to the Product or Product Family field.
5. In the Search field, enter RDBMS Server and click Go. Select RDBMS Server under the
Results heading and click Select. RDBMS Server appears in the Product or Product Family
field. The current release appears in the Release field.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 24
Download and Install Patch Updates
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er Updates (continued)
VInstallsPatch
f
i
Download ando an from the list in the Platform or Language field, and click Go. Any
6.ab
ric -trplatform
Select your
F non
available patch updates appear under the Results heading.
7. Click the number of the patch that you want to download.
8. On the Patchset page, click View README and read the page that appears. The README
page contains information about the patchset and how to apply the patches to your installation.
9. Return to the Patchset page, click Download, and save the file on your system.
10. Use the unzip utility provided with Oracle Database 11g to uncompress the Oracle patch
updates that you downloaded from OracleMetaLink. The unzip utility is located in the
$ORACLE_HOME/bin directory.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 25
Rolling Release Upgrade Using SQL Apply
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 26
Database High Availability: Best Practices
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 27
How Many ASM Disk Groups per Database
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 28
Database Storage Consolidation
10 ° 50 GB 10 ° 50 GB _vi
lav e this 10 ° 100 GB
r ic io o us
( f ab nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er
V Consolidation
f
i o
Database Storage
icDatabase n
a10gs
b r - t r
Fa non
In Oracle Release 2 and later, Oracle Clusterware does not require an Oracle Real
Application Clusters license. Oracle Clusterware is now available with ASM and single-instance
Oracle Database 11g allowing support for a shared clustered pool of storage for RAC and single-
instance Oracle databases.
This allows you to optimize your storage utilization by eliminating wasted, over-provisioned storage.
This is illustrated in the slide, where instead of having various pools of disks used for different
databases, you consolidate all that in one single pool shared by all your databases.
By doing this, you can reduce the number of LUNs to manage by increasing their sizes, which gives
you a higher storage utilization as well as a higher performance.
Note: RAC and single-instance databases could not be managed by the same ASM instance in Oracle
Database 10g Release 1.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 29
Which RAID Configuration for Best Availability?
A. ASM mirroring
B. Hardware RAID 1 (mirroring)
C. Hardware RAID 5 (parity protection)
D. Both ASM mirroring and hardware RAID
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 30
Should You Use RAID 1 or RAID 5?
Pros: Pros:
• Best redundancy • Requires less capacity
• Best performance Cons:
• Low recovery overhead • Less redundancy
Cons: s a
• Less performance h a
• Requires higher capacity ฺbr)
• High recovery overhead
m eฺ
ฺ c o
r e di Guid
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V RAIDsf1eorr RAID 5?
Should YouioUse
b r - t r an technique. Mirroring involves taking all writes issued to a given disk and
iisca mirroring
Fa nothen write to another disk. In this way, if there is a failure of the first disk, the second disk,
RAID 1
duplicating
or mirror, can take over without any data loss.
The goal of the RAID-5 design is to provide a reliable, high-performance array of disks with the
minimum amount of redundant hardware. RAID 5 is based on the use of parity protection across
several drives in order to provide protection against disk failure. The RAID-5 configuration is
essentially a striped configuration, like RAID 0, with an additional disk added to cater to the
additional storage needed for the parity information. With the data striped across the drives in this
way, the read performance of RAID 5 is comparable to that of RAID 0. RAID-5 writes, on the other
hand, are almost legendary for their poor performance.
The slide lists the pros and cons of using both techniques, and although Oracle recommends using
RAID 1, you need to take into account that you have to double the number of your disks to store the
same amount of data. The general rule of thumb is to deploy RAID 5 where cost of storage is critical
and performance is not the primary goal, and for applications with primary read operations such as
data warehouse applications. The Flash Recovery Area disk group can be another good use of RAID
5, where the storage capacity requirement is the highest and predominantly sequential I/O.
Note: The ORION tools (http://www.oracle.com/technology/software/index.html#util) can be used to
test and determine the pros and cons of storage arrays for your application.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 31
Should You Use ASM Mirroring Protection?
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er
V ASMsMirroring
f
Should YouioUse n Protection?
r i c t r a
Fab nleverage
Basically,
on- the storage array hardware RAID-1 mirroring protection when possible to offload
the mirroring overhead from the server. Use ASM mirroring in the absence of a hardware RAID
capability.
However hardware RAID 1 in most Advanced Technology Attachment (ATA) storage technologies
is inefficient and degrades the performance of the array even more. Using ASM redundancy has
proven to deliver much better performance in ATA arrays.
Because the storage cost can grow very rapidly whenever you want to achieve extended clustering
solutions, ASM mirroring should be used as an alternative to hardware mirroring for low-cost storage
solutions.
Note: For more information about the Oracle Resilient Low-cost Storage Initiative, see the Web site
at: http://www.oracle.com/technology/deploy/availability/htdocs/lowcoststorage.html.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 32
What Type of Striping Works Best?
s a
Answer: A and B )h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
ASM and RAID stripingvare e rdecomplementary.
S tu
v i la e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfWorks er Best?
o
What Type iof Striping
anyou can use ASM striping only, or you can use ASM striping in combination
As a b ricin the-tslide,
shown r
F non
with RAID 0.
With RAID 0, multiple disks are configured together as a set, or a bank, and data from any one data
file is spread, or striped, across all the disks in the bank.
Combining both ASM striping and RAID striping is called stripe-on-stripe. This combination offers
good performance too.
However, there is no longer a need to use a Logical Volume Manager (LVM) for your database files,
nor it is recommended to not use any striping at all.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 33
ASM Striping Only
Pros: Cons:
• Drives evenly distributed for Data & FRA • Not well balanced across
• Higher bandwidth ALL disks
• Allows small incremental growth (73 GB) • LUN size limited to disk size
• No drive contention
Oracle DB size: 1 TB
Data DG FRA DG
Storage configuration:
1 TB 16°73 GB 8°arrays with 2 TB a
32°73 GB
12°73 GB disks per array as
LUNs
)hLUNs
ฺbr
c m
o deฺ
i ฺ
d Gui
r e
@ sic dent
RAID 1
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfer
ASM Striping i o Only
ic shown anthis slide, you want to store a one-terabyte database with a corresponding two-
b r - t r
Fa non
In the case in
terabyte flash recovery area. You use RAID 1 to mirror each disk. In total, you have eight arrays of
twelve disks, with each disk being 73 GB. ASM mirroring and hardware RAID 0 are not used.
In addition, each ASM disk is represented by one entire LUN of 73 GB. This means that the Data
disk group (DG) is allocated 16 LUNs of 73 GB each.
On the other side, the Flash Recovery Area disk group is assigned 32 LUNs of 73 GB each.
This configuration enables you to evenly distribute disks for your data and backups, achieving good
performance and allowing you to manage your storage in small incremental chunks.
However, using a restricted number of disks in your pool does not balance your data well across all
your disks. In addition, you have many LUNs to manage at the storage level.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 34
Hardware RAID–Striped LUNs
Pros: Cons:
• Fastest region for Data DG • Large incremental growth
• Balanced data distribution • Data & FRA “contention”
• Fewer LUNs to manage while max
spindles
Oracle DB size: 1 TB
Data DG FRA DG
Storage configuration:
1 TB 4°250 GB 8°arrays with 2 TB a
4°500 GB
12°73 GB disks per array as
LUNs
)hLUNs
ฺbr
c m
o deฺ
i ฺ
d Gui
r e
sic dent
RAID 0+1
@
de Stu
e r
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfeLUNs r
i o
Hardware RAID–Striped
ic shown anthis slide, you want to store a one-terabyte database with a corresponding two-
b r - t r
Fa non
In the case in
terabyte flash recovery area. You use RAID 0+1, which is a combination of hardware striping and
mirroring to mirror and stripe each disk. In total, you have eight arrays of twelve disks, with each
disk being 73 GB. ASM mirroring is not used.
Here, you can define bigger LUNs not restricted to the size of one of your disk. This allows you to
put the Data LUNs on the fastest region of your disks, and the backup LUNs on slower parts. By
doing this, you achieve a better data distribution across all your disks, and you end up managing a
significantly less number of LUNs.
However, you must manipulate your storage in much larger chunks than in the previous
configuration.
Note: The hardware stripe size you choose is also very important because you want 1 MB alignment
as much as possible to keep in synch with ASM AUs. Therefore, selecting power-of-two stripe sizes
(128 KB or 256 KB) is better than selecting odd numbers. Storage vendors typically do not offer
many flexible choices depending on their storage array RAID technology and can create unnecessary
I/O bottlenecks if not carefully considered.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 35
Hardware RAID–Striped LUNs HA
Pros: Cons:
• Fastest region for Data DG • Large incremental growth
• Balanced data distribution • Might waste space
• Fewer LUNs to manage
• More high available
Oracle DB size: 1 TB
Data DG FRA DG
Storage configuration:
1 TB 2°500 GB 8°arrays with 1.6 TB a
2°800 GB
12°73 GB disks per array as
LUNs
)h
LUNs
ฺbr
c m
o deฺ
i ฺ
d Gui
r e
sic dent
RAID 0+1
@
de Stu
e r
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfeLUNs r
i c i o
Hardware RAID–Striped
a n HA
r t r
Fabcasenshown
In the
on- in this slide, you want to store a one-terabyte database with a corresponding 1.6-
TB flash recovery area. You use RAID 0+1, which is a combination of hardware striping and
mirroring to mirror and stripe each disk. In total, you have eight arrays of twelve disks, with each
disk being 73 GB. ASM mirroring is not used.
Compared to the previous slide, you use bigger LUNs for both the Data disk group and the Flash
Recovery Area disk group. However, the presented solution is more highly available than the
previous architecture because you separate the data from the backups into different arrays and
controllers to reduce the risk of down time in case one array fails.
By doing this, you still have a good distribution of data across your disks, although not as much as in
the previous configuration. You still end up managing a significantly less number of LUNs than in
the first case.
However, you might end up losing more space than in the previous configuration. Here, you are
using the same size and number of arrays to be consistent with the previous example.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 36
It Is Real Simple
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 37
Extended RAC: Overview
s a
Clients
)h a
m ฺbr
i ฺ c o deฺ
Site A RAC
r e d GuSite i B
database
@ sic dent
e r de Stu
• Fast recovery from site failure v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
VOverview f er
i
Extended RAC: o s
an share a single set of storage and are located on servers in the same data
icRAC-tdatabases
b r r
Fa non
Typically,
center.
With extended RAC, you can use disk mirroring and Dense Wavelength Division Multiplexing
(DWDM) equipment to extend the reach of the cluster. This configuration allows two data centers,
separated by up to 100 kilometers, to share the same RAC database with multiple RAC instances
spread across the two sites.
As shown in the slide, this RAC topology is very interesting, because the clients’ work gets
distributed automatically across all nodes independently of their location, and in case one site goes
down, the clients’ work continues to be executed on the remaining site. The types of failures that
extended RAC can cover are mainly failures of an entire data center due to a limited geographic
disaster. Fire, flooding, and site power failure are just a few examples of limited geographic disasters
that can result in the failure of an entire data center.
Note: Extended RAC does not use special software other than the normal RAC installation.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 38
Extended RAC Connectivity
DWDM DWDM
device device
s a
)h a
m ฺbr
DBdiฺc
o deฺ
DB
r e u i
copy
sic dent
copy G
@
de network tu
e r S
Clients v i lav e this
Public
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
VConnectivity
f er
Extended RAC i o
itoc extend n
aRACs
b r - t r
Fa non
In order a cluster to another site separated from your data center by more than ten
kilometers, it is required to use DWDM over dark fiber to get good performance results.
DWDM is a technology that uses multiple lasers, and transmits several wavelengths of light
simultaneously over a single optical fiber. DWDM enables the existing infrastructure of a single fiber
cable to be dramatically increased. DWDM systems can support more than 150 wavelengths, each
carrying up to 10 Gbps. Such systems provide more than a terabit per second of data transmission on
one optical strand that is thinner than a human hair.
As shown in the slide, each site should have its own DWDM device connected together by a dark
fiber optical strand. All traffic between the two sites is sent through the DWDM and carried on dark
fiber. This includes mirrored disk writes, network and heartbeat traffic, and memory-to-memory data
passage. Also shown on the graphic are the sets of disks at each site. Each site maintains a copy of
the RAC database.
It is important to note that depending on the site’s distance, you should tune and determine the
minimum value of buffer credits in order to maintain the maximum link bandwidth. Buffer credit is a
mechanism defined by the Fiber Channel standard that establishes the maximum amount of data that
can be sent at any one time.
Note: Dark fiber is a single fiber optic cable or strand mainly sold by telecom providers.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 39
Extended RAC Disk Mirroring
b r ici to u
e (fa ense
e e l ic © 2008, Oracle. All rights reserved.
rd lCopyright
l a V ab
i
VDisk Mirroring
f er
Extended RAC i o s
an one RAC database, each data center has its own set of storage that is
icthere -istronly
b r
Fa non
Although
synchronously mirrored using either a cluster-aware, host-based Logical Volume Manager (LVM)
solution, such as SLVM with MirrorDiskUX, or an array-based mirroring solution, such as EMC
SRDF.
With host-based mirroring (shown on the left of the slide), the disks appear as one set, and all I/Os
get sent to both sets of disks. This solution requires closely integrated clusterware and LVM, and
ASM is the recommended solution.
With array-based mirroring, shown on the right, all I/Os are sent to one site and are then mirrored to
the other. In fact, this solution is like a primary/secondary site setup. If the primary site fails, all
access to primary disks is lost. An outage may be incurred before you can switch to the secondary
site.
Note: With extended RAC, it is critical to design the cluster in a manner that ensures that the cluster
can achieve quorum after a site failure. For more information, refer to the Oracle Technology
Network site.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 40
Achieving Quorum with Extended RAC
Third
site
Voting disk (NFS or iSCSI)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 41
ASM Preferred Mirror Read: Overview
Site A Site B
P S
Site A Site B
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
P: Primary AUerd
e Stu
P S
l a v AU this
o _ vi se
S: Secondary
b r ici to u
e (fa ense
e e l ic © 2008, Oracle. All rights reserved.
rd lCopyright
l a V ab
i
VMirrorsRead:
f er Overview
i
ASM Preferredo
icconfigure anASM failure groups in Oracle Database 11g, ASM always reads the primary
b r - t r
Fa non
When you
copy of a mirrored extent. It may be more efficient for a node to read from a failure group extent that
is closest to the node, even if it is a secondary extent. This is especially true in extended cluster
configurations (when nodes are spread across several sites) where reading from a local copy of an
extent provides improved performance.
With Oracle Database 11g, you can do this by configuring the preferred mirror read by using the new
ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter to specify a list of
preferred mirror read names. The disks in those failure groups become the preferred read disks. Thus,
every node can read from its local disks. This results in higher efficiency and performance as well as
reduced network traffic. The setting for this parameter is instance specific.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 42
ASM Preferred Mirror Read: Setup
Setup
On first instance
ASM_PREFERRED_READ_FAILURE_GROUPS=DATA.SITEA
On second instance
ASM_PREFERRED_READ_FAILURE_GROUPS=DATA.SITEB
Monitor s a
)h a
m ฺbr
SELECT preferred_read FROM v$asm_disk;
i ฺ c o deฺ
r e d Gui
SELECT * FROM v$asm_disk_iostat; @ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er Setup
VMirrorsRead:
f
i
ASM Preferred o an set the new ASM_PREFERRED_READ_FAILURE_GROUPS initialization
To a b ric this-trfeature,
configure
F on parameter is a multivalued parameter and should contain a string with a list of failure
nThis
parameter.
group names separated by commas. Each failure group name specified should be prefixed with its
disk group name and a “.” character. This parameter is dynamic and can be modified using the
ALTER SYSTEM command at any time. An example is shown in the slide. However, this
initialization parameter is valid only for ASM instances. With the extended cluster, the failure groups
specified in this parameter should contain only those disks that are local to the corresponding
instance.
The new column PREFERRED_READ has been added to the V$ASM_DISK view. Its format is a
single character. If the disk group to which the disk belongs pertains to a preferred read failure group,
the value of this column is Y.
To identify specific performance issues with the ASM preferred read failure groups, use the
V$ASM_DISK_IOSTAT view. This view displays the disk input/output (I/O) statistics for each
ASM client. If this view is queried from a database instance, only the rows for this instance are
shown.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 43
Enterprise Manager ASM Configuration Page
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V ASM f erConfiguration Page
o
Enterprise iManager
c tran s
b rispecify
Youacan - a set of disks as preferred disks for each ASM instance by using Enterprise
F non
Manager. The preferred read attributes are instance specific. In Oracle Database 11g, the Preferred
Read Failure Groups field (asm_preferred_read_failure_group) is added to the
configuration page.
This parameter takes effect only before the disk group is mounted or when the disk group is created.
It applies only to newly opened files or to a newly loaded extent map for a file.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 44
ASM Preferred Mirror Read: Best Practice
P S P S S S S P
Only two failure groups: One for each instance Max four failure groups: Two for each instance
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 45
Additional Data Guard Benefits
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 46
Using a Test Environment
Production Test s a
cluster cluster )h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
RAC
r d e RAC S tu
database e database
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfer
Using a Testi oEnvironment
icthe most n
alikely
b r - t r
Fa non
Change is cause of down time in a production environment. A proper test
environment can catch more than 90 percent of the changes that could lead to a down time of the
production environment, and is invaluable for quick test and resolution of issues in production.
When your production environment is RAC, your test environment should be a separate RAC cluster
with all the identical software components and versions.
Without a test cluster, your production environment will not be highly available.
Note: Not using a test environment is one of the most common errors seen by Oracle Support
Services.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 47
Summary
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration 12 - 48
Appendix A
Practices and Solutions
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Table of Contents
Practices for Lesson 1 ......................................................................................................... 4
Practice 1-1: Oracle Clusterware Installation ................................................................. 5
Practices for Lesson 2 ....................................................................................................... 11
Practice 2-1: ASM Installation and Configuration ....................................................... 12
Practice 2-2: Database Software Installation ................................................................ 15
Practices for Lesson 3 ....................................................................................................... 17
Practice 3-1: Create a Cluster Database........................................................................ 18
Practices for Lesson 4 ....................................................................................................... 20
Practice 4-1: Add/Remove Redo Log Groups in a RAC Environment ........................ 21
Practices for Lesson 5 ....................................................................................................... 26
Practice 5-1: Backup and Recovery.............................................................................. 27
a
Practices for Lesson 6 ....................................................................................................... 30
s
Practice 6-1: ADDM and RAC, Part I .......................................................................... 31 )h a
ฺbr
Practice 6-2: ADDM and RAC, Part II......................................................................... 40
m
c o deฺ
Practice 6-3: ADDM and RAC, Part III........................................................................ 47
i ฺ
e d Gui
Practices for Lesson 7 ....................................................................................................... 54
r
sic dent
Practice 7-1: Manage Services...................................................................................... 55
@
e r de Stu
Practice 7-2: Monitor Services...................................................................................... 65
lav e this
Practice 7-3: Alert Thresholds and Services................................................................. 71
v i
Practices for Lesson 8 ....................................................................................................... 75
i o_ o us
Practice 8-1: Create a Server-Side Callout ................................................................... 76
ic
( f abr nse t
Practice 8-2: Use Load Balancing Advisory................................................................. 85
rde le lice
Practice 8-3: Use Transparent Application Failover................................................... 107
e
Practices for Lesson 9 ..................................................................................................... 120
V ab
l a
Practice 9-1: Mirror the OCR ..................................................................................... 121
i
V sfer
i o
Practice 9-2: OCR Backup and Restore...................................................................... 127
ic -tran
b r Practice 9-3: Multiplex Your Voting Disk.................................................................. 135
Fa non Practice 9-4: Protect Xclock with Oracle Clusterware ............................................... 137
Practices for Lesson 10 ................................................................................................... 149
Practice 10-1: Diagnosing Oracle Clusterware Components...................................... 150
Practice 10-2: Fixing Oracle Clusterware issues ........................................................ 159
Practices for Lesson 11 ................................................................................................... 186
Practice 11-1: Remove the Second Instance............................................................... 187
Practice 11-2: Clean Up ASM .................................................................................... 188
Practice 11-3: Remove the Listener............................................................................ 191
Practice 11-4: Remove the Database Software from the Second Node...................... 194
Practice 11-5: Remove the ASM Software from the Second Node............................ 198
Practice 11-6: Remove the Second Node from the OCR............................................ 202
Practice 11-7: Remove the Oracle Clusterware Software from the Second Node ..... 203
Practice 11-8: Check Prerequisites Before Oracle Clusterware Installation .............. 211
Practice 11-9: Add Oracle Clusterware to the Second Node...................................... 214
Practice 11-10: Configure ONS for the Second Node ................................................ 218
Practice 11-11: Add ASM Software to the Second Node........................................... 219
Practice 11-12: Add a Listener to the Second Node ................................................... 222
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
Notes:
• When working on these practices, you must use the provided values to prevent
interference with other students or other classes.
• The solutions provided are not necessarily based on your assigned account. You
should thus substitute your designated user, database, instance, host names, and
related information as appropriate.
In this practice, you set up user equivalence for the oracle user employing Secure Shell
(ssh). The second step entails checking the readiness of the cluster for a Clusterware s a
installation. This is done using the CLUVFY utility. The third and final step of this )h a
ฺbr
practice is the actual installation of the Oracle Clusterware software. Install the software
m
in the /u01/crs11g directory as the oracle user. The install group should be
i ฺ c o deฺ
oinstall. r e d Gui
1) Using a telnet session, connect as user oracle to your @ sicRAC
first d e n
node.
t
You need to
configure secure shell (ssh) on both nodes. To r
dod ethis, navigate
S t u to
a v e i s
$HOME/solutions/less01 and execute
v i l the
e t h
ssh_setup.sh script. When
_
cioto logtoinutosyour second node. You should not be
finished, test the setup by using ssh
prompted for a password. bri
e (fa ense
e rd lesson1]$
e l ic ./ssh_setup.sh
[oracle@vx0301
l a l
V ab of host 'vx0302 (10.216.4.13)' can't be
i
V sfer
The authenticity
i o anfingerprint is
established.
icRSA -key
b r t r
Fa nab:33:1b:a6:89:53:ba:24:77:76:90:e2:7a:1c:79:11.
onAre you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'vx0302,10.216.4.13' (RSA) to the
list of known hosts.
oracle@vx0302's password:
oracle@vx0302's password:
[oracle@vx0301 lesson1]$ ssh vx0302
Last login: Fri Nov 16 14:35:30 2007 from vx0301.us.oracle.com
[oracle@vx0302 ~]$ exit
[oracle@vx0301 lesson1]$
2) Run CLUVFY from /stage/db to make sure that the Clusterware minimum
requirements are met on both nodes before beginning the installation:
l) Next, run the /u01/crs11g/root.sh script as root using sudo from the
terminal window on your FIRST node. When it has finished executing, ssh to
your second node and execute the /u01/crs11g/root.sh script as root.
[oracle@vx0301 u01]$ sudo /u01/crs11g/root.sh
o_ o us
to start CRS daemons.
[oracle@vx0301 u01]$
ic i
( f abr nse t
[oracle@vx0301 u01]$ ssh vx0302
rde le lice
Last login: Mon Nov 19 10:56:21 2007 from vx0301.us.oracle.com
e
[oracle@vx0302 ~]$ sudo /u01/crs11g/root.sh
V ab
i l
V sfer a
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.
i o
icSetting anthe permissions on OCR backup directory
b r - t r
Fa nSetting
on up Network socket directories
Oracle Cluster Registry configuration upgraded successfully
clscfg: EXISTING configuration version 4 detected.
clscfg: version 4 is 11 Release 1.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name>
<hostname>
node 1: vx0301 vx0301-priv vx0301
node 2: vx0302 vx0302-priv vx0302
clscfg: Arguments check out successfully.
o v se
_/u01/crs11g/bin/crs_stat
o) From a terminal session, execute
r ic i o u –t to
b t
check the viability (offa
e
the nodeapps
e n se on both nodes.
[oracle@vx0301 e rd u01]$ e l ic/u01/crs11g/bin/crs_stat -t
Name a V
l a b l
Type Target State Host
i r
i c i o V ansfe application ONLINE ONLINE vx0301
------------------------------------------------------------
a b r ora.vx0301.ons
ora.vx0301.gsd
- tr
F o n application
nora.vx0301.vip application ONLINE ONLINE vx0301
ONLINE ONLINE vx0301
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
V a
il running ra generic part of root.sh script.
Configuration
e
Finished
o s f
i product-specific
n
b r icNow t r a root actions will be performed.
on-
Fa n[oracle@vx0302
Finished product-specific root actions.
~]$ exit
logout
Connection to vx0302 closed.
[oracle@vx0301 ~]$
k) When the root.sh script has been run on both nodes, click OK on the Execute
Configuration scripts dialog box.
l) Click the Exit button on the End of Installation page to exit the installer. Click
Yes on the dialog box to finish.
2) Use DBCA to configure two disk groups, DATA and FRA using block devices
/dev/sd[c-f].
a) Set ORACLE_HOME=/u01/app/oracle/product/11.1.0/asm_1 and
execute dbca from /u01/app/oracle/product/11.1.0/asm_1/bin.
[oracle@vx0301 ~]$ export
ORACLE_HOME=/u01/app/oracle/product/11.1.0/asm_1
c m
o deฺ
The following environment variables are set as:
i ฺ
d Gui
ORACLE_OWNER= oracle
r e
ORACLE_HOME= /u01/app/oracle/product/11.1.0/db_1
@ sic dent
r e directory:
dbin S tu
Enter the full pathname of the local
e
[/usr/local/bin]:
v i lav e... t his
Copying dbhome to /usr/local/bin
ic i o_ o us ...
br/usr/local/bin
t
Copying oraenv to /usr/local/bin
Copying coraenv ato
( f n s e ...
e rde le lice
V/etc/oratab
Creating
V i l a
f e rbeabaddedfile...
i c
Entries
i s
o anConfiguration
will to the /etc/oratab file as needed by
b r Database
- t r Assistant when a database is created
Fa nNow on product-specific rootpart
Finished running generic of root.sh script.
actions will be performed.
Finished product-specific root actions.
[oracle@vx0302 ~]$ exit
logout
Connection to vx0302 closed.
[oracle@vx0301 ~]$
k) When the root.sh script has been run on both nodes, click OK on the Execute
Configuration scripts dialog box.
l) Click the Exit button on the End of Installation page to exit the installer. Click
Yes on the dialog box to finish.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
b) On the Welcome screen, select Oracle Real Application Cluster Database and
click Next. a
as
c) On the Operations screen, select Create a Database and click Next.
ฺbr )h
d) On the Node Selection screen, click the Select All button and click Next.
c m
o deฺ
e) On the Database Templates page, select General Purposeeor i ฺ
dTransaction
u i
r G
Processing and click Next to continue.
@ sic dent
f) On the Database Identification page, enter the r e Database
dGlobal S tu Name assigned to
you by your instructor (the SID field will a e
v this
autofill) and click Next.
i l
v scheck e box on the Management
g) Click the Configure Enterprise i o _Manager u
ric eDatabase
Options page. Select Configure
a b to Control for local management and
click Next.
e (f ens
e
h) On the Database
d
r Credentials
e l ic page, select Use the Same Administrative
l a l
V For aAllbAccounts. Enter oracle1 for the password and click Next.
i
V sfer
Password
i o
ici) Select n
aAutomatic Storage Management (ASM) from the Storage Options page
b r - t r
Fa non and click Next to continue.
j) On the ASM Disk Groups page, select the DATA disk group for the database
storage and click Next.
k) Select Oracle Managed Files on the Database File Locations page and enter
+DATA in the Database Area field. Click Next to continue.
l) On the Recovery Configuration page, click the Specify Flash Recovery Area
check box and enter +FRA for the Flash Recovery Area. Accept the default
value of 2048 for the Flash Recovery Area Size and click Next.
m) Click the Sample Schemas check box on the Database Content page and click
Next.
n) On the Initialization Parameters page click the Character Sets folder tab. In the
Database Character Set area select Use Unicode (AL32UTF8) and click Next to
continue.
o) Click the Keep the enhanced 11g security settings … check box on the Security
Settings page and click Next.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
1) Use Database Control to create two new redo log groups in your database. The two
groups must pertain to the thread number three, and each group must have only one
51200 KB member called redo05.log and redo06.log, respectively.
a) From Database Control Home page click the Server tab. In this example we use
RDB as your database, but make sure you are using the one you were assigned to.
b) On the Cluster Database Server page, click Redo Log Groups in the Storage
section.
s a
c) On the Redo Log Groups page, click Create.
)h a
d) On the Create Redo Log Group page, leave the current value of the Group# field m ฺbr
ฺ c
as is it is (5). Make sure that the File size field is set to 51200 KB. Set the
i o deฺ
r e d Gui
Thread# field to 3. Make sure that the File Directory field in the Redo Log
sic dent
Members section is set to +DATA. When you are finished, click OK.
@
e) This takes you back to the Redo Log Groups r e fromSwhere
dpage tu you should see a
e
Confirmation message giving you successful
v i lav estatus
t hison the new object creation.
i _ Create.
oclick us
f) On the Redo Log Groups page
r ic t o
g) On the Create Redo(fLog abGroup n e leave the current value of the Group# field
spage,
e e
c the File size field is set to 51200 KB. Set the
d surelithat
as is it is (6).rMake
Thread#V e
field to 3. l e
bSee thatWhen
the File Directory field in the Redo Log Members
i
V sfel
section
a is set r
to a
+DATA. you are finished, click OK.
i o
ich) This n you back to the Redo Log Groups page from where you should see a
atakes
b r - t r
Fa nonConfirmation message giving you successful status on the new object creation.
2) Use Database Control to set the RDB2.THREAD initialization parameter to 3 in
SPFILE only.
a) From Database Control Home page click the Server tab.
b) On the Server page, click the Initialization Parameters link in the Database
Configuration section.
c) On the Initialization Parameters page, click the SPFile tab.
d) On the SPFile page, click the Show All button.
e) Make sure that the “Apply changes in SPFile mode to the current running
instance(s). For static parameters, you must restart the database” check box is
deselected.
f) Scroll down the page to the end, and enter 3 in the Value field for the
RDB2.thread field.
3) Use the SRVCTL control utility to stop the RDB2 instance, and start it up again.
What happens and why? If necessary, fix the situation.
a) Although it is possible to stop the RDB2 instance, it is not possible to start it up
again because the redo thread number three is not enabled yet. To enable the redo
thread number three, you can connect to the first instance and issue the ALTER
DATABASE ENABLE THREAD 3 command. Then you can start up the RDB2
instance again. a
as
[oracle@vx0306 less04]$ cat sol_04_01_03.sh
#!/bin/bash ฺbr )h
#
c m
o deฺ
# sol_04_01_03.sh i ฺ
d Gui
r e
#
# Must be executed on NODE1 !!!!!!!!!! @ sic dent
#
e r de Stu
v i lav e this
y=`cat /home/oracle/nodeinfo
ic i o_ |osed us-n '1,1p'`
z=`cat /home/oracle/nodeinfo r t
ab nse | sed -n '2,2p'`
( f
DBNAME=`ps e rde| lgrep
-ef
e l i e
cdbw0_RDB | grep -v grep | grep -v
callout1
l a V
| awk
a b
'{ print $8 }' | sed 's/1/''/' | sed
i r
i c i o V ansfe
's/ora_dbw0_/''/'`
a b r I1NAME=$DBNAME"1"
- tr
F no n
I2NAME=$DBNAME"2"
/u01/crs11g/bin/crs_stat -t
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=$I1NAME
connect / as sysdba
set echo on
ALTER DATABASE ENABLE THREAD 3;
EOF
/u01/crs11g/bin/crs_stat -t
[oracle@vx0306 less04]$
de Stu
ora....SM2.asm application ONLINE ONLINE vx0313
ora....13.lsnr application ONLINE
e r
ONLINE vx0313
ora.vx0313.gsd application
i
ONLINE
v lav e this
ONLINE vx0313
ora.vx0313.ons application
ic i o_ o us
ONLINE ONLINE vx0313
abr nse t
ora.vx0313.vip application ONLINE ONLINE vx0313
( f
rde le lice
Database altered.
e
Name la V b
V i f e raType Target State Host
-t
ora....B1.inst
Fab nora....B2.inst
o n
ora.RDB.db
application
application
ONLINE
ONLINE
ONLINE
ONLINE
vx0313
vx0313
ora....SM1.asm application ONLINE ONLINE vx0306
ora....06.lsnr application ONLINE ONLINE vx0306
ora.vx0306.gsd application ONLINE ONLINE vx0306
ora.vx0306.ons application ONLINE ONLINE vx0306
ora.vx0306.vip application ONLINE ONLINE vx0306
ora....SM2.asm application ONLINE ONLINE vx0313
ora....13.lsnr application ONLINE ONLINE vx0313
ora.vx0313.gsd application ONLINE ONLINE vx0313
ora.vx0313.ons application ONLINE ONLINE vx0313
ora.vx0313.vip application ONLINE ONLINE vx0313
[oracle@vx0306 less04]$
4) Revert to the original situation where RDB2 was using the redo thread two, and
destroy redo thread number three. Make sure that in the end both instances are up and
running and managed by Oracle Clusterware.
v i l av this
echo "Reset thread to 2 for
i o _ secondu s einstance ..."
a b ric -se/NOLOG
to <<EOF
(f ens
$ORACLE_HOME/bin/sqlplus
e
connect V/e as
d
r sysdba
l e lic
ilaSYSTEM
ALTER b thread = 2 SCOPE=SPFILE SID='$I2NAME';
raSET
io V s f e
r i cEOF tran
Fab nechoon- "Stop second instance ..."
/u01/crs11g/bin/srvctl stop instance -d $DBNAME -i $I2NAME
connect / as sysdba
alter database disable thread 3;
alter database drop logfile group 5;
alter database drop logfile group 6;
EOF
System altered.
s a
Database altered.
)h a
m ฺbr
Database altered.
i ฺ c o deฺ
r e d Gui
@ sic dent
de Stu
Database altered.
e r s
Name Type
v i av thiState
lTarget Host
o_ oONLINE
us e
------------------------------------------------------------
i
ora....B1.inst application
b r ic t ONLINE vx0306
a V
ora....SM1.asm
b l e ONLINE ONLINE vx0306
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
e
Grant succeeded. rde le lice
l a V ab
i
V Manager: f er Release 11.1.0.6.0 - Production on Tue Nov
i o s
an 2007
ic20 15:46:45
Recovery
b r - t r
Fa non
Copyright (c) 1982, 2007, Oracle. All rights reserved.
CREATE CATALOG;
RMAN> exit
b) Return to the Availability folder and click Recovery Catalog Settings under
Backup/Recovery.
c) Next, click the Add Recovery Catalog button.
This practice shows you how to discover performance problems in your RAC
environment. In this practice, you identify performance issues using Enterprise Manager,
and you fix those issues in three different steps. At each step, you generate the same
workload to make sure you are making progress in your resolution.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
s a
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'`
)h a
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
m ฺbr
DBNAME=`ps -ef | grep dbw0_RDB | grep -v grep | dgrep i ฺco-vuideฺ
callout1 | awk '{ print $8 }' | sed 's/1/''/' i c re| sedt G
's/ora_dbw0_/''/'` @ s d e n
e r de Stu
I1NAME=$DBNAME"1"
v i lav e this
I2NAME=$DBNAME"2"
ic i o_ o us
( f a br se t
r d e licen
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
e ble
export ORACLE_SID=$I1NAME
V
V a
il fera
$ORACLE_HOME/bin/sqlplus -s /NOLOG <<EOF
i o
ic connect s
an/ as sysdba
b r - t r
Fa noexec n
dbms_advisor.set_default_task_parameter('ADDM','DB_ACTIVITY_MI
N',30);
exec
dbms_workload_repository.modify_snapshot_settings(interval=>60
0);
drop user jfv cascade;
drop tablespace seq including contents and datafiles;
create tablespace seq extent management local autoallocate
segment space management auto;
create user jfv identified by jfv default tablespace seq
temporary tablespace temp;
grant connect,resource,dba to jfv;
connect jfv/jfv
drop sequence s;
drop table s purge;
drop table t purge;
create table s(sn number);
create table t(c number,d varchar2(20));
EOF
[oracle@vx0306 less06]$ ./setupseq1.sh
s a
PL/SQL procedure successfully completed.
)h a
m ฺ br
drop user jfv cascade
i ฺ c o deฺ
*
r e d Gui
ERROR at line 1:
ORA-01918: user 'JFV' does not exist @ sic dent
e r de Stu
i v this
lacontents
drop tablespace seq including
o _ v s e and datafiles
*
b r ici to u
ERROR at line 1:
e (fa 'SEQ'
ORA-00959: tablespace
e n sedoes not exist
e rd le lic
l a V ab
i er
V sfcreated.
i o
ic -tran
Tablespace
b r
Fa non
User created.
Grant succeeded.
drop sequence s
*
ERROR at line 1:
ORA-02289: sequence does not exist
Table created.
Table created.
Index created.
1 row created. s a
)h a
m ฺ br
Commit complete.
i ฺ c o deฺ
r e d Gui
PL/SQL procedure successfully completed. @ sic dent
e r de Stu
[oracle@vx0306 less06]$
v i lav e this
ic i o_ o us
2) Using Database Control,fa
( brconnected
and s e tas user SYS, navigate to the Performance
page of your Cluster
r d eDatabase.
l i c en
e ble tab on the Cluster Database Home page.
a) ClickatheVPerformance
V il fera
i cb)o On s Database Performance page, make sure Real Time: 15 Seconds
i rtheanCluster
r t is selected from the View Data dropdown list.
Fab non-
Refresh
3) Use PL/SQL to create a new AWR snapshot.
[oracle@vx0306 less06]$ cat sol_06_01_03.sh
#!/bin/bash
#
# sol_06_01_03.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
I1NAME=$DBNAME"1"
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=$I1NAME
connect / as sysdba
exec dbms_workload_repository.create_snapshot
EOF
[oracle@vx0306 less06]$
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
connect jfv/jfv@&1
declare
v number;
begin
for i in 1..40000 loop
lock table s in exclusive mode;
select sn into v from s;
insert into t values(v,'&1');
update s set sn=sn+1;
commit;
end loop;
end; s a
/
)h a
m ฺ br
exit;
i ฺ c o deฺ
[oracle@vx0306 less06]$
r e d Gui
[oracle@vx0306 less06]$ ./startseq1.sh
@ sic dent
[oracle@vx0306 less06]$ old 7:
e r de into
insert
S tu t
values(v,'&1');
v i lav e this
new 7:
_ us
insert into t values(v,'RDB1');
insert into c t io
old 7:
b i values(v,'&1');
to
r t values(v,'RDB2');
new 7:
a
insert into
(f ens e
d e
r after l ic point.
… Do not wait
e
V ab l e this
i l a
V sfer successfully completed.
PL/SQL procedure
i o
ic -tran
b r
Fa nPL/SQL
on procedure successfully completed.
[oracle@vx0306 less06]$
5) Using Database Control, determine the list of blocking locks in your database.
a) Still on the Performance page, click the Database Locks link in the Additional
Monitoring Links section of the page.
b) On the Database Locks page, make sure that Blocking Locks is selected from the
View dropdown list.
c) If you do not see any locks, refresh the page by clicking Refresh. Perform this
until you see locks. When you see a session lock, you should also see that the
other session is waiting for that same lock. By clicking Refresh several times, you
should see that both sessions are alternately waiting for the other to release the
exclusive lock held on table S.
conclusions?
a) On the Cluster Database Home page, click the Performance tab.
b) On the Performance page, click the Cluster Cache Coherency link in the
Additional Monitoring Links section.
c) The Cluster Cache Coherency page clearly shows that there are lots of blocks
transferred per second on the system. This represents more than 17% of the total
logical reads. This is reflected in both the Global Cache Block Transfer Rate and
the Global Cache Block Transfers and Physical Reads (vs. Logical Reads)
graphics.
d) On the Cluster Cache Coherency page, you can also click Interconnects in the
Additional Links section of the page to get more information about your private
interconnect.
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=$I1NAME
connect / as sysdba
exec dbms_workload_repository.create_snapshot
s a
EOF
)h a
[oracle@vx0306 less06]$
m ฺbr
i ฺ c o deฺ
[oracle@vx0306 less06]$ ./sol_06_01_09.sh
r e d Gui
PL/SQL procedure successfully completed. @ sic dent
e r de Stu
[oracle@vx0306 less06]$
v i lav e this
10) Using Database Control, review the
ic i o_latestoADDM
us run. What are your conclusions?
r
abHomenspage, t
e click the Advisor Central link.
a) On the Cluster Database
e ( f
b) On the Advisor rd Central l e
ic make sure that the Advisory Type field is set to All
page,
Types,
e l e
V thatatheb Advisor Runs field is set to Last Run. Click Go.
and
i l a
Vthe Results ertable, select the latest ADDM run corresponding to Instance All.
i
c)o In s f
n View Result. This takes you to the Automatic Database Diagnostic
b r ic Then- t r aclick
Fa nonMonitor (ADDM) page.
d) On the Automatic Database Diagnostic Monitor (ADDM) page, the ADDM
Performance Analysis table shows you the consolidation of ADDM reports from
all instances running in your cluster. This is your first entry point before drilling
down to specific instances. From there, investigate the Top SQL by DB Time,
Table Locks, and Top SQL by Cluster Wait findings.
e) The Top SQL by DB Time should reveal a LOCK TABLE S command as a
possible problem to investigate.
f) The Table Lock finding, which affects both instances, reveals that you should
investigate your application logic regarding the JFV.S object.
g) The Top SQL by Cluster Wait finding again reveals the LOCK TABLE S
command embedded in a PL/SQL block.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
connect / as sysdba
exec
dbms_advisor.set_default_task_parameter('ADDM','DB_ACTIVITY_MI
N',30);
exec
dbms_workload_repository.modify_snapshot_settings(interval=>60
0);
drop user jfv cascade;
drop tablespace seq including contents and datafiles;
create tablespace seq extent management local autoallocate
segment space management auto;
create user jfv identified by jfv default tablespace seq
temporary tablespace temp;
grant connect,resource,dba to jfv;
connect jfv/jfv
drop table s purge;
drop sequence s;
drop table t purge;
begin
for i in 1..90000 loop
insert into t values (i,'initial');
end loop;
end;
/
EOF
[oracle@vx0306 less06]$
drop sequence s
*
ERROR at line 1:
ORA-02289: sequence does not exist
Table created.
Index created.
Sequence created.
[oracle@vx0306 less06]$ s a
)h a
2) Using Database Control, and connected as user SYS, navigate to the Performance
page of your Cluster Database. m ฺbr
i ฺ c o deฺ
e
a) Click the Performance tab on the Cluster Database Home rpage.d Gui
c
siReal n t15 Seconds
b) On the Cluster Database Performance page, make@ sure
e list.Stud e
Time:
r d
Refresh is selected from the View Data dropdown
3) Use PL/SQL to create a new AWR snapshot. i l a ve this
i o _v use
[oracle@vx0306 less06]$
a b riccatesol_06_02_03.sh
to
#!/bin/bash
e (f ens
#
e r le lic
d
l a V ab
# sol_06_02_03.sh
# i er
V be sexecuted
#oMust f
i c i n on NODE1 !!!!!!!!!!
a b r #
n - tra
F no
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'`
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=$I1NAME
connect / as sysdba
exec dbms_workload_repository.create_snapshot
[oracle@vx0306 less06]$
rde le lice
's/ora_dbw0_/''/'`
e
l a V ab
i
V sfer
I1NAME=$DBNAME"1"
i o an
icI2NAME=$DBNAME"2"
b r - t r
Fa non export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
set echo on
connect jfv/jfv@&1
declare
v number;
begin
for i in 1..40000 loop
lock table s in exclusive mode;
exit;
[oracle@vx0306 less06]$
's/ora_dbw0_/''/'`
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=$I1NAME
connect / as sysdba
exec dbms_workload_repository.create_snapshot
EOF
[oracle@vx0306 less06]$
[oracle@vx0306 less06]$
7) Using Database Control, review the latest ADDM run. What are your conclusions?
a) On the Cluster Database Home page, click the Advisor Central link.
b) On the Advisor Central page, make sure that the Advisory Type field is set to All
Types and that the Advisor Runs field is set to Last Run. Click Go.
c) In the Results table, select the latest ADDM run corresponding to Instance All.
Then click View Result. This takes you to the Automatic Database Diagnostic
Monitor (ADDM) page.
d) On the Automatic Database Diagnostic Monitor (ADDM) page, the ADDM a
Performance Analysis table shows you the consolidation of ADDM reports from as
)h
ฺbr
all instances running in your cluster. This is your first entry point before drilling
down to specific instances. From there, investigate the Top SQL by DB Time,
c m
o deฺ
Top SQL by Cluster Wait, and Sequence Usage findings. i ฺ
d Gui
e) The Top SQL by DB Time should reveal an INSERTsINTO
r e
ic Tecommand t using
@ n
sequence S as a possible problem to investigate.e
r d S t ud
f) The Top SQL by Cluster Wait findingareveals
i l ve the t is statement as above: an
hsame
INSERT INTO T command using v
o_ o us
sequence eS.
ic i
g) The Sequence Usage finding,
( f a br which s e t affects both instances, reveals a high
frequency of sequence cache n
r d e lice misses.
e bDatabase
h) On the Automatic
V le Diagnostic Monitor (ADDM) page, you now have the
i l a
possibility
V r a
to drill
e down to each instance using the links located in the Affected
o
i ran
Instances s f
table. Click the link corresponding to the most affected instance
r i c t
Fab non-
(although both should be equally affected).
8) On the corresponding ADDM Database Diagnostic Monitor (ADDM) instance page,
you should retrieve exactly the same top findings that you previously saw at the
cluster level.
's/ora_dbw0_/''/'`
e r de Stu
v i lav e this
I1NAME=$DBNAME"1"
ic i o_ o us
I2NAME=$DBNAME"2" abr e t
( f
e licen s
r d
e ble
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
V
export aORACLE_SID=$I1NAME
V il fera
r i c i rans
o
$ORACLE_HOME/bin/sqlplus -s /NOLOG <<EOF
b - t
Fa noconnectn / as sysdba
exec
dbms_advisor.set_default_task_parameter('ADDM','DB_ACTIVITY_MI
N',30);
exec
dbms_workload_repository.modify_snapshot_settings(interval=>60
0);
drop user jfv cascade;
drop tablespace seq including contents and datafiles;
create tablespace seq extent management local autoallocate
segment space management auto;
create user jfv identified by jfv default tablespace seq
temporary tablespace temp;
grant connect,resource,dba to jfv;
connect jfv/jfv
drop table s purge;
drop sequence s;
drop table t purge;
create table t(c number,d varchar2(20));
begin
for i in 1..90000 loop
insert into t values (i,'initial');
end loop;
end;
/
EOF
[oracle@vx0306 less06]$
drop sequence s
*
ERROR at line 1:
ORA-02289: sequence does not exist
Table created.
Index created.
Sequence created.
[oracle@vx0306 less06]$
s a
2) Using Database Control, and connected as user SYS, navigate to the Performance
)h a
page of your Cluster Database.
m ฺbr
a) Click the Performance tab on the Cluster Database Home page.iฺco
d e ฺ
reTime: u i
d 15GSeconds
b) On the Cluster Database Performance page, make sure iRealc t
Refresh is selected from the View Data dropdown@ list.s d e n
3) Use PL/SQL to create a new AWR snapshot.ver
de Stu
i l a t h is
v
[oracle@vx0306 less06]$ cat_ sol_06_03_03.sh e
r ic io o us
ab nse t
#!/bin/bash
#
( f
# sol_06_03_03.sh
e rde le lice
#
l a V ab on NODE1 !!!!!!!!!!
# Must
#o V
i er
be executed
f
i
ic -tran s
b r
Fa ny=`cat
on /home/oracle/nodeinfo | sed -n '1,1p'`
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=$I1NAME
connect / as sysdba
exec dbms_workload_repository.create_snapshot
[oracle@vx0306 less06]$
4) Execute the startseq2.sh script to generate the same workload on both instances of
your cluster as for the previous practice. Do not wait; instead, proceed with the next
step.
[oracle@vx0306 less06]$ cat startseq2.sh
#!/bin/bash
s a
#
)h a
# startseq2.sh
m ฺbr
#
i ฺ c o deฺ
# Must be executed on NODE1 !!!!!!!!!!
# r e d Gui
@ sic dent
y=`cat /home/oracle/nodeinfo | seder-n de'1,1p'`
S tu
z=`cat /home/oracle/nodeinfo |
v i e his
v -n t'2,2p'`
lased
ic io_ o|ugrep
DBNAME=`ps -ef | grep rdbw0_RDB
s
a b e t -v grep | grep -v
callout1 | awk '{(fprint $8s }' | sed 's/1/''/' | sed
r d e licen
's/ora_dbw0_/''/'`
V e ble
V a
il fera
I1NAME=$DBNAME"1"
r i c i rans
o
t
Fab non-
I2NAME=$DBNAME"2"
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
set echo on
connect jfv/jfv@&1
declare
v number;
begin
for i in 1..40000 loop
lock table s in exclusive mode;
exit;
[oracle@vx0306 less06]$
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=$I1NAME s a
)h a
$ORACLE_HOME/bin/sqlplus -s /NOLOG <<EOF
m ฺbr
i ฺ c o deฺ
connect / as sysdba
r e d Gui
exec dbms_workload_repository.create_snapshot
@ sic dent
EOF
e r de Stu
[oracle@vx0306 less06]$
v i lav e this
i o_ o us
[oracle@vx0306 less06]$c./sol_06_03_06.sh
i
( f a br se t
r d e licen
PL/SQL procedure successfully completed.
V e less06]$b le
i l a
[oracle@vx0306
VDatabase r a
eControl,
i
7) Usingo n s f review the latest ADDM run. What are your conclusions?
r i c t r a
Fab na)onOn- the Cluster Database Home page, click the Advisor Central link.
b) On the Advisor Central page, make sure that the Advisory Type field is set to All
Types and that the Advisor Runs field is set to Last Run. Click Go.
c) In the Results table, select the latest ADDM run corresponding to Instance All.
Then click View Result. This takes you to the Automatic Database Diagnostic
Monitor (ADDM) page.
d) On the Automatic Database Diagnostic Monitor (ADDM) page, the ADDM
Performance Analysis table shows you the consolidation of ADDM reports from
all instances running in your cluster. This is your first entry point before drilling
down to specific instances. From there, investigate the “Top SQL by DB Time”
and “Top SQL by Cluster Wait” findings. You should no longer see the Sequence
Usage or the specific instances affected.
e) The “Top SQL by DB Time” finding should reveal an INSERT INTO T
command using sequence S as a possible problem to investigate.
f) The “Top SQL by Cluster Wait” finding reveals the same statement as above: an
INSERT INTO T command using sequence S.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
In this practice, you create a service, manipulate it, and monitor it.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
NAME=ora.RDB.RDB2.inst
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0313 s a
)h a
NAME=ora.RDB.SERV1.RDB1.srv
m ฺbr
TYPE=application
i ฺ c o deฺ
TARGET=ONLINE
r e d Gui
STATE=ONLINE on vx0306
@ sic dent
NAME=ora.RDB.SERV1.cs
e r de Stu
TYPE=application
v i lav e this
TARGET=ONLINE
STATE=ONLINE on vx0306 cio
_ us
b i
r e to
NAME=ora.RDB.db (f
a ns
d e c e
er ble li
TYPE=application
V
V ila ferona vx0313
TARGET=ONLINE
STATE=ONLINE
r i c io rans
t
Fab nTYPE=application
on-
NAME=ora.vx0306.ASM1.asm
TARGET=ONLINE
STATE=ONLINE on vx0306
NAME=ora.vx0306.LISTENER_VX0306.lsnr
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0306
NAME=ora.vx0306.gsd
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0306
NAME=ora.vx0306.ons
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0306
NAME=ora.vx0313.ASM2.asm
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0313
NAME=ora.vx0313.LISTENER_VX0313.lsnr
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0313
NAME=ora.vx0313.gsd s a
TYPE=application
)h a
TARGET=ONLINE
m ฺbr
STATE=ONLINE on vx0313
i ฺ c o deฺ
r e d Gui
NAME=ora.vx0313.ons
TYPE=application @ sic dent
TARGET=ONLINE
e r de Stu
STATE=ONLINE on vx0313
v i lav e this
NAME=ora.vx0313.vip
ic i o_ o us
TYPE=application
( f a br se t
TARGET=ONLINE
r d e vx0313l i c en
V e ble
STATE=ONLINE on
V a
il SERV1e rais running on instance(s) RDB1
Service
o
i ran s f
b r ic[oracle@vx0306
t
less07]$
Fa non-
3) Add SERV1 to the tnsnames.ora files on both nodes to both oracle homes. When you
are finished, make sure listeners are aware of its existence.
[oracle@vx0306 less07]$ cat sol_07_01_03.sh
#!/bin/ksh
#
# sol_07_01_03.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
sed 's/NODE1/'$y'/'
/home/oracle/solutions/less07/wrong_tnsserv1.ora >
/home/oracle/solutions/less07/w1tnsserv1.ora
sed 's/NODE2/'$z'/'
/home/oracle/solutions/less07/w1tnsserv1.ora >
/home/oracle/solutions/less07/tnsserv1.ora
cp
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
.bak1 s a
cat /home/oracle/solutions/less07/tnsserv1.ora >>
)h a
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
m ฺbr
i ฺ c o deฺ
cp
r e d Gui
a @ sic dent
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
r de Stu
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
e
a.bak2
v i lav e this
o _
cat /home/oracle/solutions/less07/tnsserv1.ora
s >>
b r ici to u
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
(fa ense
a
ssh $z cp erd
e l ic
a V ab l e
i l
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
V sfer
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
i o
ic -tran
.bak1
b r
Fa nssh on $z cp
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
a
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
a.bak2
scp /home/oracle/solutions/less07/tnsserv1.ora
$z:/home/oracle/solutions/less07
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/asm_1
[oracle@vx0306 less07]$
SERV1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = NODE1-vip)(PORT =
1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = NODE2-vip)(PORT =
1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA = s a
(SERVER = DEDICATED)
)h a
(SERVICE_NAME = SERV1)
m ฺbr
)
i ฺ c o deฺ
)
r e d Gui
[oracle@vx0306 less07]$ @ sic dent
e r de Stu
v i lav e this
o_ o us
[oracle@vx0306 less07]$ ./sol_07_01_03.sh
tnsserv1.ora
r ic i 100% 268
b t
0.3KB/s 00:00
e
Service "SERV1" has
e n se
(fa 1 instance(s).
e rd le lic
V aless07]$
l a r b
[oracle@vx0306
V i f e
r i c io rans
t
Fab non-
4) Connect as SYSTEM under each instance and look at the current value of the
SERVICE_NAMES initialization parameter, and check that it is set correctly.
[oracle@vx0306 less07]$ cat sol_07_01_04.sh
#!/bin/ksh
#
# sol_07_01_04.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
I2NAME=$DBNAME"2"
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
set echo on
connect system/oracle1@$I1NAME
select instance_name from v\$instance;
show parameter service
connect system/oracle1@$I2NAME
select instance_name from v\$instance;
show parameter service s a
)h a
EOF
m ฺbr
[oracle@vx0306 less07]$
i ฺ c o deฺ
[oracle@vx0306 less07]$ ./sol_07_01_04.sh icre
d Gui
@ s dent
INSTANCE_NAME
e r de Stu
----------------
v i lav e this
o_ o us
RDB1
ic i
( f a br se t
NAME
r d e licen TYPE VALUE
V e ble
------------------------------------ ----------- -------------
ila fera
-----------------
V
service_names string SERV1, RDB
i o an
icINSTANCE_NAMEs
b r - t r
Fa n----------------
on
RDB2
e
[oracle@vx0306 less07]$(fa encat sesol_07_01_06_a.sh
#!/bin/ksh rd
e e l ic
#
l a V ab l
i
V sfer
# sol_07_01_06_a.sh
i o
ic# Must
#
aben executed on NODE1 !!!!!!!!!!
b r - t r
Fa n#on
/u01/crs11g/bin/evmwatch -A -t "@timestamp @@"
[oracle@vx0306 less07]$
@ sic dent
"14-Nov-2007 09:45:14 CRS ora.RDB.SERV1.RDB1.srv was modified"
"14-Nov-2007 09:44:47 RAC: ora.RDB.RDB2.inst: imcheck: "
r de Stu
"14-Nov-2007 09:44:47 RAC: ora.RDB.RDB2.inst: imup: "
e
v i lav e this
"14-Nov-2007 09:45:45 RAC: ora.RDB.RDB1.inst: up: "
o_ o us
"14-Nov-2007 09:45:45 RAC: ora.RDB.RDB1.inst: imstop: "
ic i
"14-Nov-2007 09:45:45 RAC: ora.RDB.RDB1.inst: imcheck: "
( f abr nse t
"14-Nov-2007 09:45:45 CRS ora.RDB.SERV1.RDB1.srv was modified"
rde le lice
"14-Nov-2007 09:45:45 CRS ora.RDB.RDB1.inst started on member
vx0306" e
V ab
i l a
"14-Nov-2007 09:45:08 RAC: ora.vx0313.ASM2.asm: imcheck: "
V sfer
"14-Nov-2007 09:45:08 RAC: ora.vx0313.ASM2.asm: imup: "
i o
ic -tran
"14-Nov-2007 09:46:42 RAC: ora.vx0306.ASM1.asm: imcheck: "
b r
Fa non
"14-Nov-2007 09:46:42 RAC: ora.vx0306.ASM1.asm: imup: "
I2NAME=$DBNAME"2"
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
s a
echo "Killing smon..."
)h a
m ฺ br
/home/oracle/solutions/less07/z.sh
i ฺ c o deฺ
r e d Gui
echo "waiting for instance back ..."
@ sic dent
sleep 120
e r de Stu
v i lav e this
o_ o us
export ORACLE_SID=$I1NAME
ic i
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
( f a br se t
$ORACLE_HOME/bin/sqlplusn-s /NOLOG <<EOF
e rde le lice
connect V
l a rab
system/oracle1@$I1NAME
V
selecti f e
instance_name from v\$instance;
i o
ic connect
show s
ansystem/oracle1@$I2NAME
parameter service
b r - t r
Fa noselectn instance_name from v\$instance;
show parameter service
EOF
[oracle@vx0306 less07]$
INSTANCE_NAME
----------------
RDB1
INSTANCE_NAME
----------------
RDB2
s a
7) Using Grid Control, check that SERV1 is running on RDB2. )h a
m ฺ br
a) Connect as user SYS in Database Control. On the Cluster Home page, click theฺ
o Database
d i
Availability tab. On the Availability page, click the Cluster Managed
e
ฺ c
u i de
r
Services link in the Services section. On the Cluster andicDatabase t G page,
Login
s n
click Continue.
r d e@ Stude
b) On the Cluster Managed Database Services
i l a vepage,thyou
is should see SERV1 up and
running on the second instance only
i o _v use
with a warning.
c) On Cluster Managed Database
a b ric Services
e to page, click the SERV1 link.
d) On the SERV1 page,e (f you should
e ns see that SERV1 is stopped on the preferred
d
erup onbthe
instance and li c
available instance.
a V l e
V il fera
r i c i rans
o
t
Fab non-
c m
o deฺ
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'` ed i ฺ u i
r G
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
@ sic dent
DBNAME=`ps -ef | grep dbw0_RDB | grep
e r de-v grep
S tu| grep -v
callout1 | awk '{ print $8 }' l|av
v i t his | sed
sed 's/1/''/'
e
's/ora_dbw0_/''/'`
ic i o_ o us
I1NAME=$DBNAME"1" fab
r et
d e (
c e ns
V er ble li
I2NAME=$DBNAME"2"
V ilaORACLE_SID=$I1NAME
f e ra
o
export
icexport n s
i raORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
b r - t
Fa non $ORACLE_HOME/bin/sqlplus -s /NOLOG <<EOF
connect / as sysdba
drop user JFV cascade;
create user JFV identified by jfv default tablespace users
temporary tablespace temp;
grant connect, resource, dba to JFV;
EOF
[oracle@vx0306 less07]$
User dropped.
User created.
[oracle@vx0306 less07]$
2) From a terminal session connected to node1, using SQL*Plus, connect to SERV1
with user JFV. When connected, determine the instance on which your session is
currently running. Then execute the following query: select count(*) from
dba_objects,dba_objects,dba_objects. Do not wait; instead, proceed with
the next step.
[oracle@vx0306 less07]$ cat sol_07_02_02.sh
#!/bin/ksh
#
# sol_07_02_02.sh
#
# Must be executed on NODE1 !!!!!!!!!! s a
#
)h a
m ฺbr
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'` diฺc
o deฺ
r e u i
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
sic dent G
@
e-v grep tu| grep -v
DBNAME=`ps -ef | grep dbw0_RDB | grep
e rd's/1/''/'
S
callout1 | awk '{ print $8 }' | v
i l a sed
t h is | sed
's/ora_dbw0_/''/'`
i o _v use
I1NAME=$DBNAME"1"
a b ric e to
e (f ens
e r le lic
I2NAME=$DBNAME"2"d
l a V ab
i
export
f er
V ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
ORACLE_SID=$I1NAME
i o
ic -tran
export s
b r
Fa n$ORACLE_HOME/bin/sqlplus
on -s /NOLOG <<EOF
connect jfv/jfv@SERV1
select instance_name from v\$instance;
select count(*) from dba_objects,dba_objects,dba_objects;
EOF
[oracle@vx0306 less07]$
INSTANCE_NAME
----------------
RDB2
@ sic dent
instances currently running the service. You can also click the SERV1 link itself
to look at the detailed Statistics of the corresponding service.
e r de fromSatSQL*Plus
u
i l a v this
4) Check statistics on your service with gv$service_stats session
connected as SYSDBA.
i o _v use
[oracle@vx0306 less07]$
a b riccatesol_07_02_04.sh
to
#!/bin/ksh
e (f ens
#
e r le lic
d
l a V ab
# sol_07_02_04.sh
# i er
V be sexecuted
#ioMust f
r i c t r a n on NODE1 !!!!!!!!!!
Fab non-
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
connect system/oracle1@$I1NAME
EOF
[oracle@vx0306 less07]$
INSTANCE_NAME
----------------
RDB1
STAT_NAME
SUM(VALUE) s a
--------------------------------------------------------------
)h a
-- ----------
m ฺbr
user calls
i ฺ c o deฺ
21
r e d Gui
DB CPU
212910000 @ sic dent
redo size
e r de Stu
1076
v i lav e this
o_ o us
db block changes
6
ic i
DB time
( f abr nse t
rde le lice
216690394
e
user rollbacks
V ab
0
i l a
V sfer
gc cr blocks received
i o
ic -tran
8
b r
Fa non
gc cr block receive time
0
gc current blocks received
6
opened cursors cumulative
42
workarea executions - multipass
0
STAT_NAME
SUM(VALUE)
--------------------------------------------------------------
-- ----------
session cursor cache hits
8
user I/O wait time
10798
parse count (total)
41
physical reads 2
STAT_NAME SUM(VALUE)
--------------------------------------------------------------
-- ----------
session logical reads 3377
cluster wait time 7896
application wait time 0
logons cumulative 1
sql execute elapsed time 216621181 s a
user commits 0
)h a
m ฺ br
28 rows selected.
i ฺ c o deฺ
r e d Gui
[oracle@vx0306 less07]$
@ sic dent
5) Using Database Control, relocate SERV1 to its preferred
r d e instance.
S tu
a) Click the Cluster Database link at theila
e
topvof your is Database Control page.
v e t hcurrent
i o_ o page
b) This takes you back to the Performance
ic us for your database. Click the
Availability tab. ab nser t
( f
e rde lpage,
c) On the Availability l i e Cluster Managed Database Services.
cclick
e Database Services: Cluster and Database Login page,
d) On the l a V aManaged
Cluster b
i
V Continue.
click f er
i o s
ice) On-trtheanCluster Managed Database Services page, click SERV1.
b r
Fa non f) On the Cluster Managed Database Services: SERV1 page, select the Available
instance (RDB2 in this example) and click Relocate.
g) On the Relocate Service from instance page, make sure the Preferred instance
(RDB1 in this example) is selected, and click OK.
h) On the Cluster Managed Database Service: SERV1 page, you should see a
successful Service Relocate status at the top of the page. Also, the Instances table
should indicate that SERV1 is now running on its preferred instance.
6) What happens to your already connected SERV1 session running on the second
instance?
a) You can see that although the service has been switched to RDB1, your session is
still executing under SERV1 on RDB2. So, if you want to manually relocate a
service, you should make sure that no session is currently connected. From a
terminal window, execute the following.
[oracle@vx0306 less07]$ cat sol_07_02_06.sh
#!/bin/ksh
I1NAME=$DBNAME"1"
s a
I2NAME=$DBNAME"2"
)h a
m ฺ br
export ORACLE_SID=$I1NAME
i ฺ c o deฺ
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
r e d Gui
$ORACLE_HOME/bin/sqlplus -s /NOLOG <<EOF @ sic dent
connect system/oracle1@$I1NAME ve
rde s Stu
v i la e thifrom gv\$session where
o_ o us
select inst_id, username, service_name
username = 'JFV';
ic i
( f a br se t
EOF
r d eless07]$
l i c en./sol_07_02_06.sh
e ble
[oracle@vx0306
V
V a
INST_ID e ra
il fUSERNAME
o s
i ran ------------------------------
ic----------
b r t
on-
Fa n--------------------------------------------------------------
SERVICE_NAME
--
2 JFV
SERV1
[oracle@vx0306 less07]$
b) If your first session is still executing the query, stop its execution by pressing
[Ctrl] + [C].
1) Set alert thresholds for your service SERV1 by using Database Control. Specify the
values defined above.
a) From the Cluster Database Home page, click the link corresponding to your first
instance in the Instances table. This is the instance currently running SERV1.
s a
b) On the Database Instance page, click Metric and Policy settings in the Related
)h a
Links section at the bottom of the page.
m ฺbr
c) On the Metric and Policy Settings page, select All metrics fromithe ฺ c oView deฺ
dropdown list. r e d Gui
ic ent
syou
d) Scroll down the Metric and Policy Settings pageeuntil
d @ t d the Service
find
u
Response Time (per user call) (microseconds)
v r
e metric. s S
l a h i
t icon in the last column (Edit
o _ vi multi-pens
e) On the same line, click the corresponding
s e
column).
b r ici to u
f) On the Edit Advanced (faSettings:n e Response Time (per user call)
sService
(microseconds) e
rd page,leclick
l e
ic Add.
e
V aObjects
V a
g) TheilMonitored
f e r b table should now show two entries.
i ch) s in the Service Name field, 40000000 in the Warning Threshold
io EnterraSERV1
n
r -t and 100000000 in the Critical Threshold field. Make sure the corresponding
Fab nonfield,
line is selected, and click Continue.
i) On the Metric and Policy Settings page, you should see an Information warning
explaining that your settings have been modified but not saved. Click OK to save
the new settings.
j) On the Confirmation page, you can see an Update succeeded message. Click OK.
k) This takes you back to the Database Instance page.
2) Use Database Control to print the Service Response Time Metric Value graphic for
SERV1.
a) From the Database Instance page, click All Metrics in the Related Links section at
the bottom of the page.
b) On the All Metrics page, expand the Database Services link. On the All Metrics
page, click the Service Response Time (per user call) (microseconds) link.
c) On the Service Response Time (per user call) (microseconds) page, click the
SERV1 link in the Service Name column.
c m
o deฺ
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'` ed
i ฺ u i
r G
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
@ sic dent
e r de-v grep
S tu| grep -v
his | sed
DBNAME=`ps -ef | grep dbw0_RDB | grep
callout1 | awk '{ print $8 }' il|av t
sed 's/1/''/'
v
o_ o us e
's/ora_dbw0_/''/'`
ic
r eti
I1NAME=$DBNAME"1"(fab
d e c e ns
V er ble li
I2NAME=$DBNAME"2"
V i la fera
i c n s
io raORACLE_SID=$I1NAME
export
r t
Fab non-
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
connect jfv/jfv@SERV1
DECLARE
t number;
BEGIN
for i in 1..10000 loop
select count(*) into t from dba_objects;
end loop;
END;
/
EOF
[oracle@vx0306 less07]$
[oracle@vx0306 less07]$
a) Still looking at the Service Response Time (per user call) (microseconds): Service
Name SERV1 page on your first session, you should see the graphic crossing the
warning threshold after few minutes. This will trigger a warning alert soon after
the warning threshold is crossed.
b) You can see this alert propagated to your Database Instance Home page, and
Cluster Database Home page.
c) To go back to your Database Instance Home page, click the Database Instance a
locator link on the Service Response Time page. as
d) You should see the warning raised in the Alerts section of the Database Instance
)h ฺbr
page. c m
o deฺ
i ฺ
d linkGofuithe
e) On the Database Instance page, click the Cluster Database r e
locator
page.
@ sic dent
f) You should see the warning alert in the Problem e r deServices
S tuline in the High
Availability section of the page. Clicking i lavthiselink
t is you to the Cluster Home
htakes
v
_ SERV1
page. From there you can click
Managed Database Services: r ic i othe
SERV1 t o usafter
link to directly go to the Cluster
Fa non
EOF
[oracle@vx0306 less07]$
[oracle@vx0306 less07]$
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
V i f e r
/home/oracle/solutions/less08/wrong_callout1.sh >
r i c io rans
/home/oracle/solutions/less08/callout1.sh
t
Fab ncat on-/home/oracle/solutions/less08/callout1.sh
cp /home/oracle/solutions/less08/callout1.sh
/u01/crs11g/racg/usrco/
scp /u01/crs11g/racg/usrco/callout1.sh
$z:/u01/crs11g/racg/usrco/
NOTIFY_EVENTTYPE=$1
AWK=/usr/bin/awk
for ARGS in $*; do
PROPERTY=`echo $ARGS | $AWK -F"=" '{print $1}'`
i c i o V ansfe
#!/bin/sh
a b r NOTIFY_EVENTTYPE=$1
- tr
F o n
nAWK=/usr/bin/awk
for ARGS in $*; do
PROPERTY=`echo $ARGS | $AWK -F"=" '{print $1}'`
VALUE=`echo $ARGS | $AWK -F"=" '{print $2}'`
case $PROPERTY in
VERSION|version) NOTIFY_VERSION=$VALUE ;;
SERVICE|service) NOTIFY_SERVICE=$VALUE ;;
DATABASE|database) NOTIFY_DATABASE=$VALUE ;;
INSTANCE|instance) NOTIFY_INSTANCE=$VALUE ;;
HOST|host) NOTIFY_HOST=$VALUE ;;
STATUS|status) NOTIFY_STATUS=$VALUE ;;
REASON|reason) NOTIFY_REASON=$VALUE ;;
CARD|card) NOTIFY_CARDINALITY=$VALUE ;;
TIMESTAMP|timestamp) NOTIFY_LOGDATE=$VALUE ;;
??:??:??) NOTIFY_LOGTIME=$PROPERTY ;;
esac
done
2) Create two new services. The first one is called SCO1 and has RDB1 as its preferred
s a
)h
instance, and RDB2 as its available instance. The second is called SCO2 and has a
RDB2 as its preferred instance, and RDB1 as its available instance.
m ฺbr
i ฺ c o deฺ
[oracle@vx0306 less08]$ cat sol_08_01_02.sh
#!/bin/ksh r e d Gui
#
@ sic dent
# sol_08_01_02.sh
e r de Stu
lav e this
#
v i
# Must be executed on NODE1 !!!!!!!!!!
#
ic i o_ o us
( f abr nse t
r d e lice
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'`
e
V ab l e
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
i l
V sf-efa er | grep dbw0_RDB | grep -v grep | grep -v
i o
DBNAME=`ps
iccallout1 an| awk '{ print $8 }' | sed 's/1/''/' | sed
b r - t r
Fa n's/ora_dbw0_/''/'`
on
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
4) Run the following command on one terminal window on the second node. We call s a
that window TW1N2: evmwatch -A -t "@timestamp @@"
)h a
Do not wait; proceed with the next step.
m ฺbr
i ฺ c o deฺ
[oracle@vx0313 less08]$ cat sol_08_01_04.sh
r e d Gui
sic dent
#!/bin/ksh
#
# sol_08_01_04.sh @
de Stu
e r
lav e this
#
# Must be executed on NODE2 v i
!!!!!!!!!!
#
ic i o_ o us
( f abr nse t
r de lice -A -t "@timestamp @@"
/u01/crs11g/bin/evmwatch
e
[oracle@vx0313
l a le
V aless08]$
b
i
V sfer less08]$ ./sol_08_01_04.sh
i o
ic -tran
[oracle@vx0313
b r
Fa 5) nFrom
on another terminal window connected to node1 (TW2N1), start the SCO1 service
using srvctl. When finished, look at terminal windows TW1N1 and TW1N2, and then
look at the generated log files in the /u01/crs1020/racg/log directory by using
TW2N1. What do you observe?
a) You should see that only the log on the first instance contains the start of SCO1.
b) On TW2N1 you can see:
[oracle@vx0306 less08]$ cat sol_08_01_05.sh
#!/bin/ksh
#
# sol_08_01_05.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
sleep 10
cat /u01/crs11g/racg/log/crsevtco.log
V a a
l fer03:11:27
from istate OFFLINE ONLINE on member vx0306"
a b r vx0306" - tr
transitioning
F no n
"15-Nov-2007 03:11:27 RAC: ora.RDB.SCO1.RDB1.srv: up: "
"15-Nov-2007 03:11:27 RAC: ora.RDB.SCO1.cs: up: "
"15-Nov-2007 03:11:27 CRS ora.RDB.SCO1.RDB1.srv started on
member vx0306"
"15-Nov-2007 03:11:27 CRS ora.RDB.SCO1.RDB1.srv was modified"
"15-Nov-2007 03:11:28 CRS ora.RDB.SCO1.cs started on member
vx0306"
"15-Nov-2007 03:10:56 RAC: ora.RDB.RDB2.inst: imcheck: "
"15-Nov-2007 03:10:56 RAC: ora.RDB.RDB2.inst: imup: "
"15-Nov-2007 03:11:58 RAC: ora.RDB.RDB1.inst: imcheck: "
"15-Nov-2007 03:11:58 RAC: ora.RDB.RDB1.inst: imup: "
sleep 10
cat /u01/crs11g/racg/log/crsevtco.log
abr nse t
vx0313"
( f
"15-Nov-2007 03:13:52 CRS ora.RDB.SCO2.RDB2.srv started on
member vx0313"
e rde le lice
l a V ab
"15-Nov-2007 03:13:53 CRS ora.RDB.SCO2.RDB2.srv was modified"
i
V TW1N2
d) On f r can see:
eyou
i o s
an 03:14:50 CRS ora.RDB.SCO2.cs is transitioning
ic"15-Nov-2007
b r - t r
Fa nfrom on state OFFLINE to state ONLINE on member vx0313"
"15-Nov-2007 03:13:52 CRS ora.RDB.SCO2.RDB2.srv is
transitioning from state OFFLINE to state ONLINE on member
vx0313"
"15-Nov-2007 03:13:52 RAC: ora.RDB.SCO2.RDB2.srv: up: "
"15-Nov-2007 03:13:52 RAC: ora.RDB.SCO2.cs: up: "
"15-Nov-2007 03:14:50 CRS ora.RDB.SCO2.cs started on member
vx0313"
"15-Nov-2007 03:13:52 CRS ora.RDB.SCO2.RDB2.srv started on
member vx0313"
"15-Nov-2007 03:13:53 CRS ora.RDB.SCO2.RDB2.srv was modified"
7) From TW2N1, stop both services using srvctl, and then remove both services. When
you are finished, remove callout1.sh script from the /u01/crs11g/racg/usrco directory
as well as /u01/crs11g/racg/log/crsevtco.log from both nodes. When you are finished,
stop both evmwatch sessions with Ctrl-C.
[oracle@vx0306 less08]$ cat sol_08_01_07.sh
I1NAME=$DBNAME"1" s a
)h a
I2NAME=$DBNAME"2"
m ฺbr
i ฺ c o deฺ
/u01/crs11g/bin/srvctl stop service -d $DBNAME -s
r e d Gui
SCO1
e (f ens
rm /u01/crs11g/racg/usrco/callout1.sh
e r le lic
d
l a V ab
rm /u01/crs11g/racg/log/crsevtco.log
i er
V$z rm s/u01/crs11g/racg/usrco/callout1.sh
f
i o
ic -tran
ssh
b r
Fa nssh on $z rm /u01/crs11g/racg/log/crsevtco.log
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
connect / as sysdba
exec DBMS_SERVICE.DELETE_SERVICE('SCO1');
exec DBMS_SERVICE.DELETE_SERVICE('SCO2');
EOF
[oracle@vx0306 less08]$
[oracle@vx0306 less08]$
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
sed 's/NODE1/'$y'/'
/home/oracle/solutions/less08/wrong_tnslba.ora >
/home/oracle/solutions/less08/w1tnslba.ora
r de Stu>>
cat /home/oracle/solutions/less08/tnslba.ora
e
v i lav e this
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
cp
ic i o_ o us
a br se t
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
( f
a
r d e licen
e ble
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
a.bak2 V
cat V
a
il fera
/home/oracle/solutions/less08/tnslba.ora >>
i o
ica -tran s
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
b r
Fa non
ssh $z cp
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
.bak1
ssh $z cp
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
a
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
a.bak2
scp /home/oracle/solutions/less08/tnslba.ora
$z:/home/oracle/solutions/less08
SNOLBA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = NODE1-vip)(PORT =
1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = NODE2-vip)(PORT =
1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA = s a
(SERVER = DEDICATED)
)h a
(SERVICE_NAME = SNOLBA)
m ฺbr
)
i ฺ c o deฺ
)
r e d Gui
SLBA = @ sic dent
(DESCRIPTION =
e r de Stu
(ADDRESS = (PROTOCOL = TCP)(HOST
i l a is
v =thNODE1-vip)(PORT =
1521))
o v se
_TCP)(HOST
(ADDRESS = (PROTOCOL
r ic i =
o u = NODE2-vip)(PORT =
1521))
a b e t
(LOAD_BALANCE(f= yes)ns
e
rd le= lic e
e
(CONNECT_DATA
V a= bDEDICATED)
i l a
(SERVER
V) sfer
(SERVICE_NAME = SLBA)
i o
ic ) -tran
b r
Fa n[oracle@vx0306
on less08]$
3) From a terminal window, execute the createfan.sh script. This script creates a simple
table used by the following scripts in this practice. This script is located in your
$HOME/solutions/less08 directory.
[oracle@vx0306 less08]$ cat createfan.sh
#!/bin/ksh
#
# createfan.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
s a
$ORACLE_HOME/bin/sqlplus -s /NOLOG <<EOF
)h a
m ฺ br
connect / as sysdba
i ฺ c o deฺ
drop user JFV cascade;
r e d Gusers u i
temporary tablespace temp; @ s c dent
create user JFV identified by jfv default itablespace
Grant succeeded.
Table created.
[oracle@vx0306 less08]$
4) Make sure you keep your terminal window (referred to as TW1) open. You use it
later.
5) Create a new terminal window from where you will start the workload. This terminal
window is referred to as TW2.
s a
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'` )h a
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
m ฺbr
DBNAME=`ps -ef | grep dbw0_RDB | grep -v grep | dgrep i ฺco-vuideฺ
callout1 | awk '{ print $8 }' | sed 's/1/''/'
s i cre| sedn t G
's/ora_dbw0_/''/'`
r d e@ Stude
I1NAME=$DBNAME"1"
i l a ve this
i o _v use
I2NAME=$DBNAME"2"
a b ric e to
e (f ens
export ORACLE_SID=$I1NAME
e r le lic
d
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
l a V ab
i
V sfer
$ORACLE_HOME/bin/sqlplus /NOLOG @sol_08_02_06_00.sql
i o
ic -tran
b r
Fa non
[oracle@vx0306 less08]$
Connected.
execute sol_08_02_06.sql from here
SQL> @sol_08_02_06
no rows selected
SQL>
s a
7) Create two additional terminal windows from where you will run the primes
)h a
ฺbr
executable to generate CPU load on your first node. These terminal windows are
m
called TW4 and TW5, respectively.
i ฺ c o deฺ
e
8) In TW2, execute the startfanload.sh script using SNOLBA as rthe u i to the
dfirst argument
command. sic dent G
@
de Stu
[oracle@vx0306 less08]$ cat startfanload.sh
e r
/home/oracle/solutions/less08/fan.sh
v i lav e $1 t hi&&s
ic i o_ o us $1 &
/home/oracle/solutions/less08/fan.sh $1
abr nse t
/home/oracle/solutions/less08/fan.sh
( f
/home/oracle/solutions/less08/fan.sh
e
$1 &
rd le lic e
/home/oracle/solutions/less08/fan.sh $1 &
V e
/home/oracle/solutions/less08/fan.sh
b
$1 &
a
il fera
/home/oracle/solutions/less08/fan.sh
V
$1 &
i c i o ans
/home/oracle/solutions/less08/fan.sh $1 &
b r t r
/home/oracle/solutions/less08/fan.sh
-
$1 &
Fa n/home/oracle/solutions/less08/fan.sh
on
/home/oracle/solutions/less08/fan.sh $1 &
$1 &
/home/oracle/solutions/less08/fan.sh $1 &
/home/oracle/solutions/less08/fan.sh $1 &
/home/oracle/solutions/less08/fan.sh $1 &
/home/oracle/solutions/less08/fan.sh $1 &
/home/oracle/solutions/less08/fan.sh $1 &
/home/oracle/solutions/less08/fan.sh $1 &
/home/oracle/solutions/less08/fan.sh $1 &
[oracle@vx0306 less08]$
users=120
x=1
y=$users
ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_HOME
while [ $x -le $y ]
do
/u01/app/oracle/product/11.1.0/db_1/bin/sqlplus -s $UNPW
@fan.sql
done
[oracle@vx0306 less08]$
[oracle@vx0306 less08]$ cat fan.sql
begin
for i in 1..1000 loop
insert into fan select sid from v$mystat where rownum<2;
commit; s a
delete fan where c in (select sid from v$mystat where
)h a
rownum<2);
m ฺbr
commit;
i ฺ c o deฺ
end loop;
r e d Gui
end;
/ @ sic dent
exit;
e r de Stu
[oracle@vx0306 less08]$
v i lav e this
ic i o_ o us
( f a br se t
[oracle@vx0306 less08]$ n
r d eless08]$
l i c e ./startfanload.sh SNOLBA
V e ble
[oracle@vx0306 begin
*
V a
ilat linee ra1:
ERROR
o s f
i ran deadlock detected while waiting for resource
b r icORA-00060:
t
Fa non-
ORA-06512: at line 5
begin
*
ERROR at line 1:
ORA-00060: deadlock detected while waiting for resource
ORA-06512: at line 5
begin
*
ERROR at line 1:
ORA-00060: deadlock detected while waiting for resource
ORA-06512: at line 5
begin
*
ERROR at line 1:
Connected.
execute sol_08_02_06.sql from here
SQL> @sol_08_02_06
no rows selected
SQL> /
no rows selected
SQL> /
INST_ID COUNT(*)
---------- ----------
1 9
2 9
INST_ID COUNT(*)
---------- ----------
1 8
2 10
SQL> /
INST_ID COUNT(*)
---------- ----------
1 8
2 10
SQL> / s a
)h a
INST_ID COUNT(*)
m ฺbr
---------- ----------
i ฺ c o deฺ
1 8
r e d Gui
2 10
@ sic dent
SQL> /
e r de Stu
v i lav e this
INST_ID COUNT(*)
---------- ---------- cio
_ us
9r
b i to
1
a
(f 9 ens e
2
e
r le lic
d
SQL> / V
e
V ila ferab
i c io INST_ID
a n s COUNT(*)
r t r
Fab non- 1
---------- ----------
8
2 10
SQL> /
INST_ID COUNT(*)
---------- ----------
1 9
2 9
SQL> /
INST_ID COUNT(*)
---------- ----------
1 8
2 10
SQL>
[oracle@vx0306 less08]$
12) In TW4, execute stopfanload.sh script to stop the workload.
[oracle@vx0306 less08]$ cat stopfanload.sh
#!/bin/ksh
#
# stopfanload.sh
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
s a
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
)h a
m ฺ br
ps -ef | grep "fan.sh" | awk '{print "kill -9 " $2 }'
i ฺ c o > deฺ
/home/oracle/solutions/less08/x.sh
r e d Gui
chmod 777 /home/oracle/solutions/less08/x.sh @ sic dent
e r de Stu
/home/oracle/solutions/less08/x.sh
v i lav e this
ic i o_ o us
( f a
ps -ef | grep "fan.sql"br | sawke t '{print "kill -9 " $2 }' >
r d e licen
/home/oracle/solutions/less08/x.sh
e ble
chmod 777V/home/oracle/solutions/less08/x.sh
V a
il fera
r i c i rans
o
/home/oracle/solutions/less08/x.sh
t
Fab n$ORACLE_HOME/bin/sqlplus
on- system/oracle1@$I1NAME
@/home/oracle/solutions/less08/kill_fan.sql
$ORACLE_HOME/bin/sqlplus system/oracle1@$I1NAME
@/tmp/drop_fan.sql
rm /tmp/drop_fan.sql
$ORACLE_HOME/bin/sqlplus system/oracle1@$I2NAME
@/home/oracle/solutions/less08/kill_fan.sql
$ORACLE_HOME/bin/sqlplus system/oracle1@$I2NAME
@/tmp/drop_fan.sql
rm /tmp/drop_fan.sql
[oracle@vx0306 less08]$
spool /tmp/drop_fan.sql;
spool off s a
)h a
exit;
m ฺbr
[oracle@vx0306 less08]$
i ฺ c o deฺ
r e d Gui
[oracle@vx0306 less08]$ ./stopfanload.sh s
ic ent
/home/oracle/solutions/less08/x.sh:rd
@
e 19: t d (17917) -
ukill:
line
ve this S
No such process
i l a
i o _v- Production
u s e
SQL*Plus: Release 11.1.0.6.0
b r ic t o on Thu Nov 15
(fa ense
05:11:55 2007
e
rd1982, l ic Oracle. All rights reserved.
Copyright (c) e
V ab l e 2007,
i l
V sto: a er
i o n f
b r icOracle
Connected
- t r aDatabase
Fa nProduction
on
11g Enterprise Edition Release 11.1.0.6.0 -
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
System altered. s a
)h a
m ฺ br
System altered.
i ฺ c o deฺ
r e d Gui
System altered. @ sic dent
e r de Stu
v i lav e this
o_ o us
System altered.
ic i
( f a br se t
System altered.
r d e licen
V e ble
V a
il altered.
e ra
System
o
i ran s f
b r icalter
t system kill session '111,13128'
Fa n*on-
ERROR at line 1:
ORA-00030: User session ID does not exist.
INST_ID COUNT(*)
---------- ----------
1 4
2 11
s a
)h a
SQL> /
m ฺbr
i ฺ c o deฺ
INST_ID COUNT(*)
r e d Gui
sic dent
---------- ----------
1 11
@
de Stu
2 7
e r
SQL> / v i lav e this
ic i o_ o us
INST_ID COUNT(*)
( f abr nse t
1 rde 9ice
---------- ----------
e
V2 able 8 l
i l a
V/ sfer
i o
ic -tran
SQL>
b r
Fa nonINST_ID COUNT(*)
---------- ----------
1 7
2 10
SQL> /
INST_ID COUNT(*)
---------- ----------
1 4
2 14
SQL> /
INST_ID COUNT(*)
---------- ----------
1 4
2 13
INST_ID COUNT(*)
---------- ----------
1 4
2 15
SQL>
14) In TW1, look at the generated LBA FAN events that were sent during the second
period while using the SLBA service. What do you observe?
a) You should see that percentages are different for both instances after you started
using the SLBA workload.
s a
[oracle@vx0306 less08]$ cat sol_08_02_14.sh
)h a
ฺbr
#!/bin/ksh
#
c m
o deฺ
# sol_08_02_03.sh
i ฺ
d Gui
#
r e
# Must be executed on NODE1 !!!!!!!!!!
@ sic dent
de Stu
#
e r
v this
v i lased e-n '1,1p'`
y=`cat /home/oracle/nodeinfo
i o _ | sed
|
u s
r
z=`cat /home/oracle/nodeinfo
b ic t o -n '2,2p'`
fa nse | grep -v grep | grep -v
DBNAME=`ps -ef e| (grep dbw0_RDB
callout1 | e awk l ice $8 }' | sed 's/1/''/' | sed
rd '{leprint
l a V ab
i
's/ora_dbw0_/''/'`
V sfer
i o an
icI1NAME=$DBNAME"1"
b r - t r
Fa nI2NAME=$DBNAME"2"
on
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
[oracle@vx0306 less08]$
exit;
Connected.
ENQ_TIME
--------
USER_DATA(SRV, PAYLOAD)
--------------------------------------------------------------
------------------ s a
02:02:28
)h a
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB service=SLBA {
m ฺbr
{instance=RDB2 perce
i ฺ c o deฺ
nt=50 flag=UNKNOWN aff=FALSE}{instance=RDB1 percent=50
r e d Gui
flag=UNKNOWN aff=FALSE} }
timestamp=2007-11-15 04:02:28') @ sic dent
e r de Stu
02:02:58
v i e t his service=SLBA {
lavdatabase=RDB
o_ o us
SYS$RLBTYP('SLBA', 'VERSION=1.0
{instance=RDB2 perce
ic i
( f a br se t
nt=50 flag=UNKNOWN aff=FALSE}{instance=RDB1 percent=50
flag=UNKNOWN aff=FALSE} n
rde le lic04:02:58')
e }
e
timestamp=2007-11-15
V ab
i l
V sfera
i o
ic -tran
...
b r
Fa non
ENQ_TIME
--------
USER_DATA(SRV, PAYLOAD)
--------------------------------------------------------------
------------------
nt=50 flag=UNKNOWN aff=FALSE}{instance=RDB1 percent=50
flag=UNKNOWN aff=FALSE} }
timestamp=2007-11-15 05:21:33')
03:22:04
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB service=SLBA {
{instance=RDB2 perce
nt=50 flag=UNKNOWN aff=FALSE}{instance=RDB1 percent=50
flag=UNKNOWN aff=FALSE} }
timestamp=2007-11-15 05:22:04')
03:22:34
03:23:04
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB service=SLBA {
{instance=RDB2 perce
nt=74 flag=GOOD aff=FALSE}{instance=RDB1 percent=26 flag=GOOD
aff=TRUE} } timest s a
amp=2007-11-15 05:23:04')
)h a
m ฺbr
i ฺ c o deฺ
ENQ_TIME
r e d Gui
--------
USER_DATA(SRV, PAYLOAD) @ sic dent
r de Stu
--------------------------------------------------------------
e
------------------
v i lav e this
o_ o database=RDB
03:23:34
ic
SYS$RLBTYP('SLBA', 'VERSION=1.0
r i
t us service=SLBA {
{instance=RDB2 perceb
e (fa ense
nt=78 flag=GOOD aff=TRUE}{instance=RDB1 percent=22 flag=GOOD
aff=FALSE} e timest lic
}rd
l a
amp=2007-11-15 le
V a05:23:34')
b
i
V sfer
i o an
icSYS$RLBTYP('SLBA',
03:24:04
b r - t r
Fa n{instance=RDB2
on
'VERSION=1.0 database=RDB service=SLBA {
perce
nt=70 flag=GOOD aff=FALSE}{instance=RDB1 percent=30 flag=GOOD
aff=TRUE} } timest
amp=2007-11-15 05:24:04')
ENQ_TIME
--------
USER_DATA(SRV, PAYLOAD)
--------------------------------------------------------------
------------------
03:24:35
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB service=SLBA {
{instance=RDB2 perce
nt=58 flag=GOOD aff=TRUE}{instance=RDB1 percent=42 flag=GOOD
aff=FALSE} } timest
amp=2007-11-15 05:24:35')
03:25:05
ENQ_TIME
--------
USER_DATA(SRV, PAYLOAD)
--------------------------------------------------------------
------------------
amp=2007-11-15 05:25:05')
03:25:35
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB service=SLBA {
{instance=RDB2 perce
nt=41 flag=GOOD aff=TRUE}{instance=RDB1 percent=59 flag=GOOD s a
aff=FALSE} } timest
)h a
amp=2007-11-15 05:25:35')
m ฺbr
i ฺ c o deฺ
03:26:07
r e d Gui {
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB
{instance=RDB2 perce @ sic dent
service=SLBA
e r de Stu
ENQ_TIME
v i lav e this
--------
USER_DATA(SRV, PAYLOAD)cio
_ us
b i
r e to
a
--------------------------------------------------------------
(f ens
d e
------------------
ic
r aff=TRUE}{instance=RDB1
l
e
nt=38 flag=GOOD
l
aff=TRUE}V} timesta
b e percent=62 flag=GOOD
V ila fera05:26:07')
mp=2007-11-15
r i c io rans
t
Fab nSYS$RLBTYP('SLBA',
on-
03:26:38
'VERSION=1.0 database=RDB service=SLBA {
{instance=RDB2 perce
nt=35 flag=GOOD aff=TRUE}{instance=RDB1 percent=65 flag=GOOD
aff=FALSE} } timest
amp=2007-11-15 05:26:38')
03:27:08
ENQ_TIME
--------
USER_DATA(SRV, PAYLOAD)
--------------------------------------------------------------
------------------
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB service=SLBA {
{instance=RDB2 perce
nt=43 flag=UNKNOWN aff=FALSE}{instance=RDB1 percent=57
flag=UNKNOWN aff=FALSE} }
timestamp=2007-11-15 05:27:08')
ENQ_TIME
--------
USER_DATA(SRV, PAYLOAD)
--------------------------------------------------------------
------------------
03:28:08
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB service=SLBA {
{instance=RDB2 perce s a
nt=48 flag=UNKNOWN aff=FALSE}{instance=RDB1 percent=52
)h a
flag=UNKNOWN aff=FALSE} }
m ฺbr
timestamp=2007-11-15 05:28:08')
i ฺ c o deฺ
r e d Gui
03:28:38
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB @ sic service=SLBA
d e n t {
{instance=RDB2 perce e t u
rd s Spercent=51
v e
v i la e thi
nt=49 flag=UNKNOWN aff=FALSE}{instance=RDB1
o_ o us
flag=UNKNOWN aff=FALSE} }
ic i
timestamp=2007-11-15 05:28:38')
( f abr nse t
... e rde le lice
l a V ab
i
V sfer
i o
ic--------
ENQ_TIME
an
b r - t r
Fa nUSER_DATA(SRV,
on PAYLOAD)
--------------------------------------------------------------
------------------
03:41:39
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB service=SLBA {
{instance=RDB2 perce
nt=50 flag=UNKNOWN aff=FALSE}{instance=RDB1 percent=50
flag=UNKNOWN aff=FALSE} }
timestamp=2007-11-15 05:41:39')
03:42:09
SYS$RLBTYP('SLBA', 'VERSION=1.0 database=RDB service=SLBA {
{instance=RDB2 perce
nt=50 flag=UNKNOWN aff=FALSE}{instance=RDB1 percent=50
flag=UNKNOWN aff=FALSE} }
timestamp=2007-11-15 05:42:09')
ENQ_TIME
--------
15) Stop both services: SNOLBA and SLBA. When you are finished, remove them from
s a
your cluster configuration and your database.
)h a
[oracle@vx0306 less08]$ cat sol_08_02_15.sh m ฺbr
#!/bin/ksh i ฺ c o deฺ
# r e d Gui
# sol_08_02_15.sh
@ sic dent
#
e r de Stu
lav e this
# Must be executed on NODE1 !!!!!!!!!!
#
v i
ic i o_ o us
( f abr nse |t sed -n '1,1p'`
y=`cat /home/oracle/nodeinfo
e rde le lice
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
I2NAME=$DBNAME"2"
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
connect / as sysdba
EOF
[oracle@vx0306 less08]$
i o _v see that
Database Services. You should also
u s eTAFB is now started on both
instances.
a b ric e to
(f useethe
j) When TAFB is created,
e nsDBMS_SERVICE.MODIFY_SERVICE
d c
e ble li service attributes:
procedure torset the remaining
V
la feraless08]$ cat sol_08_03_01_j.sh
i
[oracle@vx0306
V
r i c io rans
#!/bin/ksh
n-t
Fab n##osol_08_03_01_12.sh
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
connect / as sysdba
execute dbms_service.modify_service (
-
'TAFB' ,
-
aq_ha_notifications => true ,
-
failover_method => dbms_service.failover_method_basic , s a
-
)h a
failover_type => dbms_service.failover_type_session ,
m ฺ br
-
i ฺ c o deฺ ,
failover_retries => 180
r e d Gui
-
failover_delay => 5 @ sic dent ,
- e
rd s S t u
v e
clb_goal
la e thi
=> dbms_service.clb_goal_long);
v i
EOF
ic i o_ o us
[oracle@vx0306 less08]$
( f abr nse t
[oracle@vx0306
e rdeless08]$
le l i ce ./sol_08_03_01_j.sh
PRKP-1083V: The bservice
i
V sfe
PRKP-1062 l a : r a
Service TAFB
TAFB already exists.
is already running.
i o
icPL/SQL n
aprocedure
b r - t r
Fa non
successfully completed.
[oracle@vx0306 less08]$
2) To connect to your database by using the TAFB service, what must you do next?
a) You should add the corresponding TNS entry in your
$ORACLE_HOME/network/admin/tnsnames.ora file. We highly recommend that
you add that entry in both your ASM and Database homes:
[oracle@vx0306 less08]$ cat sol_08_03_02.sh
#!/bin/ksh
#
# sol_08_03_02.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
sed 's/NODE1/'$y'/'
/home/oracle/solutions/less08/wrong_tnstafb.ora >
/home/oracle/solutions/less08/w1tnstafb.ora
sed 's/NODE2/'$z'/'
/home/oracle/solutions/less08/w1tnstafb.ora >
/home/oracle/solutions/less08/tnstafb.ora
cp s a
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
)h a
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
m ฺbr
.bak3
i ฺ c o deฺ
cat /home/oracle/solutions/less08/tnstafb.ora >>
r e d Gui
sic dent
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
@
cp
e r de Stu
v i lav e this
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
o_ o us
a
ic i
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
a.bak4
( f a br se t
r d e licen
cat /home/oracle/solutions/less08/tnstafb.ora >>
e ble
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
V
a
V a
il fera
r i c i $zracpns
o
ssh
t
Fab n/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
on-
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
.bak3
ssh $z cp
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
a
/u01/app/oracle/product/11.1.0/asm_1/network/admin/tnsnames.or
a.bak4
scp /home/oracle/solutions/less08/tnstafb.ora
$z:/home/oracle/solutions/less08
TAFB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = NODE1-vip)(PORT =
1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = NODE2-vip)(PORT =
1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TAFB)
)
) s a
[oracle@vx0306 less08]$
)h a
m ฺ br
[oracle@vx0306 less08]$ ./sol_08_03_02.sh
i ฺ c o265 deฺ
tnstafb.ora
r d Gui
100%
e
0.3KB/s 00:00
[oracle@vx0306 less08]$ @ sic dent
e rdthee TAFB
S tu is started on both
la e this
3) Using SQL*Plus from your first node, verifyvthat service
instances. v i
ic i o_ sol_08_03_03.sh
o us
[oracle@vx0306 less08]$ r
ab nse
cat t
#!/bin/ksh ( f
#
e rde le lice
l a V ab
# sol_08_03_03.sh
# i er
V be sexecuted
#ioMust f
r i c t r a n on NODE1 !!!!!!!!!!
Fab non-
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
connect system/oracle1@$I1NAME
EOF
[oracle@vx0306 less08]$
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
[oracle@vx0306 less08]$
e
SQL> @sol_08_03_04(f ens
Connected. er d
e l ic
l a V ab l
i
V sfer
INSTANCE_NAME
i o
icRDB1-tran
----------------
b r
Fa non
FAILOVER_TYPE FAILOVER_M FAI
------------- ---------- ---
SESSION BASIC NO
SQL>
5) Create a new terminal window, referred to as TW2, and determine how many
sessions are started on each instance to support your connection on the first terminal
session?
a) Only one session is created to support your connection. Note that this session can
be started on either RDB1 or RDB2. In this example, it is started on RDB2, and
no corresponding session on RDB1 exists
[oracle@vx0306 less08]$ cat sol_08_03_05.sh
#!/bin/ksh
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2" s a
)h a
export ORACLE_SID=$I1NAME
m ฺbr
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
i ฺ c o deฺ
r e d Gui
$ORACLE_HOME/bin/sqlplus -s /NOLOG <<EOF
@ sic dent
connect system/oracle1@$I1NAME
e r de Stu
av this
select instance_name from v\$instance;
col service_name format a10vil
i o _ use
b r ic
select failover_type,failover_method,failed_over
t o from
(fa ense
v\$session where username='JFV';
e
connect system/oracle1@$I2NAME
rd le licfrom v\$instance;
e
select instance_name
V ab format a10
l a
col service_name
i
V sfwhere
select er
failover_type,failover_method,failed_over from
i o
ic -tran
v\$session username='JFV';
b r
Fa nEOF on
[oracle@vx0306 less08]$
INSTANCE_NAME
----------------
RDB1
INSTANCE_NAME
----------------
RDB2
[oracle@vx0306 less08]$
6) Still connected as user JFV from your first session, insert a row into the FAN table
and commit your modification.
[oracle@vx0306 less08]$ cat sol_08_03_06.sql
insert into fan values(1);
commit;
[oracle@vx0306 less08]$
SQL> @sol_08_03_06
s a
1 row created.
)h a
m ฺbr
Commit complete. i ฺ c o deฺ
r e d Gui
SQL>
@ sic dent
7) Kill the OS process corresponding to the oracle r e Ssession
dshadow tu that is connected
e s that.
v i lav escript
using TAFB service. You can use the killtafb.sh t hifor
a) As an indication, you can use ic i o_following
the
o usSQL statement to help you kill the
r t
correct process:
select 'kille-9 (fa'b||espid
n se
e
from v$process rd le lic
a V
addr inb(select paddr
where
V i l f e ra from v$session where username='JFV');
o
ici You s
n run this statement on both nodes.
ashould
b r - t r
Fa n[oracle@vx0306
on less08]$ cat killtafb.sh
#!/bin/ksh
#
# killtafb.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
$ORACLE_HOME/bin/sqlplus system/oracle1@$I1NAME
@/home/oracle/solutions/less08/kill_tafb.sql
/tmp/drop_tafb.sh
rm /tmp/drop_tafb.sh
$ORACLE_HOME/bin/sqlplus system/oracle1@$I2NAME
@/home/oracle/solutions/less08/kill_tafb.sql
s a
scp /tmp/drop_tafb.sh $z:/tmp/drop_tafb.sh
)h a
m ฺ br
ssh $z chmod 777 /tmp/drop_tafb.sh
i ฺ c o deฺ
r e d Gui
ssh $z /tmp/drop_tafb.sh
@ sic dent
ssh $z rm /tmp/drop_tafb.sh
e r de Stu
v i lav e this
rm /tmp/drop_tafb.sh
[oracle@vx0306 less08]$cio
_ us
b i
r e to
a
(f ens
d e
r less08]$
l ic cat kill_tafb.sql
[oracle@vx0306
V e l e
set V ila offferab
head
i c io timing
set
a n s off
r t r
Fab nset
set -feedback
on pagesize 0
off;
spool /tmp/drop_tafb.sh;
spool off
exit;
[oracle@vx0306 less08]$
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
kill -9 1517
Disconnected from Oracle Database 11g Enterprise Edition
Release 11.1.0.6.0 - Production s a
With the Partitioning, Real Application Clusters, OLAP, Data
)h a
Mining
m ฺbr
and Real Application Testing options
i ฺ c o deฺ
r e d Nov G u i
SQL*Plus: Release 11.1.0.6.0 - Production on
08:43:33 2007 @ sic dent
Thu 15
e r de Stu
Copyright (c) 1982, 2007, Oracle.
i l a All is reserved.
v thrights
i o _v use
Connected to:
a b ric e to
Oracle Database 11g
e (f Enterprise
e ns Edition Release 11.1.0.6.0 -
Production er d li c
With the V
a b l e
i l fe r a
Partitioning, Real Application Clusters, OLAP, Data
i c i
ando VReal
Mining
a n s
Application Testing options
b r t r
on-
Fa nDisconnected 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
drop_tafb.sh 100% 0
0.0KB/s 00:00
[oracle@vx0306 less08]$
8) Insert again one row in FAN from your first session. What do you observe?
a) Because your server process has been killed, you are no longer able to correctly
execute a SQL statement from your session.
[oracle@vx0306 less08]$ cat sol_08_03_08.sql
insert into fan values(1);
[oracle@vx0306 less08]$
SQL> @sol_08_03_08
insert into fan values(1)
SQL>
SQL> @sol_08_03_09 @
de Stu
e r
1 row created. v i lav e this
ic i o_ o us
Commit complete. (fa
br se t
r d e licen
V e ble
V a
il fera
INSTANCE_NAME
r i c i rans
o
----------------
RDB1 t
Fab non-
SQL>
10) Verify that you automatically failed over.
[oracle@vx0306 less08]$ cat sol_08_03_10.sql
select instance_name from v$instance;
exit;
[oracle@vx0306 less08]$
SQL> @sol_08_03_10
INSTANCE_NAME
----------------
RDB1
11) Remove TAFB from both the cluster configuration and the database.
s a
[oracle@vx0306 less08]$ cat sol_08_03_11.sh
)h a
ฺbr
#!/bin/ksh
#
c m
o deฺ
# sol_08_03_11.sh
i ฺ
d Gui
#
r e
# Must be executed on NODE1 !!!!!!!!!!
@ sic dent
#
e r de Stu
v i l av this
y=`cat /home/oracle/nodeinfo
i o _ | sed u s e-n '1,1p'`
a b ric e |tosed -n '2,2p'`
z=`cat /home/oracle/nodeinfo
(f ens | grep -v grep | grep -v
DBNAME=`ps -ef e| grepcdbw0_RDB
callout1 | e
d li $8 }' | sed 's/1/''/' | sed
r '{leprint
V awk
ila ferab
's/ora_dbw0_/''/'`
V
r i c io rans
t
I1NAME=$DBNAME"1"
Fab nI2NAME=$DBNAME"2"
on-
/u01/crs11g/bin/srvctl stop service -d $DBNAME -s TAFB
export ORACLE_SID=$I1NAME
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
connect / as sysdba
exec dbms_service.delete_service('TAFB');
EOF
[oracle@vx0306 less08]$
[oracle@vx0306 less08]$
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
I2NAME=$DBNAME"2" @
de Stu
e r
/u01/crs11g/bin/ocrcheck v i lav e this
ic i o_ o us
more /etc/oracle/ocr.loc
(
[oracle@vx0306 less09]$ f abr nse t
e r de lice
V aless09]$
[oracle@vx0306
l a b le ./sol_09_01_01.sh
V i
Status of
f e r
Oracle Cluster Registry is as follows :
o s
ici -tranVersion : 2
b r
Fa non
Total space (kbytes) : 616652
Used space (kbytes) : 3832
Available space (kbytes) : 612820
ID : 992212279
Device/File Name : /dev/sdb1
Device/File integrity
check succeeded
ocrconfig_loc=/dev/sdb1
local_only=FALSE
[oracle@vx0306 less09]$
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
s a
sudo /u01/crs11g/bin/ocrconfig -replace ocrmirror /dev/sdb2
)h a
[oracle@vx0306 less09]$
m ฺbr
i ฺ c o deฺ
[oracle@vx0306 less09]$ ./sol_09_01_02.sh
r e d Gui
[oracle@vx0306 less09]$
@ sic dent
3) Check again your OCR configuration.
e r de Stu
i l av this
[oracle@vx0306 less09]$ cat sol_09_01_03.sh
v
#!/bin/bash
i o _ use
#
# sol_09_01_03.sh fab
ric e to
d e (
c e ns
er bleonli NODE1 !!!!!!!!!!
#
V
# Must be executed
#
V ila fera
i c io n s
y=`catra/home/oracle/nodeinfo
b r - t | sed -n '1,1p'`
Fa nz=`caton /home/oracle/nodeinfo | sed -n '2,2p'`
DBNAME=`ps -ef | grep dbw0_RDB | grep -v grep | grep -v
callout1 | awk '{ print $8 }' | sed 's/1/''/' | sed
's/ora_dbw0_/''/'`
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
/u01/crs11g/bin/ocrcheck
more /etc/oracle/ocr.loc
[oracle@vx0306 less09]$
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
/u01/crs11g/bin/ocrcheck s a
[oracle@vx0306 less09]$
)h a
m ฺ br
[oracle@vx0308 less09]$ /u01/crs11g/bin/ocrcheckdiฺc
-- What we get now! o deฺ
r e u i
PROT-602: Failed to retrieve data from the icluster
s c dent G
registry
[oracle@vx0308 less09]$ @
de Stu
e r
v i lav e this
o_ o us
-- What we should be getting!
i
[oracle@vx0306 less09]$c./sol_09_01_05.sh
i
Status of Oracle Cluster
( f a br Registry
s e t is as follows :
Version
r d en
espacelic(kbytes) : 2
V e ble (kbytes)
Total : 616652
i l a r a
Used space : 3832
i c i o V anID sfe
Available space (kbytes) : 612820
: 992212279
b r t r
Fa non-
Device/File Name : /dev/sdb1
Device/File integrity
check succeeded
Device/File Name : /dev/sdb2
Device/File needs to be
synchronized with the other device
[oracle@vx0306 less09]$
6) Replace your OCR mirror using /dev/sdb1
[oracle@vx0306 less09]$ cat sol_09_01_06.sh
#!/bin/bash
#
# sol_09_01_06.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
/u01/crs11g/bin/ocrcheck
[oracle@vx0306 less09]$
[oracle@vx0306 less09]$
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
I2NAME=$DBNAME"2" @
de Stu
e r
v this
v i la-export
sudo /u01/crs11g/bin/ocrconfig
i o _ use
ric e to
/home/oracle/solutions/less09/logicalocrbak
a b
(f ens
ls -l /home/oracle/solutions/less09/logicalocrbak
[oracle@vx0306 d e
r le lic
less09]$
e
V ab
V i l a
[oracle@vx0306 e r less09]$ ./sol_09_02_01.sh
o s f
i ran 1 root root 86550 Nov 16 2007
b r ic-rw-r--r--
t
on-
Fa n[oracle@vx0306
/home/oracle/solutions/less09/logicalocrbak
less09]$
2) Locate a physical backup of your OCR.
[oracle@vx0306 less09]$ cat sol_09_02_02.sh
#!/bin/bash
#
# sol_09_02_02.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
I1NAME=$DBNAME"1"
vx0313
ic i o_ o us
2007/11/15 18:15:43
( f abr nse t
/u01/crs11g/cdata/vx_cluster02/backup02.ocr
3) Stop CRS resources on both nodes. When you are finished, verify that they are all
stopped.
[oracle@vx0306 less09]$ cat sol_09_02_03.sh
#!/bin/bash
#
# sol_09_02_03.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
i o _v OFFLINE
u s e OFFLINE
------------------------------------------------------------
ora....B1.inst application
ora....B2.inst application
a b ric e toOFFLINE OFFLINE
ora.RDB.db
e (f ens OFFLINE OFFLINE
application
ora....SM1.asme d
r application
e l ic OFFLINE OFFLINE
l a V
ora....06.lsnr
a b l
application OFFLINE OFFLINE
i
ora.vx0306.gsd r
V sfe application OFFLINE OFFLINE
application OFFLINE
i o n
icora.vx0306.vip
a
ora.vx0306.ons OFFLINE
b r t r
on-
Fa nora....SM2.asm
application OFFLINE OFFLINE
application OFFLINE OFFLINE
ora....13.lsnr application OFFLINE OFFLINE
ora.vx0313.gsd application OFFLINE OFFLINE
ora.vx0313.ons application OFFLINE OFFLINE
ora.vx0313.vip application OFFLINE OFFLINE
[oracle@vx0306 less09]$
4) Stop CRS on both nodes.
[oracle@vx0306 less09]$ cat sol_09_02_04.sh
#!/bin/bash
#
# sol_09_02_04.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
sleep 60
e
Stopping Oraclerde Clusterware
le l i ce on vx0306
Stopping V b
This i l a a
resources.
er several minutes.
Vcouldsftake
i o
icStopping a n stopped Oracle Clusterware resources
Successfully
b r t r
on- down the Cluster Synchronization Services daemon.
Fa nShutting
Cluster Synchronization Services.
I2NAME=$DBNAME"2"
sleep 300
/u01/crs11g/bin/crs_stat -t
sleep 300
/u01/crs11g/bin/crs_stat -t
[oracle@vx0306 less09]$
o_ o us
ora....06.lsnr application ONLINE ONLINE vx0306
i
ora.vx0306.gsd applicationc i ONLINE ONLINE vx0306
( f abr nse t
ora.vx0306.ons application ONLINE ONLINE vx0306
rde le lice
ora.vx0306.vip application ONLINE ONLINE vx0306
e
ora....SM2.asm application
V ab
ONLINE ONLINE vx0313
i l a
ora....13.lsnr application
V sfer
ora.vx0313.gsd application
ONLINE
ONLINE
ONLINE
ONLINE
vx0313
vx0313
i o
ic -tran
ora.vx0313.ons application ONLINE ONLINE vx0313
b r
Fa non
ora.vx0313.vip application ONLINE ONLINE vx0313
[oracle@vx0306 less09]$
I2NAME=$DBNAME"2"
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
[oracle@vx0306 less09]$
( f abr nse t
/u01/crs11g/cdata/vx_cluster02/week.ocr
I2NAME=$DBNAME"2" @
de Stu
e r
/u01/crs11g/bin/crsctl queryvcss i lavvotedisk
e t his
[oracle@vx0306 less09]$ io_ us
r ic t o
(
[oracle@vx0306 less09]$f ab n./sol_09_03_01.sh
se
e lic e
0. 0
erd/dev/sdb5
Located 1Vvoting b l e
disk(s).
V ila feraless09]$
[oracle@vx0306
i c io tworanew
n s
a b r
2) Add
- t members to your voting disk configuration using both /dev/sdb6, and
F no n
/dev/sdb7.
[oracle@vx0306 less09]$ cat sol_09_03_02.sh
#!/bin/bash
#
# sol_09_03_04.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
V a
il fera
r i c i rans
o
I1NAME=$DBNAME"1"
t
Fab nI2NAME=$DBNAME"2"
on-
/u01/crs11g/bin/crsctl query css votedisk
[oracle@vx0306 less09]$
2) Create an action script for CRS to monitor the xclock application. You need to make
sure that the clock is always displayed on the VNC session attached to your first
node. When you are finished, copy that script in the default CRS action scripts
location on both nodes. Call your action script crsclock_action.scr.
cd /home/oracle/solutions/less09
br se t
/u01/crs11g/crs/script/"
( f a
r d e 777
ssh $z "sudo chmod
l i c en
e ble
/u01/crs11g/crs/script/crsclock_action.scr"
V
cat V
a
il fera
r i c i rans
o /u01/crs11g/crs/script/crsclock_action.scr
t
Fab n[oracle@vx0306
on- less09]$
BIN_DIR=/usr/X11R6/bin
LOG_DIR=/tmp
BIN_NAME=xclock
DISPLAY=NODE1:2.0
export DISPLAY
if [ ! -d $BIN_DIR ]
then
case $1 in
'start')
if [ "$PID1" != "" ]
then
status_p1="running"
else
if [ -x $BIN_DIR/$BIN_NAME ]
then
umask 002 s a
${BIN_DIR}/${BIN_NAME} &
)h a
2>${LOG_DIR}/${BIN1_NAME}.log
m ฺbr
status_p1="started"
i ฺ c o deฺ
else
r e d Gui
found" @ sic dent
echo `basename $0`": $BIN_NAME: Executable not
fi
e r de Stu
fi
v i lav e this
i _ us
o$status_p1"
echo "$BIN_NAME:
b ic
r e to
;;
a
(f ens
e
r le lic
d
'stop') e
V [ "${PID1}"
b
i l a if
e r a != "" ]
i c i o V ansfkill
then
-9 ${PID1} && echo "$BIN_NAME daemon killed"
b r t r
Fa non-
else
echo "$BIN_NAME: no running Process!"
fi
;;
'check')
if [ "$PID1" != "" ]
then
echo "running"
exit 0
else
echo "not running"
exit 1
fi
;;
*)
echo "Usage: "`basename $0`" {start|stop|check}"
;;
esac
[oracle@vx0306 less09]$
BIN_DIR=/usr/X11R6/bin
LOG_DIR=/tmp
BIN_NAME=xclock s a
DISPLAY=vx0306:2.0
)h a
export DISPLAY
m ฺbr
i ฺ c o deฺ
if [ ! -d $BIN_DIR ]
r e d Gui
then
echo "start failed" @ sic dent
exit 2
e r de Stu
fi
v i lav e this
PID1=`ps -ef | grep $BIN_NAME
ic i o_ o| grep
us -v grep | grep -v
xclock_app | awk '{ b r t
a printns$2e }'`
( f
e lice
case $1 in erd
'start') V
l a a b le
i
V if f[er"$PID1" != "" ]
i o s
ic -tran status_p1="running"
then
b r
Fa non else
if [ -x $BIN_DIR/$BIN_NAME ]
then
umask 002
${BIN_DIR}/${BIN_NAME} &
2>${LOG_DIR}/${BIN1_NAME}.log
status_p1="started"
else
echo `basename $0`": $BIN_NAME: Executable not
found"
fi
fi
'stop')
if [ "${PID1}" != "" ]
then
Fab non-
#
more /u01/crs11g/crs/profile/myClock.cap
[oracle@vx0306 less09]$
rde le lice
USR_ORA_SRV=
e
USR_ORA_START_TIMEOUT=0
V ab
i l a
USR_ORA_STOP_MODE=immediate
V sfer
USR_ORA_STOP_TIMEOUT=0
i o
ic -tran
USR_ORA_VIP=
b r
Fa non [oracle@vx0306 less09]$
4) Register the myClock resource with CRS, and make sure user oracle can manage that
resource.
[oracle@vx0306 less09]$ cat sol_09_04_04.sh
#!/bin/ksh
#
# sol_09_04_04.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
/u01/crs11g/bin/crs_stat myClock
/u01/crs11g/bin/crs_stat myClock
NAME=myClock
TYPE=application
TARGET=OFFLINE
STATE=OFFLINE
o_ o us
ora....SM2.asm application ONLINE ONLINE vx0313
ora....13.lsnr application
ic i
ONLINE ONLINE vx0313
ora.vx0313.gsd application
( f abr nse t
ONLINE ONLINE vx0313
rde le lice
ora.vx0313.ons application ONLINE ONLINE vx0313
e
ora.vx0313.vip application
V ab
ONLINE ONLINE vx0313
i l a
[oracle@vx0306 less09]$
Vsure you er a VNC session under user oracle opened on your first node
i
5) Makeo s fhave
n This is necessary to see the clock. Now start the myClock resource
b r icterminal
- t r awindow.
Fa nasousern oracle, and determine the location and status of this resource after startup.
Look at the VNC session on first node; you should see the clock.
[oracle@vx0306 less09]$ cat sol_09_04_05.sh
#!/bin/ksh
#
# sol_09_04_05.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
/u01/crs11g/bin/crs_start myClock
sleep 30
/u01/crs11g/bin/crs_stat -t
[oracle@vx0306 less09]$
b r ic -tran
#
Fa ny=`cat
on /home/oracle/nodeinfo | sed -n '1,1p'`
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
/home/oracle/solutions/less09/killclockpid.sh
scp /home/oracle/solutions/less09/killclockpid.sh
$z:/home/oracle/solutions/less09/
ssh $z /home/oracle/solutions/less09/killclockpid.sh
[oracle@vx0306 less09]$
c m
o deฺ
/u01/crs11g/bin/crs_stat -t
i ฺ
d Gui
[oracle@vx0306 less09]$
r e
@ sic dent
[oracle@vx0306 less09]$ ./sol_09_04_07.sh e r de Stu
Name Type i lTarget s
av thiState Host
v
o_ oONLINE e
myClock r
application ic i
t us
------------------------------------------------------------
ONLINE vx0313
a b e
(f ens ONLINE ONLINE vx0306
ora....B1.inst application ONLINE ONLINE
ora....B2.inst eapplication
c
d i
ora.RDB.db er application
l vx0313
8) Repeat the following sequence twice: kill the xclock application and wait for it to be
restarted. After the last restart, what do you observe?
a) You should see that after three kills, myClock is relocated to the other node. This
is due to the ra attribute that you defined for myClock.
[oracle@vx0306 less09]$ cat sol_09_04_08.sh
#!/bin/ksh
#
# sol_09_04_08.sh
#
cd /home/oracle/solutions/less09
./killclockpid.sh
s a
scp killclockpid.sh $z:/home/oracle/solutions/less09
)h a
ssh $z "chmod 777
m ฺbr
/home/oracle/solutions/less09/killclockpid.sh"
i ฺ c o deฺ
ssh $z /home/oracle/solutions/less09/killclockpid.sh
r e d Gui
sleep 20 @ sic dent
e r de Stu
./killclockpid.sh
v i lav e this
ic i o_ o us
ssh $z /home/oracle/solutions/less09/killclockpid.sh
( f a br se t
sleep 20
r d e licen
V e ble
l a a
/u01/crs11g/bin/crs_stat
i r
-t
i c i o V ansfe
[oracle@vx0306 less09]$
a b r - tr
F o n
n[oracle@vx0306 less09]$ ./sol_09_04_08.sh
usage: kill [ -s signal | -p ] [ -a ] pid ...
kill -l [ signal ]
killclockpid.sh 100% 112
0.1KB/s 00:00
usage: kill [ -s signal | -p ] [ -a ] pid ...
kill -l [ signal ]
Name Type Target State Host
------------------------------------------------------------
myClock application ONLINE ONLINE vx0306
ora....B1.inst application ONLINE ONLINE vx0306
ora....B2.inst application ONLINE ONLINE vx0313
ora.RDB.db application ONLINE ONLINE vx0306
ora....SM1.asm application ONLINE ONLINE vx0306
ora....06.lsnr application ONLINE ONLINE vx0306
ora.vx0306.gsd application ONLINE ONLINE vx0306
ora.vx0306.ons application ONLINE ONLINE vx0306
ora.vx0306.vip application ONLINE ONLINE vx0306
ora....SM2.asm application ONLINE ONLINE vx0313
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
cd $HOME/solutions/less10
s a
)h a
sudo ./cleanlog.sh
m ฺbr
[oracle@vx0306 less10]$
i ฺ c o deฺ
r e d Gui
[oracle@vx0306 less10]$ cat cleanlog.sh s
ic ent
d @
e Stud
# cleanlog.sh
r
ve -n t'1,1p'`
y=`cat /home/oracle/nodeinfov| i lased e his
z=`cat /home/oracle/nodeinfo
ic i o_ |osedus-n '2,2p'`
r
a-cb 1-11` t
e
HOST=`hostname|cut ( f
e n se
e rd le lic
a V ab
cd /u01/crs11g/log/$y
l
find i
V sferf -exec
. -type rm {} \;
i o
ic -tran
[oracle@vx0306 less10]$
b r
Fa non
[oracle@vx0306 less10]$ ./sol_10_01_01a.sh
[oracle@vx0306 less10]$
b) Using the ps command find the process ID of the crsd process. Use the kill
command with sudo to kill the process since it is owned by root.
[oracle@vx0306 less10]$ cat sol_10_01_01b.sh
# sol_10_01_01b.sh
ps -ef|grep -i crsd
d) Inspect the various files that were generated, starting with the Clusterware Alert
log.
[oracle@vx0306 less10]$ cat sol_10_01_01d.sh
# sol_10_01_01d.sh
HOST=`hostname|cut -c 1-11`
cd /u01/crs11g/log/$y
cat ./alert$y.log
cat ./crsd/crsd.log
cat ./client/ocr*
cat ./client/css*
e rde le lice
2007-11-19 02:55:02.353: [ CRSD][3055683264] ENV Logging
l a V ab
level for Module: CRSCOMM 0
i
V sfer
2007-11-19 02:55:02.356: [ CRSD][3055683264] ENV Logging
i o
level for Module: CRSRTI 0
ic -tran
b r 2007-11-19 02:55:02.357: [ CRSD][3055683264] ENV Logging
Fa non level for Module: CRSMAIN 0
2007-11-19 02:55:02.359: [ CRSD][3055683264] ENV Logging
level for Module: CRSPLACE 0
2007-11-19 02:55:02.360: [ CRSD][3055683264] ENV Logging
level for Module: CRSAPP 0
2007-11-19 02:55:02.367: [ CRSD][3055683264] ENV Logging
level for Module: CRSRES 0
2007-11-19 02:55:02.376: [ CRSD][3055683264] ENV Logging
level for Module: CRSOCR 0
2007-11-19 02:55:02.377: [ CRSD][3055683264] ENV Logging
level for Module: CRSTIMER 0
2007-11-19 02:55:02.379: [ CRSD][3055683264] ENV Logging
level for Module: CRSEVT 0
2007-11-19 02:55:02.389: [ CRSD][3055683264] ENV Logging
level for Module: CRSD 0
2007-11-19 02:55:02.396: [ CRSD][3055683264] ENV Logging
level for Module: CLUCLS 0
2007-11-19 02:55:02.398: [ CRSD][3055683264] ENV Logging
level for Module: CLSVER 0
a b r a) Run - trthe crsctl command from the /u01/crs11g/bin directory as shown below.
F no n
[oracle@vx0306 less10]$ cat sol_10_01_02a.sh
# sol_10_01_02a.sh
cd /u01/crs11g/bin
./crsctl check crs
[oracle@vx0306 less10]$
l a V abno
---- ----------
V i
vx0306
f e r exists
i c iovx0313
passed
a n s
b r - t r no exists
Fa nResult:
on Check passed.
passed
HOST=`hostname|cut -c 1-10`
cd /u01/crs11g/bin
./crs_stat -p ora.${z}.vip
[oracle@vx0306 less10]$
FAILURE_INTERVAL=0
v i lav e this
FAILURE_THRESHOLD=0
ic i o_ o us
abr nse t
HOSTING_MEMBERS=vx0313
(
OPTIONAL_RESOURCES= f
rde le lice
PLACEMENT=favored
e
l a V ab
REQUIRED_RESOURCES=
i
V sfer
RESTART_ATTEMPTS=0
i o
SCRIPT_TIMEOUT=60
ic -tran
b r START_TIMEOUT=0
Fa non STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
USR_ORA_FLAGS=
USR_ORA_IF=eth0
USR_ORA_INST_NOT_SHUTDOWN=
USR_ORA_LANG=
USR_ORA_NETMASK=255.255.252.0
USR_ORA_OPEN_MODE=
USR_ORA_OPI=false
USR_ORA_PFILE=
USR_ORA_PRECONNECT=none
USR_ORA_SRV=
USR_ORA_START_TIMEOUT=0
USR_ORA_STOP_MODE=immediate
[oracle@vx0306 less10]$
4) Determine the file(s) the OCR is using. Determine the total space available and what
is currently being used.
a) Run the ocrcheck command from the /u01/crs11g/bin directory as shown below.
[oracle@vx0306 less10]$ cat sol_10_01_04.sh
# sol_10_01_04.sh
cd /u01/crs11g/bin
./ocrcheck
s a
[oracle@vx0306 less10]$
)h a
m ฺbr
i ฺ c o deฺ
[oracle@vx0306 less10]$ ./sol_10_01_04.sh
r e d Gui
Status of Oracle Cluster Registry is as follows
: e@
sic 2 de: nt
Version
Total space (kbytes) e:rd S tu
616652
Used space (kbytes) ilav : this 3848
o _v us:e 612804
Available space (kbytes)
i
ID
a b ric e to :: 992212279
e (f ens
Device/File Name /dev/sdb1
a b r check
n - tra
F no Cluster registry integrity check succeeded
[oracle@vx0306 less10]$
b) In this example, the OCR is using the file /dev/sdb1 and /dev/sdb2. The size of the
file is 616652k and of that, 3848k is currently in use.
This practice introduces an error into the cluster synchronization service on your cluster.
From your solutions directory, run the lab10-2-prep.sh script to prepare for the practice.
Then run the breakcss.sh script to introduce the error condition. Observe the results and
inspect your logs to identify and diagnose the problem. Repair the problem and return
your cluster to normal operation.
1) Change your directory to $HOME/solutions/less10 and execute the lab10-2-prep.sh
[oracle@vx0306 less10]$ cat lab10-2-prep.sh
# lab10-2-prep.sh
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
/u01/crs11g/bin/crs_stat -t
sleep 60
e@ Stud
force
r d
sudo /u01/crs11g/bin/crsctl start
i l a vecrs this
i o _v use
sleep 300
a b ric e to
e
/u01/crs11g/bin/crs_stat (f en-t s
d li c
er/u01/crs11g/bin/crsctl
a V b l e
ssh $z sudo
i l fe r a start crs
i c i o V 300 n s
tra
sleep
a b r -
F o n
n/u01/crs11g/bin/crs_stat -t
while true
do
dd if=/dev/zero of=/dev/sdb5 bs=1M count=20
done
[oracle@vx0306 less10]$
i o n
icora.vx0306.gsd
a
ora....06.lsnr vx0306
b r t r
on-
Fa nora.vx0306.ons
application ONLINE ONLINE vx0306
application ONLINE ONLINE vx0306
ora.vx0306.vip application ONLINE ONLINE vx0306
ora....SM2.asm application ONLINE OFFLINE
ora....13.lsnr application ONLINE OFFLINE
ora.vx0313.gsd application ONLINE OFFLINE
ora.vx0313.ons application ONLINE OFFLINE
ora.vx0313.vip application ONLINE ONLINE vx0306
Attempting to start Oracle Clusterware stack
The CRS stack will be started shortly
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE vx0306
ora....B2.inst application ONLINE ONLINE vx0313
ora.RDB.db application ONLINE ONLINE vx0306
ora....SM1.asm application ONLINE ONLINE vx0306
ora....06.lsnr application ONLINE ONLINE vx0306
ora.vx0306.gsd application ONLINE ONLINE vx0306
ora.vx0306.ons application ONLINE ONLINE vx0306
ora.vx0306.vip application ONLINE ONLINE vx0306
cd /u01/crs11g/log/$y*
ls -al
s a
)h a
m ฺbr
5) Looking at the alert log, what could be the cause of the problem? ฺco
i d e ฺ
d G
reoffline. i
u would
i
s denc
a) You can see that the voting disk appears to be intermittently t This
certainly cause problems with CSS. @
e r de Stu
lav e this
[oracle@vx0308 less10]$ cat sol_10_02_05.sh
# sol_10_02_05.sh
v i
ic i o_ o us
( f abr nse ||t sed
y=`cat /home/oracle/nodeinfo
z=`cat /home/oracle/nodeinfo
-n '1,1p'`
sed -n '2,2p'`
e r de lice
l a V able
cd /u01/crs11g/log/$y*
i
Valert*.logf er
i o an
ic[oracle@vx0308
view s
a b r - t r less10]$
F o n
n[oracle@vx0308 less10]$ ./sol_10_02_05.sh
…
[crsd(6213)]CRS-1005:The OCR upgrade was completed. Version
has changed from 185599488 to 185599488. Details in
/u01/crs11g/log/vx0308/crsd/crsd.log.
2007-11-26 01:39:29.697
[cssd(7551)]CRS-1612:node vx0309 (2) at 50% heartbeat fatal,
eviction in 14.080 seconds
2007-11-26 01:39:36.768
[cssd(7551)]CRS-1611:node vx0309 (2) at 75% heartbeat fatal,
eviction in 7.010 seconds
2007-11-26 01:39:40.807
[cssd(7551)]CRS-1610:node vx0309 (2) at 90% heartbeat fatal,
eviction in 2.202 seconds
2007-11-26 01:39:41.817
[cssd(7551)]CRS-1610:node vx0309 (2) at 90% heartbeat fatal,
eviction in 1.192 seconds
2007-11-26 01:45:27.997
e r de Stu
v i lav e this
[crsd(5835)]CRS-1012:The OCR service started on node vx0308.
o_ o us
2007-11-26 01:45:28.987
ic i
[crsd(5835)]CRS-1201:CRSD started on node vx0308.
( f abr nse t
2007-11-26 01:45:29.218
rde le lice
[crsd(5835)]CRS-1205:Auto-start failed for the CRS resource .
e
Details in vx0308.
V ab
i l a
2007-11-26 01:45:29.232
V sfer
[crsd(5835)]CRS-1205:Auto-start failed for the CRS resource .
i o
ic -tran
Details in vx0308.
b r
Fa non
[cssd(6454)]CRS-1601:CSSD Reconfiguration complete. Active
nodes are vx0308 vx0309 .
2007-11-26 01:51:15.029
[cssd(6454)]CRS-1604:CSSD voting file is offline: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
2007-11-26 01:51:23.029
[cssd(6454)]CRS-1605:CSSD voting file is online: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
2007-11-26 01:51:24.225
[cssd(6454)]CRS-1604:CSSD voting file is offline: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
2007-11-26 01:51:33.413
[cssd(6454)]CRS-1605:CSSD voting file is online: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
2007-11-26 01:51:34.470
[cssd(6454)]CRS-1604:CSSD voting file is offline: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
2007-11-26 01:51:43.894
[cssd(6454)]CRS-1605:CSSD voting file is online: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
r de Stu
[cssd(6454)]CRS-1605:CSSD voting file is online: /dev/sdb5.
e
v i lav e this
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
o_ o us
2007-11-26 01:52:25.838
ic i
[cssd(6454)]CRS-1604:CSSD voting file is offline: /dev/sdb5.
( f abr nse t
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
rde le lice
2007-11-26 01:52:35.053
e
[cssd(6454)]CRS-1605:CSSD voting file is online: /dev/sdb5.
V ab
i l a
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
V sfer
2007-11-26 01:53:39.748
i o
ic -tran
[cssd(6454)]CRS-1604:CSSD voting file is offline: /dev/sdb5.
b r
Fa non
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
2007-11-26 01:53:47.775
[cssd(6454)]CRS-1605:CSSD voting file is online: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
2007-11-26 01:53:48.984
[cssd(6454)]CRS-1604:CSSD voting file is offline: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
2007-11-26 01:53:48.984
[cssd(6454)]CRS-1604:CSSD voting file is offline: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
2007-11-26 02:02:07.242
[cssd(7569)]CRS-1605:CSSD voting file is online: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
2007-11-26 02:02:07.254
[cssd(7569)]CRS-1604:CSSD voting file is offline: /dev/sdb5.
Details in /u01/crs11g/log/vx0308/cssd/ocssd.log.
[cssd(7569)]CRS-1601:CSSD Reconfiguration complete. Active
nodes are vx0308 vx0309 .
2007-11-26 02:02:08.937
[crsd(6260)]CRS-1012:The OCR service started on node vx0308.
6) The alert log indicates that further information can be found. Where would you have
to look at?
a) In the /u01/crs11g/log/<host name>/cssd/ocssd.log. The real problem is revealed
here. You can see that the voting disk, /dev/sdb5 is corrupted. This was the cause
of the reboot.
s a
)h a
ฺbr
[oracle@vx0308 less10]$ cat sol_10_02_06.sh
# sol_10_02_06.sh
c m
o deฺ
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'` ed i ฺ u i
r G
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
@ sic dent
view /u01/crs11g/log/$y*/cssd/ocssd.log
e r de Stu
[oracle@vx0308 less10]$
v i lav e this
i o_ o us
[oracle@vx0308 less10]$ic./sol_10_02_06.sh
( f abr nse t
…
e rde le lic01:39:36.767
e
[
a V
CSSD]2007-11-26
b
[2941873056] >WARNING:
V ra seconds
il infe7.010
clssnmPollingThread: node vx0309 (2) at 75% heartbeat fatal,
i c
eviction
[i a n s
o CSSD]2007-11-26
b r - t r 01:39:40.807 [2941873056] >WARNING:
Fa neviction
on
clssnmPollingThread: node vx0309 (2) at 90% heartbeat fatal,
in 2.970 seconds
[ CSSD]2007-11-26 01:39:41.817 [2941873056] >WARNING:
clssnmPollingThread: node vx0309 (2) at 90% heartbeat fatal,
eviction in 1.960 seconds
[ CSSD]2007-11-26 01:39:42.827 [2941873056] >WARNING:
clssnmPollingThread: node vx0309 (2) at 90% heartbeat fatal,
eviction in 0.950 seconds
[ CSSD]2007-11-26 01:39:43.787 [2941873056] >TRACE:
clssnmPollingThread: Eviction started for node vx0309 (2),
flags 0x0001, state 3, wt4c 0
[ CSSD]2007-11-26 01:39:43.787 [2925087648] >TRACE:
clssnmDoSyncUpdate: Initiating sync 91161491
[ CSSD]2007-11-26 01:39:43.787 [2925087648] >TRACE:
clssnmDoSyncUpdate: diskTimeout set to (27000)ms
[ CSSD]2007-11-26 01:39:43.787 [2925087648] >TRACE:
clssnmSetupAckWait: Ack message type (11)
[ CSSD]2007-11-26 01:39:43.787 [2925087648] >TRACE:
clssnmSetupAckWait: node(1) is ALIVE
( f abr nse t
clssgmReconfigThread: started for reconfig (91161491)
rde le lice
[ CSSD]2007-11-26 01:39:43.789 [2899909536] >USER:
e
NMEVENT_RECONFIG [00][00][00][02]
V ab
[
l a
CSSD]2007-11-26 01:39:43.789 [2899909536] >TRACE:
i
V sfer
clssgmCleanupGrocks: cleaning up grock crs_version type 2
i o
ic -tran
[ CSSD]2007-11-26 01:39:43.789 [2899909536] >TRACE:
b r
Fa non
clssgmCleanupOrphanMembers: cleaning up remote mbr(2)
grock(crs_version) birth(91161446/0)
[ CSSD]2007-11-26 01:39:43.789 [2899909536] >TRACE:
clssgmCleanupGrocks: cleaning up grock EVMDMAIN type 2
[ CSSD]2007-11-26 01:39:43.789 [2899909536] >TRACE:
clssgmCleanupOrphanMembers: cleaning up remote mbr(2)
grock(EVMDMAIN) birth(91161446/0)
[ CSSD]2007-11-26 01:39:43.789 [2899909536] >TRACE:
clssgmCleanupGrocks: cleaning up grock CRSDMAIN type 2
[ CSSD]2007-11-26 01:39:43.789 [2899909536] >TRACE:
clssgmCleanupGrocks: cleaning up grock ocr_vx_cluster03 type 2
[ CSSD]2007-11-26 01:39:43.789 [2899909536] >TRACE:
clssgmCleanupGrocks: cleaning up grock _ORA_CRS_MEMBER_vx0308
type 3
[ CSSD]2007-11-26 01:39:43.789 [2899909536] >TRACE:
clssgmCleanupGrocks: cleaning up grock #CSS_CLSSOMON type 2
[ CSSD]2007-11-26 01:39:43.789 [2899909536] >TRACE:
clssgmEstablishConnections: 1 nodes in cluster incarn 91161491
[ CSSD]2007-11-26 01:39:43.789 [2950532000] >TRACE:
clssgmPeerListener: connects done (1/1)
o_ o us
[ CSSD]2007-11-26 01:40:13.742 [2984102816] >TRACE:
ic i
clssgmClientShutdown: I/O capable proc (0x835fdf8), pid (6223)
[
abr nse t
CSSD]2007-11-26 01:40:13.764 [2984102816] >WARNING:
( f
rde le lice
clssgmClientShutdown: graceful shutdown completed.
e
[ clsdmt]Listening to
V ab
[ l a
(ADDRESS=(PROTOCOL=ipc)(KEY=vx0308DBG_CSSD))
i
V sfer
CSSD]2007-11-26 01:45:19.974 >USER: Oracle Database
i o
ic -tran
10g CSS Release 11.1.0.6.0 Production Copyright 1996, 2004
b r
Fa non
Oracle. All rights reserved.
[ CSSD]2007-11-26 01:45:19.974 >USER: CSS daemon log for
node vx0308, number 1, in cluster vx_cluster03
[ CSSD]2007-11-26 01:45:19.984 [3055966592] >TRACE:
clssscmain: local-only set to false
[ CSSD]2007-11-26 01:45:20.001 [3055966592] >TRACE:
clssnmReadNodeInfo: added node 1 (vx0308) to cluster
[ CSSD]2007-11-26 01:45:20.016 [3055966592] >TRACE:
clssnmReadNodeInfo: added node 2 (vx0309) to cluster
[ CSSD]2007-11-26 01:45:20.020 [3055966592] >WARNING:
clssnmReadWallet: Open Wallet returned 28759
[ CSSD]2007-11-26 01:45:20.020 [3055966592] >WARNING:
clssnmInitNMInfo: Node not configured for node kill
[ CSSD]2007-11-26 01:45:20.037 [3028274080] >TRACE:
clssnm_skgxninit: Compatible vendor clusterware not in use
[ CSSD]2007-11-26 01:45:20.037 [3028274080] >TRACE:
clssnm_skgxnmon: skgxn init failed
[ CSSD]2007-11-26 01:45:20.044 [3055966592] >TRACE:
clssnmNMInitialize: Network heartbeat thresholds are:
probcon(0x8282438) br
i Probing t o node
[
e
CSSD]2007-11-26
e n se
(fa 01:45:20.218 [3001019296] >TRACE:
clsc_send_msg: r d
e0) ble l i c
(0x82820a8) NS err (12571, 12560), transport
V
ila fera
(530, 111,
V
i c[io
a n s
CSSD]2007-11-26 01:45:20.218 [3001019296] >TRACE:
b r t r
on-
Fa n(0x8282438),
clssnmDiscHelper: vx0309, node(2) connection failed, con
probe(0x8282438)
[ CSSD]2007-11-26 01:45:20.218 [2992360352] >TRACE:
clssgmDeathChkThread: Spawned
[ CSSD]2007-11-26 01:45:20.268 [2983967648] >TRACE:
clssgmclientlsnr: listening on
(ADDRESS=(PROTOCOL=ipc)(KEY=Oracle_CSS_LclLstnr_vx_cluster03_1
))
[ CSSD]2007-11-26 01:45:20.268 [2983967648] >TRACE:
clssgmclientlsnr: listening on
(ADDRESS=(PROTOCOL=ipc)(KEY=OCSSD_LL_vx0308_vx_cluster03))
[ CSSD]2007-11-26 01:45:20.268 [2983967648] >TRACE:
clssgmclientlsnr: listening on
(ADDRESS=(PROTOCOL=ipc)(KEY=OCSSD_LL_vx0308_))
[ CSSD]2007-11-26 01:45:20.296 [2949995424] >TRACE:
clssgmPeerListener: Listening on
(ADDRESS=(PROTOCOL=tcp)(DEV=22)(HOST=10.196.30.29)(PORT=18702)
)
[ CSSD]2007-11-26 01:45:27.387 [2924551072] >TRACE:
clssnmRcfgMgrThread: Local Join
o_ o us
[ CSSD]2007-11-26 01:45:27.388 [3001019296] >TRACE:
ic i
clssnmHandleSync: Acknowledging sync: src[1] srcName[vx0308]
seq[1] sync[91161493]
( f abr nse t
rde le lice
[ CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
e
clssnmWaitForAcks: done, msg type(11)
V ab
[
l a
CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
i
V sfer
clssnmNeedConfReq: No configuration to change
i o
ic -tran
[ CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
b r
Fa non
clssnmDoSyncUpdate: node(1) is transitioning from joining
state to active state
[ CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
clssnmSetupAckWait: Ack message type (13)
[ CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
clssnmSetupAckWait: node(1) is ACTIVE
[ CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
clssnmSendVote: syncSeqNo(91161493)
[ CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
clssnmWaitForAcks: Ack message type(13), ackCount(1)
[ CSSD]2007-11-26 01:45:27.388 [3001019296] >TRACE:
clssnmSendVoteInfo: node(1) syncSeqNo(91161493)
[ CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
clssnmWaitForAcks: done, msg type(13)
[ CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
clssnmCheckDskInfo: Checking disk info...
[ CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
clssnmCheckDskInfo: diskTimeout set to (200000)ms
[ CSSD]2007-11-26 01:45:27.388 [2924551072] >TRACE:
clssnmEvict: Start
( f abr nse t
clssnmHandleUpdate: NODE 1 (vx0308) IS ACTIVE MEMBER OF
rde le lice
CLUSTER
[ e
CSSD]2007-11-26 01:45:27.411 [3001019296] >TRACE:
V ab
[ i l a
clssnmHandleUpdate: diskTimeout set to (200000)ms
V sfer
CSSD]2007-11-26 01:45:27.411 [2924551072] >TRACE:
i o
ic -tran
clssnmWaitForAcks: done, msg type(15)
b r
Fa non
[ CSSD]2007-11-26 01:45:27.411 [2924551072] >TRACE:
clssnmDoSyncUpdate: Sync 0 complete!
[ CSSD]2007-11-26 01:45:27.417 [3055966592] >USER:
NMEVENT_SUSPEND [00][00][00][00]
[ CSSD]2007-11-26 01:45:27.429 [2899372960] >TRACE:
clssgmReconfigThread: started for reconfig (91161493)
[ CSSD]2007-11-26 01:45:27.429 [2899372960] >TRACE: KGZF:
context successfully initialized, API version 1.1
o_ o us
[ CSSD]2007-11-26 01:46:21.593 [3001019296] >TRACE:
ic i
clssnmConnComplete: node 2, vx0309, con(0x8370ac0),
( f abr nse t
probcon((nil)), ninfcon((nil)), node unique 1196063173, prev
rde le lice
unique 0, msg unique 1196063173 node state 0
[ e
CSSD]2007-11-26 01:46:21.593 [3001019296] >TRACE:
V ab
[ i l a
clssnmsendConnAck: node 2, node state 0
V sfer
CSSD]2007-11-26 01:46:21.593 [3001019296] >TRACE:
i o
ic -tran
clssnmSendConnAck: connected to node 2 , ninfcon (0x8370ac0),
b r
Fa non
state (0)
[ CSSD]2007-11-26 01:46:21.593 [3001019296] >TRACE:
clssnmConnComplete: connecting to node 2 (con 0x8370ac0),
ninfcon (0x8370ac0), state (0)
[ CSSD]2007-11-26 01:46:21.593 [3001019296] >TRACE:
clssnmConnComplete: ninf->killinfosz 0
[ CSSD]2007-11-26 01:46:21.941 [2924551072] >TRACE:
clssnmDoSyncUpdate: Initiating sync 91161494
[ CSSD]2007-11-26 01:46:21.941 [2924551072] >TRACE:
clssnmDoSyncUpdate: diskTimeout set to (27000)ms
[ CSSD]2007-11-26 01:46:21.941 [2924551072] >TRACE:
clssnmSetupAckWait: Ack message type (11)
[ CSSD]2007-11-26 01:46:21.941 [2924551072] >TRACE:
clssnmSetupAckWait: node(1) is ALIVE
[ CSSD]2007-11-26 01:46:21.941 [2924551072] >TRACE:
clssnmSetupAckWait: node(2) is ALIVE
[ CSSD]2007-11-26 01:46:21.941 [2924551072] >TRACE:
clssnmSendSync: syncSeqNo(91161494)
[ CSSD]2007-11-26 01:46:21.941 [3001019296] >TRACE:
clssnmHandleSync: diskTimeout set to (27000)ms
o_ o us
[ CSSD]2007-11-26 01:46:21.942 [3001019296] >TRACE:
ic i
clssnmSendVoteInfo: node(1) syncSeqNo(91161494)
[
abr nse t
CSSD]2007-11-26 01:46:21.943 [2924551072] >TRACE:
( f
rde le lice
clssnmWaitForAcks: done, msg type(13)
[ e
CSSD]2007-11-26 01:46:21.943 [2924551072] >TRACE:
V ab
[ i l a
clssnmCheckDskInfo: Checking disk info...
V sfer
CSSD]2007-11-26 01:46:21.943 [2924551072] >TRACE:
i o
ic -tran
clssnmEvict: Start
b r
Fa non
[ CSSD]2007-11-26 01:46:21.943 [2924551072] >TRACE:
clssnmWaitOnEvictions: Start
[ CSSD]2007-11-26 01:46:21.943 [2924551072] >TRACE:
clssnmSetupAckWait: Ack message type (15)
[ CSSD]2007-11-26 01:46:21.943 [2924551072] >TRACE:
clssnmSetupAckWait: node(1) is ACTIVE
[ CSSD]2007-11-26 01:46:21.943 [2924551072] >TRACE:
clssnmSetupAckWait: node(2) is ACTIVE
[ CSSD]2007-11-26 01:46:21.943 [2924551072] >TRACE:
clssnmSendUpdate: syncSeqNo(91161494)
[ CSSD]2007-11-26 01:46:21.943 [2924551072] >TRACE:
clssnmWaitForAcks: Ack message type(15), ackCount(2)
[ CSSD]2007-11-26 01:46:21.943 [3001019296] >TRACE:
clssnmUpdateNodeState: node 0, state (0/0) unique (0/0)
prevConuni(0) birth (0/0) (old/new)
[ CSSD]2007-11-26 01:46:21.943 [3001019296] >TRACE:
clssnmUpdateNodeState: node 1, state (3/3) unique
(1196063119/1196063119) prevConuni(0) birth
(91161493/91161493) (old/new)
o_ o us
[ CSSD]2007-11-26 01:46:22.023 [2949995424] >TRACE:
ic i
clssgmInitialRecv: (0x83831b0) accepted a new connection from
( f abr nse t
node 2 born at 91161494 active (2, 2), vers (11,1,1,2)
rde le lice
[ CSSD]2007-11-26 01:46:22.023 [2949995424] >TRACE:
e
clssgmInitialRecv: conns done (2/2)
V ab
[
l a
CSSD]2007-11-26 01:46:22.023 [2899372960] >TRACE:
i
V sfer
clssgmEstablishMasterNode: MASTER for 91161494 is node(1)
i o
ic -tran
birth(91161493)
b r
Fa non
[ CSSD]2007-11-26 01:46:22.024 [2899372960] >TRACE:
clssgmMasterCMSync: Synchronizing group/lock status
[ CSSD]2007-11-26 01:46:22.028 [2899372960] >TRACE:
clssgmMasterSendDBDone: group/lock status synchronization
complete
[ CSSD]CLSS-3000: reconfiguration successful, incarnation
91161494 with 2 nodes
o_ o us
[ CSSD]2007-11-26 01:51:45.548 [3019201440] >TRACE:
ic i
clssnmDiskStateChange: state from 4 to 3 disk (0//dev/sdb5)
[
abr nse t
CSSD]2007-11-26 01:51:53.913 [3028274080] >TRACE:
( f
rde le lice
clssnmDiskStateChange: state from 3 to 4 disk (0//dev/sdb5)
[ e
CSSD]2007-11-26 01:51:55.016 [3019201440] >ERROR:
V ab
i l a
clssnmvDiskKillCheck: voting disk corrupted
V sfer
(0x00000000,0x00000000) (0//dev/sdb5)
i o
ic -tran
[ CSSD]2007-11-26 01:51:55.016 [3019201440] >TRACE:
b r
Fa non
clssnmDiskStateChange: state from 4 to 3 disk (0//dev/sdb5)
[ CSSD]2007-11-26 01:52:04.424 [3028274080] >TRACE:
clssnmDiskStateChange: state from 3 to 4 disk (0//dev/sdb5)
[ CSSD]2007-11-26 01:52:06.098 [3019201440] >ERROR:
clssnmvDiskKillCheck: voting disk corrupted
(0x00000000,0x00000000) (0//dev/sdb5)
[ CSSD]2007-11-26 01:52:06.098 [3019201440] >TRACE:
clssnmDiskStateChange: state from 4 to 3 disk (0//dev/sdb5)
[ CSSD]2007-11-26 01:52:14.439 [3028274080] >TRACE:
clssnmDiskStateChange: state from 3 to 4 disk (0//dev/sdb5)
[ CSSD]2007-11-26 01:52:15.597 [3019201440] >ERROR:
clssnmvDiskKillCheck: voting disk corrupted
(0x00000000,0x00000000) (0//dev/sdb5)
[ CSSD]2007-11-26 01:52:15.597 [3019201440] >TRACE:
clssnmDiskStateChange: state from 4 to 3 disk (0//dev/sdb5)
[ CSSD]2007-11-26 01:52:24.802 [3028274080] >TRACE:
clssnmDiskStateChange: state from 3 to 4 disk (0//dev/sdb5)
[ CSSD]2007-11-26 01:52:25.836 [3019201440] >ERROR:
clssnmvDiskKillCheck: voting disk corrupted
(0x00000000,0x00000000) (0//dev/sdb5)
Oracle. V
e ble reserved.
10g CSS Release 11.1.0.6.0 Production Copyright 1996, 2004
la fera
All rights
[ ViCSSD]2007-11-26 02:02:06.830 >USER: CSS daemon log for
i o an s
ic[ -tCSSD]2007-11-26
node vx0308, number 1, in cluster vx_cluster03
b r r
Fa nclssscmain:
on
02:02:06.855 [3056085376] >TRACE:
local-only set to false
[ CSSD]2007-11-26 02:02:06.918 [3056085376] >TRACE:
clssnmReadNodeInfo: added node 1 (vx0308) to cluster
[ CSSD]2007-11-26 02:02:06.964 [3056085376] >TRACE:
clssnmReadNodeInfo: added node 2 (vx0309) to cluster
[ CSSD]2007-11-26 02:02:06.968 [3056085376] >WARNING:
clssnmReadWallet: Open Wallet returned 28759
[ CSSD]2007-11-26 02:02:06.968 [3056085376] >WARNING:
clssnmInitNMInfo: Node not configured for node kill
[ CSSD]2007-11-26 02:02:06.997 [3028392864] >TRACE:
clssnm_skgxninit: Compatible vendor clusterware not in use
[ CSSD]2007-11-26 02:02:06.997 [3028392864] >TRACE:
clssnm_skgxnmon: skgxn init failed
[ CSSD]2007-11-26 02:02:07.016 [3056085376] >TRACE:
clssnmNMInitialize: Network heartbeat thresholds are:
impending reconfig 15000 ms, reconfig start (misscount) 30000
ms
( f a br se t
[
en
e licSpawned
CSSD]2007-11-26 02:02:07.239
r d
[2992634784] >TRACE:
e ble 02:02:07.254 [3002399648] >TRACE:
clssgmDeathChkThread:
V
[
V a
il fera
CSSD]2007-11-26
clssnmClusterListener: Probing node vx0309 (2),
i o an s
ic[ -tCSSD]2007-11-26
probcon(0xb265f128)
b r r
Fa nclssnmConnComplete:
on
02:02:07.255 [3002399648] >TRACE:
MSGSRC 2, type 6, node 2, flags 0x0001,
con 0xb265f128, probe 0xb265f128, nodekillsz 0
[ CSSD]2007-11-26 02:02:07.255 [3002399648] >TRACE:
clssnmConnComplete: node 2, vx0309, con(0xb265f128),
probcon(0xb265f128), ninfcon((nil)), node unique 1196063173,
prev unique 0, msg unique 1196063173 node state 0
[ CSSD]2007-11-26 02:02:07.255 [3002399648] >TRACE:
clssnmConnComplete: connected to node 2 (con 0xb265f128),
ninfcon (0xb265f128), state (0), flag (1037)
[ CSSD]2007-11-26 02:02:07.255 [3002399648] >TRACE:
clssnmConnComplete: ninf->killinfosz 0
[ CSSD]2007-11-26 02:02:07.293 [2984242080] >TRACE:
clssgmclientlsnr: listening on
(ADDRESS=(PROTOCOL=ipc)(KEY=Oracle_CSS_LclLstnr_vx_cluster03_1
))
[ CSSD]2007-11-26 02:02:07.293 [2984242080] >TRACE:
clssgmclientlsnr: listening on
(ADDRESS=(PROTOCOL=ipc)(KEY=OCSSD_LL_vx0308_vx_cluster03))
[ r de Stu
CSSD]2007-11-26 02:02:08.325 [3002399648] >TRACE:
e
v i lav e this
clssnmUpdateNodeState: node 1, state (1/3) unique
o_ o us
(1196064126/1196064126) prevConuni(0) birth (0/91161496)
(old/new)
ic i
[
abr nse t
CSSD]2007-11-26 02:02:08.325 [3002399648] >TRACE:
( f
rde le lice
clssnmUpdateNodeState: node 2, state (4/3) unique
e
(1196063173/1196063173) prevConuni(0) birth (0/91161494)
V ab
[ i l
(old/new)
a
V sfer
CSSD]2007-11-26 02:02:08.347 [3002399648] >TRACE:
i o
ic -tran
clssscInitSAGEFencing: kgzf fence initialization successfully
b r
Fa non
started
[ CSSD]2007-11-26 02:02:08.347 [3002399648] >USER:
clssnmHandleUpdate: SYNC(91161496) from node(2) completed
[ CSSD]2007-11-26 02:02:08.347 [3002399648] >USER:
clssnmHandleUpdate: NODE 1 (vx0308) IS ACTIVE MEMBER OF
CLUSTER
[ CSSD]2007-11-26 02:02:08.347 [3002399648] >USER:
clssnmHandleUpdate: NODE 2 (vx0309) IS ACTIVE MEMBER OF
CLUSTER
[ CSSD]2007-11-26 02:02:08.347 [3002399648] >TRACE:
clssnmHandleUpdate: diskTimeout set to (200000)ms
[ CSSD]2007-11-26 02:02:08.428 [3056085376] >USER:
NMEVENT_SUSPEND [00][00][00][00]
[ CSSD]2007-11-26 02:02:08.438 [2899512224] >TRACE:
clssgmReconfigThread: started for reconfig (91161496)
[ CSSD]2007-11-26 02:02:08.438 [2899512224] >TRACE: KGZF:
context successfully initialized, API version 1.1
i o _v us[2899512224]
e
[
b r iccompleted
CSSD]2007-11-26 02:02:08.447
t o >TRACE:
clssgmReconfigThread:
( f a nse for reconfig(91161496), with
rde le lic02:02:08.557
e
status(1)
[ e
CSSD]2007-11-26
V
[2950134688] >TRACE:
V ila ferab
clssgmCommonAddMember:
(1/0x1000000/#CSS_CLSSOMON)
clsomon joined
i c[io
a n s
CSSD]2007-11-26 02:02:16.220 [3028392864] >TRACE:
b r t r
Fa n[on- CSSD]2007-11-26 02:02:16.222 [3028392864] >ERROR:
clssnmDiskStateChange: state from 3 to 4 disk (0//dev/sdb5)
s a
[oracle@vx0308 less10]$ cat sol_10_02_07.sh
)h a
# sol_10_02_07.sh
m ฺbr
i ฺ c o deฺ
dd if=/home/oracle/solutions/less10/vdisk.bak of=/dev/sdb5
r e d Gui
bs=4k
[oracle@vx0308 less10]$ @ sic dent
e r de Stu
v i lav e this
o_ o us
[oracle@vx0308 less10]$ ./sol_10_02_07.sh
154224+1 records in
ic i
154224+1 records outbr e t
[oracle@vx0308 less10]$ n( f a s
e r de lice
8) After you fixed
l a b le what should you do?
V theaproblem,
i
V Oracle
a)o Re-start f er Clusterware on both nodes using the crsctl command as root on
i
ic both s
n as shown below.
anodes
b r - t r
Fa n[oracle@vx0306
on less10]$ cat sol_10_02_08.sh
# sol_10_02_08.sh
HOST=`hostname|cut -c 1-10`
9) Using the crs_stat command, check the status of your CRS stack and nodeapps. Be
patient, it takes a few minutes for the components to restart.
[oracle@vx0306 less10]$ cat sol_10_02_09.sh
# sol_10_02_09.sh
/u01/crs11g/bin/crs_stat
[oracle@vx0306 less10]$
c m
o deฺ
NAME=ora.RDB.RDB2.inst i ฺ
d Gui
TYPE=application r e
ic ent
TARGET=ONLINE
@ s
STATE=ONLINE on vx0309
r d e Stud
NAME=ora.RDB.db i l a ve this
TYPE=application
i o _v use
TARGET=ONLINE
a b ric e to
(f ens
STATE=ONLINE on vx0309
e
e r le lic
d
l a V ab
NAME=ora.vx0308.ASM1.asm
i
V sfer
TYPE=application
i o an on vx0308
TARGET=ONLINE
icSTATE=ONLINE
b r - t r
Fa non NAME=ora.vx0308.LISTENER_VX0308.lsnr
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0308
NAME=ora.vx0308.gsd
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0308
NAME=ora.vx0308.ons
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0308
NAME=ora.vx0308.vip
TYPE=application
TARGET=ONLINE
NAME=ora.vx0309.ASM2.asm
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0309
NAME=ora.vx0309.LISTENER_VX0309.lsnr
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0309
NAME=ora.vx0309.gsd
TYPE=application
TARGET=ONLINE
STATE=ONLINE on vx0309 s a
)h a
NAME=ora.vx0309.ons
m ฺbr
TYPE=application
i ฺ c o deฺ
TARGET=ONLINE
r e d Gui
STATE=ONLINE on vx0309
@ sic dent
NAME=ora.vx0309.vip
e r de Stu
TYPE=application
v i lav e this
TARGET=ONLINE
STATE=ONLINE on vx0309 cio
_ us
b i
r e to
a
(f ens
[oracle@vx0308 less10]$
d e
r lwill l ibec the last things that are started and may take several
10) The database V abe
instances e
minutes i l a
V bothsso.
to do erWhat could be the cause of that delay? Because it may take too long
i o f
b r ic -tran
to restart instances, you can manually start them if needed.
Fa na)onTake a look at the database alert log on your first node and see what is happening.
The delay, of course is caused by instance recovery. Remember, that the problem
we introduced at the beginning of the practice caused the Oracle Clusterware
stack to crash and reboot the node and this of course crashed the database also.
[oracle@vx0308 less10]$ cat sol_10_02_10.sh
#!/bin/bash
#
# Must be executed on NODE1 !!!!!!!!!!
#
I1NAME=$DBNAME"1"
cat /u01/app/diag/rdbms/rdb*/RDB*/trace/alert*
sleep 100
[oracle@vx0308 less10]$
IMPORTANT NOTE: Before you start the following labs, make sure VNC is started on
both nodes as user oracle on port 5802.
You execute your commands under VNC terminal sessions alternatively on the first and
second node.
Before you start the following labs, execute the sol_11_00_00.sh script located in
your /home/oracle/solutions/less11 directory. You should execute this script under
the VNC terminal session started on the first node as user oracle.
s a
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
)h a
m ฺ br
cd $ORACLE_HOME/bin
i ฺ c o deฺ
r e d Gui
./dbca
[oracle@vx0306 less11]$ @ sic dent
[oracle@vx0306 less11]$ ./sol_11_01_01.sh
e r de Stu
a) On the Welcome screen select Oracle v i laReal e t his Clusters Database and
v Application
click Next.
ic i o_ o us
f
b) On the Operations screen,
( abrselect s e t Management, and click Next.
Instance
c) On the Instancer d eManagement
l i c enscreen, select Delete an Instance, and click Next.
V e ble
a a databases screen, select your Database Name. Then enter
l Listfeofrcluster
d) Onithe
V
i c o
i ran
sys in the sUsername field and oracle1 in the password field. Click Next.
r -t the list of cluster database instances screen, select the instance from second
Fab ne)onnode.
On
It should be seen as an active instance. Click Next.
f) When you are finished, on the same screen, click Finish.
g) In the Database Configuration Assistant dialog box that appears, confirm that the
operation is to delete the second instance on the second node and click OK.
h) In the second Database Configuration Assistant dialog box that appears, click OK
to confirm that you want to proceed.
i) Wait until the progress bar goes to 100%. On the Database Configuration
Assistant dialog box that appears, click No to confirm that you do not want to
perform any other operation.
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
4) Last thing you can do is to remove the associated ASM entry from the /etc/oratab file
on the second node.
[oracle@vx0306 less11]$ cat sol_11_02_04.sh
#!/bin/bash
#
# sol_11_02_04.sh
#
# Must be executed on NODE1 !!!!!!!!!!
s a
#
)h a
m ฺbr
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'` i ฺ c o deฺ
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`red u i
s ic ent G
@
DBNAME=`ps -ef | grep dbw0_RDB | grep e-v grepu|d grep -v
t | sed
d's/1/''/'
e r S
lav e this
callout1 | awk '{ print $8 }' | sed
's/ora_dbw0_/''/'`
v i
ic i o_ o us
abr nse t
I1NAME=$DBNAME"1"
( f
rde le lice
I2NAME=$DBNAME"2"
e
l a V ab /etc/oratab | grep -v +ASM2 >
i
V sfer
ssh $z sudo "cat
i o
ic -tran
/home/oracle/solutions/less11/neworatab"
b r
Fa nssh on $z sudo cp /etc/oratab /etc/jfvbakoratab
ssh $z sudo rm /etc/oratab
[oracle@vx0306 less11]$
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/asm_1
cd $ORACLE_HOME/bin
./netca
[oracle@vx0306 less11]$
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export DISPLAY=$y:2.0
$ORACLE_HOME/oui/bin/runInstaller -updateNodeList
ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES=$1" -local
[oracle@vx0306 less11]$
c m
o deฺ
Checking swap space: … Passed
i ฺ
d Gui
Checking Monitor: … Passed
r e
[oracle@vx0306 less11]$
@ sic dent
de to remove
3) On the second node, use OUI from the databaserhome
e S tu the database
software.
v i lav e this
[oracle@vx0306 less11]$ cat
ic i o_ sol_11_04_03.sh
o us
#!/bin/bash r
ab nse t
# ( f
# sol_11_04_03.sh
e r de lice
#
l a V able
V
# Musti be
f e r
executed on NODE1 !!!!!!!!!!
o
ic#i -tran s
b r
Fa ny=`cat
on /home/oracle/nodeinfo | sed -n '1,1p'`
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
scp /home/oracle/solutions/less11/removedb2.sh
$z:/home/oracle/solutions/less11/removedb2.sh
ssh $z /home/oracle/solutions/less11/removedb2.sh
[oracle@vx0306 less11]$
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
s a
export DISPLAY=$y:2.0
)h a
$ORACLE_HOME/oui/bin/runInstaller
m ฺbr
[oracle@vx0306 less11]$
i ฺ c o deฺ
r e d Gui
@ sic dent
[oracle@vx0306 less11]$ ./sol_11_04_03.sh
e r de Stu
…
v i lav e this
i _ Products.
oDeinstall us
a) On the Welcome screen, click
r ic t o
( f
b) On the Inventory window, ab select
n seyour database home name (should be
e e
c Remove.
rd leandliclick
OraDb11g_home1),
e
V ab window, where you can see the list of products to be
l
c) Onithe a
V sclick
Confirmation
er Yes.
i o removed, f
b r icd) On-trtheanWarning window that appears, click Yes to remove the ORACLE_HOME
Fa nonat the end.
e) Wait for the Deinstall progress bar to complete (100%).
f) On the Inventory window, you should now see that your database home has been
removed. On the Inventory window, click Close.
g) On the Welcome screen, click Cancel.
h) On the Exit dialog box, click Yes to exit OUI.
4) On the first node, make sure you export your ORACLE_HOME environment variable
set to /u01/app/oracle/product/11.1.0/db_1, and change your current directory to
$ORACLE_HOME/oui/bin. Then execute the following command:
./runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME
"CLUSTER_NODES=<first node name>"
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
s a
)h a
ฺbr
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
c m
o deฺ
export DISPLAY=$y:2.0
i ฺ
d Gui
r e
$ORACLE_HOME/oui/bin/runInstaller -updateNodeList
@ sic dent
de Stu
ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES=$y"
[oracle@vx0306 less11]$
e r
v i lav e this
i o_ o us
[oracle@vx0306 less11]$ic./sol_11_04_04.sh
(
Starting Oracle Universalf abr nsInstaller…
et
e lice
rdspace:
Checking swap
V e b l e… … Passed
Checking a
il ferapointer isPassed
Monitor:
The V s
i c i o inventory
inventory
a n
located at /etc/oraInst.loc
b r The
- t r is located at /u01/app/oraInventory
Fa n[oracle@vx0306
on
‘UpdateNodeList’ was
less11]$
successful.
export DISPLAY=$y:2.0
$ORACLE_HOME/oui/bin/runInstaller -updateNodeList
ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES=$1" -local
[oracle@vx0306 less11]$
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
scp /home/oracle/solutions/less11/removeasm2.sh
$z:/home/oracle/solutions/less11/removeasm2.sh
ssh $z /home/oracle/solutions/less11/removeasm2.sh
[oracle@vx0306 less11]$
export DISPLAY=$y:2.0
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/asm_1
$ORACLE_HOME/oui/bin/runInstaller
s a
[oracle@vx0306 less11]$
)h a
m ฺbr
i ฺ c o deฺ
[oracle@vx0306 less11]$ ./sol_11_05_03.sh
r e d Gui
…
@ sic dent
a) On the Welcome screen, click Deinstall Products.
e r de Stu
b) On the Inventory window, select your i v home
laASM t s (should be
hiname
v
o_Remove. e
OraASM11g_home1), and click
r ic i
t o us
c) On the Confirmationfa
( b where
window, se you can see the list of products to be
e
removed, clickdYes. e n
e r le lic
d) On the
l a V awindow
Warning b that appears, click Yes to remove the ORACLE_HOME
i r
i c i o atVtheaend.
n sfe
a b r e) Wait - tr for the Deinstall progress bar to complete (100%).
F n
nf)o In the Inventory window, you should now see that your ASM home has been
removed. In the Inventory window, click Close.
g) On the Welcome screen, click Cancel.
h) In the Exit dialog box, click Yes to exit OUI.
4) On the first node, make sure you export your ORACLE_HOME environment variable
set to /u01/app/oracle/product/11.1.0/asm_1, and change your current directory to
$ORACLE_HOME/oui/bin. Then execute the following command:
./runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME
"CLUSTER_NODES=<first node name>"
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/asm_1
s a
export DISPLAY=$y:2.0
)h a
$ORACLE_HOME/oui/bin/runInstaller -updateNodeList
m ฺbr
ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES=$y"
i ฺ c o deฺ
[oracle@vx0306 less11]$
r e d Gui
@ sic dent
e r
[oracle@vx0306 less11]$ ./sol_11_05_04.shde Stu
i lav e this
Starting Oracle Universal Installer…
v
Checking swap space: …ric io_ o us
Passed
Checking Monitor: f…ab Passede t
( s
enlocated at /etc/oraInst.loc
e licis
r d
The inventory pointer
e isbllocated
V
The inventory
a e successful.
at /u01/app/oraInventory
V il feraless11]$
‘UpdateNodeList’ was
r i c i rans
o
[oracle@vx0306
t
Fab non-
( f abr nremove_config
s et
d e
/u01/crs11g/bin/racgons
li c e $z
V er less11]$
[oracle@vx0306
l e
V ila ferab
r i c io rans
t
Fab nlocalport=6150
on-
[oracle@vx0306 less11]$ ./sol_11_06_01.sh
useocr=on
allowgroup=true
usesharedinstall=true
racgons: host vx0313 is deleted from ONS configuration.
[oracle@vx0306 less11]$
[oracle@vx0306 less11]$
r i c i ran1 s
o
vx0306
t 2
Fab nCRS-0210:
on-
vx0313
Could not find resource 'ora.vx0313.ons'.
CRS-0210: Could not find resource 'ora.vx0313.vip'.
CRS-0210: Could not find resource 'ora.vx0313.gsd'.
PRKO-2112 : Some or all node applications are not removed
successfully on node: vx0313
CRS-0210: Could not find resource 'ora.vx0313.vip'.CRS-0210:
Could not find resource 'ora.vx0313.ons'.CRS-0210: Could not
find resource 'ora.vx0313.gsd'.
CRS nodeapps are deleted successfully
clscfg: EXISTING configuration version 4 detected.
clscfg: version 4 is 11 Release 1.
Value SYSTEM.crs.versions.vx0313 marked for deletion is not
there. Ignoring.
Successfully deleted 15 values from OCR.
Key SYSTEM.css.interfaces.nodevx0313 marked for deletion is
not there. Ignoring.
Key SYSTEM.crs.versions.vx0313 marked for deletion is not
there. Ignoring.
Successfully deleted 13 keys from OCR.
export DISPLAY=$y:2.0
$ORACLE_HOME/oui/bin/runInstaller -updateNodeList
ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES=$1" CRS=TRUE -local
[oracle@vx0306 less11]$
b r ic#i -tran
Fa ny=`cat
on /home/oracle/nodeinfo | sed -n '1,1p'`
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
scp /home/oracle/solutions/less11/removecrs2.sh
$z:/home/oracle/solutions/less11/removecrs2.sh
ssh $z /home/oracle/solutions/less11/removecrs2.sh
[oracle@vx0306 less11]$
export DISPLAY=$y:2.0
s a
export ORACLE_HOME=/u01/crs11g
)h a
$ORACLE_HOME/oui/bin/runInstaller
m ฺbr
[oracle@vx0306 less11]$
i ฺ c o deฺ
r e d Gui
@ sic dent
de Stu
[oracle@vx0306 less11]$ ./sol_11_07_04.sh
…
e r
v
a) On the Welcome screen, click Deinstalli lavProducts
e t h. is
i o _ us
b) In the Inventory window,
b ic toOracle Clusterware software home name
rselect your
a
f clicknRemove.
(OraCrs11g_home)(and s e
d e c e
li you should see the list of products to deinstall. Click
V er blwindow,
c) In the confirmation e
Yes.
V ila fera
i c io In the
d) a n s dialog box, make sure you click No to avoid CRS directory to be
Warning
r r
-t at the end of this installation. You do it manually afterward.
Fab nonremoved
e) Wait for the progress bar to finish.
f) In the Inventory window, after deinstallation was successful, you should no
longer see the Oracle Clusterware software home. Click Close.
g) On the Welcome screen, click Cancel to finish this deinstallation.
h) In the Exit window, click Yes to exit from OUI.
5) On the first node as user root, execute the following command:
/u01/crs11g/oui/bin/runInstaller -updateNodeList
ORACLE_HOME=/u01/crs11g "CLUSTER_NODES=<first node name>" CRS=TRUE
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
export ORACLE_HOME=/u01/crs11g
s a
export DISPLAY=$y:2.0
)h a
$ORACLE_HOME/oui/bin/runInstaller -updateNodeList
m ฺbr
ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES=$y" CRS=TRUE
i ฺ c o deฺ
[oracle@vx0306 less11]$
r e d Gui
@ sic dent
[oracle@vx0306 less11]$ ./sol_11_07_05.sh
e r de Stu
Starting Oracle Universal Installer…
v i lav e this
Checking swap space: …ric io_ o us
Checking Monitor: f…ab Passed
Passed
e t
(
e licis s
enlocated at /etc/oraInst.loc
r d
The inventory pointer
e isbllocated
V
The inventory
a e successful.
at /u01/app/oraInventory
V il feraless11]$
‘UpdateNodeList’ was
r i c i rans
o
[oracle@vx0306
I1NAME=$DBNAME"1"
/u01/crs11g/bin/crs_stat -t
/u01/crs11g/bin/olsnodes -n
[oracle@vx0306 less11]$
Fa non
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'`
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
WARNING:
Make sure IP address "10.216.96.120" is up and is a valid IP
address on node "vx0313".
Node connectivity check failed for subnet "10.216.96.0".
Node connectivity check passed for subnet "10.196.28.0" with
node(s) vx0306,vx0313.
s a
Interfaces found on subnet "10.216.4.0" that are likely
)h a
ฺbr
candidates for VIP:
vx0306 eth0:10.216.4.17 eth0:10.216.4.68
c m
o deฺ
vx0313 eth0:10.216.4.24
i ฺ
d Gui
r e
Interfaces found on subnet "10.196.28.0" that
candidates for a private interconnect: @
sic aree n t
likely
r d e Stud
ve this
vx0306 eth2:10.196.30.27
vx0313 eth2:10.196.30.34
i l a
i o _v use
Node connectivity check
a b ric e to
failed.
e (f ens
e d
e l ic
r requirements
a V check
Checking system
b l for 'crs'...
Total lmemory
V idisk space
f e ra check passed.
passed.
o
Free
i space
icSwap s
an check passed.
b r - t r
Fa nKernel
on architecture
System check passed.
version check passed.
Package existence check passed for "make-3.80".
Package existence check passed for "binutils-2.15.92.0.2".
Package existence check passed for "gcc-3.4.5".
Package existence check passed for "libaio-0.3.105".
Package existence check passed for "libaio-devel-0.3.105".
Package existence check passed for "libstdc++-3.4.5".
Package existence check passed for "elfutils-libelf-devel-
0.97".
Package existence check passed for "sysstat-5.0.5".
Package existence check passed for "libgcc-3.4.5".
Package existence check passed for "libstdc++-devel-3.4.5".
Package existence check passed for "unixODBC-2.2.11".
Package existence check passed for "unixODBC-devel-2.2.11".
Package existence check passed for "glibc-2.3.4-2.19".
Group existence check passed for "dba".
Group existence check passed for "oinstall".
User existence check passed for "nobody".
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
V eto add
clscfg: version
b
is 11 1.
le1 new nodes to the configuration
l
Attempting
i a
V ports: a
erCSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
Using
i o n s f
b r ic<hostname>
node
t a
<nodenumber>:
r <nodename> <private interconnect name>
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
abr nse t
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
( f
node <nodenumber>: <nodename> <private interconnect name>
<hostname>
e rde le lice
l a V ab
node 1: vx0306 vx0306-priv vx0306
i
V sfer
node 2: vx0313 vx0313-priv vx0313
i o
clscfg: Arguments check out successfully.
ic -tran
b r
Fa nNO onKEYSisWERE
-force
WRITTEN. Supply -force parameter to override.
destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been
initialized
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
Cluster Synchronization Services is active on these nodes.
vx0306
vx0313
Cluster Synchronization Services is active on all the nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
[oracle@vx0306 less11]$
h) When both scripts have been executed in the correct order, go back to the Execute
Configuration scripts screen and click OK.
s a
y=`cat /home/oracle/nodeinfo | sed -n '1,1p'`
)h a
ฺbr
z=`cat /home/oracle/nodeinfo | sed -n '2,2p'`
c m
o-v deฺ
DBNAME=`ps -ef | grep dbw0_RDB | grep -v grep | grep
callout1 | awk '{ print $8 }' | sed 's/1/''/' e i
| dsed
ฺ u i
r G
's/ora_dbw0_/''/'`
@ sic dent
I1NAME=$DBNAME"1"
e r de Stu
v i lav e this
I2NAME=$DBNAME"2"
ic i o_ o us
( f abr n-t
/u01/crs11g/bin/crs_stat s et
[oracle@vx0306 eless11]$e
e rd le lic
l a V ab
i
V sfer less11]$ ./sol_11_09_02.sh
i o
[oracle@vx0306
icName-tran
b r Type Target State Host
Fa non ------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE vx0306
ora.RDB.db application ONLINE ONLINE vx0306
ora....SM1.asm application ONLINE ONLINE vx0306
ora....06.lsnr application ONLINE ONLINE vx0306
ora.vx0306.gsd application ONLINE ONLINE vx0306
ora.vx0306.ons application ONLINE ONLINE vx0306
ora.vx0306.vip application ONLINE ONLINE vx0306
ora.vx0313.gsd application ONLINE ONLINE vx0313
ora.vx0313.ons application ONLINE OFFLINE
ora.vx0313.vip application ONLINE ONLINE vx0313
[oracle@vx0306 less11]$
c m
o deฺ
I2NAME=$DBNAME"2"
i ฺ
d Gui
r e
sic dent
ssh $z sudo /u01/app/oracle/product/11.1.0/asm_1/root.sh
@
[oracle@vx0306 less11]$
e r de Stu
v i l av this
i o _ use
[oracle@vx0306 less11]$ ./sol_11_11_01f.sh
Running Oracle 11g root.sh
a b ric escript...
to
e (f ensvariables are set as:
The followingdenvironment
e ic
r leoracle
l
l a V ab /u01/app/oracle/product/11.1.0/asm_1
ORACLE_OWNER=
i
V sfer
ORACLE_HOME=
i o an full pathname of the local bin directory:
icEnter-trthe
b r
Fa n[/usr/local/bin]:
on
The file "dbhome" already exists in /usr/local/bin. Overwrite
it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin. Overwrite
it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin.
Overwrite it? (y/n)
[n]:
g) When the script has been executed, go back to the Execute Configuration scripts
window and click OK.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
export DISPLAY=$y:2.0
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/asm_1
cd $ORACLE_HOME/bin
./netca
o v se
configuration complete message._Click Next.
j) On the Welcome screen, clickr i
ic Finish.to u
b
(fa enslistener e
2) Check that the Oracle
r d e Clusterware
l i c resource is created on the second node.
[oracle@vx0306V e less11]$
b le cat sol_11_12_02.sh
i l
V sfer
#!/bin/bash a a
#io
b r - t r an
ic# sol_11_12_02.sh
Fa n#on
# Must be executed on NODE1 !!!!!!!!!!
#
I1NAME=$DBNAME"1"
I2NAME=$DBNAME"2"
/u01/crs11g/bin/crs_stat -t
[oracle@vx0306 less11]$
c m
o deฺ
I2NAME=$DBNAME"2"
i ฺ
d Gui
r e
sic dent
ssh $z sudo /u01/app/oracle/product/11.1.0/db_1/root.sh
@
[oracle@vx0306 less11]$
e r de Stu
v i l av this
i o _ use
[oracle@vx0306 less11]$ ./sol_11_13_01f.sh
Running Oracle 11g root.sh
a b ric escript...
to
e (f ensvariables are set as:
The followingdenvironment
e ic
r leoracle
l
l a V ab /u01/app/oracle/product/11.1.0/db_1
ORACLE_OWNER=
i
V sfer
ORACLE_HOME=
i o an full pathname of the local bin directory:
icEnter-trthe
b r
Fa n[/usr/local/bin]:
on
The file "dbhome" already exists in /usr/local/bin. Overwrite
it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin. Overwrite
it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin.
Overwrite it? (y/n)
[n]:
g) When the script has been executed, go back to the Execute Configuration scripts
window and click OK.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
( f abr nse t
rde le lice
cd $ORACLE_HOME/bin
./dbca V
e
V ila ferab
r i c io rans less11]$
[oracle@vx0306
t
Fab non-
[oracle@vx0306 less11]$ ./sol_11_14_01.sh
…
a) On the Welcome screen, select Oracle Real Application Clusters database and
click Next.
b) On the Operations screen, select Configure Automatic Storage Management and
click Next.
c) On the Nodes Selection screen, select both nodes, and click Next.
d) In the Database Configuration Assistant dialog box, click Yes to extend your
ASM cluster to the second node.
e) In the ASM Credentials dialog box, enter oracle1 and click OK.
f) On the ASM Disk Groups screen, click Finish.
g) In the Database Configuration Assistant dialog box, click No to exit from DBCA.
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
[oracle@vx0308 opt]$
s a
[oracle@vx0308 opt]$ ./ sol_opt_01a.sh
)h a
…
m ฺbr
b) On the Select a Product to Install screen, select Oracle Database ฺ11g
i c oand click
d e ฺ
Next. red t Gu i
i c
s Edition nand click Next.
c) On the Select Installation Type screen, select Enterprise
@ d e
e r de Stuin the Oracle Base
d) On the Install Location screen, enter /u01/app/oracle
v i lav e this
field and /u01/app/oracle/product/11.1.0/dnfs in the Path field.
o _ s
Then click Next.
b r ici to u
e (fa Cluster
e) On the Specify Hardware
e n seInstallation Mode screen, select Cluster
e rd click
Installation, and
e ic All button. Then click Next.
Select
l
f) Onithel a l
V ab Prerequisite Checks screen, click Next.
Product-Specific
i o V the Select
s f erConfiguration Option screen, select Install Software Only and click
b r g) On
ic Next.
- t r an
Fa non
h) On the Privileged Operating System Groups screen, click Next.
i) On the Summary screen, click Install.
j) Follow the instructions on the Execute Configuration Scripts screen:
[oracle@vx0308 opt]$ cat sol_opt_01j.sh
#!/bin/ksh
#
# sol_opt_01j.sh
#
# Must be executed on NODE1 !!!!!!!!!!
#
sudo /u01/app/oracle/product/11.1.0/dnfs/root.sh
[oracle@vx0308 opt]$
cd /u01/app/oracle/product/11.1.0/dnfs/lib
mv libodm11.so libodm11.so_stub
ln -s libnfsodm11.so libodm11.so
s a
) h a
ssh $z "mv /u01/app/oracle/product/11.1.0/dnfs/lib/libodm11.so
/u01/app/oracle/product/11.1.0/dnfs/lib/libodm11.so_stub" ฺ b r
ssh $z "ln -s c o m e ฺ
i ฺ i d
/u01/app/oracle/product/11.1.0/dnfs/lib/libnfsodm11.so
i c red t Gu
/u01/app/oracle/product/11.1.0/dnfs/lib/libodm11.so"
@ s den
[oracle@vx0308 opt]$ ./sol_opt_03.sh
e r de Stu
[oracle@vx0308 opt]$
v i lav e this
4) You can now use DBCA from your i _ Oracle
onew us Home on the first node to create a
r ic
b /RACDB.
new RAC database storedaon t o
e ( f
e n se
a) Start DBCAL:
e rd le lic
V aopt]$
i l a
[oracle@vx0308
V f e r b cat sol_opt_04.sh
r i c io rans
/u01/app/oracle/product/11.1.0/dnfs/bin/dbca
t
Fab n[oracle@vx0308
on- opt]$
b) On the Welcome screen, select Oracle Real Application Clusters database and
click Next.
c) On the Operations screen, select Create a Database and click Next.
d) On the Node Selection screen, click Select All and click Next.
e) On the Database Templates screen, select General Purpose or Transaction
Processing, and then click Next.
f) On the Database Identification screen, enter DNFS in the Global Database Name
field and click Next.
g) On the Management Options screen, uncheck Configure Enterprise Manager and
click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Miscellaneous Topics
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Contents
• Additions to Lesson 8
• Additions to Lesson 10
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 2
Load Balancing Advisory Workflow in RAC
ODP.NET/ JDBC
Connection Pool Runtime
OCI pools 6 Manager Connection
Deal work Instances for
Load
ONS 7 per instance aging 7 Balancing
i ฺ c o deฺ
Local
ONS
RACG
MMON r e dMMNL Gui PMON
2sic n t
IMON
4 Master
@ e 2a
3 r d e Stud1
EMON
AQ
Advisory
i l a ve thisAWR service metrics
i o _v use
messages
a b ric e to
Oracle RAC Database
e (f ens
e d
e l ic © 2008, Oracle. All rights reserved.
r lCopyright
l a V ab
i
V Workflowf er in RAC
i o
Load Balancing
ic -tran s
b r
Fa non(Manageability MoNitor Light) calculates the service metrics for service goal and
1. MMNL
resource consumption every five seconds. MMNL derives the service goodness from these
data.
2. MMON computes and posts the LBA FAN event to a system queue, and MMNL forwards
the service goodness and delta to PMON.
3. IMON (Instance Monitor) and EMON retrieve the event from the queue, and PMON
forwards the goodness and delta values to the listeners.
4. IMON posts the LBA FAN event to the local ONS daemon, and EMON posts it to AQ
subscribers.
5. The server ONS sends the event to the mid-tier ONS (if used).
6. The mid-tier receives the event and forwards them to subscribers. Each connection pool
subscribes to receive events for its own services. On receipt of each event, the Connection
Pool Manager refreshes the ratio of work to forward to each RAC instance connection part
of the pool. It also ranks the instances to use when aging out connections.
7. Work requests are routed to RAC instances according to the ratios calculated previously.
When there are insufficient idle connections to satisfy the ratios, new connections are added
to the next best instances determined by the listeners.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 3
Closed Workload
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 4
Closed Workload: Steady State
Connection Cache
33%
?
s a
33%
33%
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
RAC RAC erd
e Stu RAC
i l a v t h i s
BATCH is BATCH is v Inst2 se
Inst1
i o _ u
BATCH is Inst3
ric e to
fine. fine. fine.
a b
(f ens
d e ic © 2008, Oracle. All rights reserved.
r lCopyright
l
e
V ab e
i l a
V Steady er State
i o
Closed Workload: s f
b r ic -tran
Fa non this configuration at the RAC level by setting the connection balancing
You implement
algorithm to LONG to make sure that the listeners distribute the connection requests evenly
across all RAC instances. By setting the Load Balancing Advisory to either service time or
throughput, you ensure that your connection pool distributes the work requests inside the pool to
the best instances according to your Load Balancing Advisory goal.
At steady state, all work requests are spread evenly across your RAC instances as shown in the
slide. This is because each RAC instance supports the same amount of work using the same
amount of resources on each node.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 5
Closed Workload: More Work
Connection Cache
33%
?
s a
33%
33%
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
RAC RAC erd
e Stu RAC
i l a v t h i s
BATCH is BATCH is v e BATCH is
Inst1
very busy. fine. io
_ Inst2 u s Inst3
a b ric e to busy.
e (f ens
e d
e l ic © 2008, Oracle. All rights reserved.
r lCopyright
l a V ab
i
V More f erWork
i
Closed Workload:o
ic -tran s
In a b rslide,
non
this more work is added to your RAC system by adding more work requests to your
F
BATCH service as well as by adding new services requests. This ends up overloading the first
RAC instance by consuming too many resources on the corresponding node, thereby decreasing
its capacity to serve BATCH in an acceptable way. As a result, only the second node, shown in
the slide, is still capable to serve BATCH requests normally.
In consequence, Load Balancing Advisory FAN events are sent to your connection pool asking
the pool to redistribute most of the BATCH work requests to the second instance, which
currently serves BATCH best.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 6
Closed Workload: Reaction
Connection Cache
10%
?
s a
60%
30%
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
RAC RAC erd
e Stu RAC
i l a v t h i s
BATCH is BATCH is v e BATCH is
Inst1
very busy. fine. io
_ Inst2 u s Inst3
a b ric e to busy.
e (f ens
e d
r lCopyright
e l ic © 2008, Oracle. All rights reserved.
l a V ab
i
V Reaction f er
i o
Closed Workload:
an s
In a b ric your
- t r
non
reaction, connection pool redistributes 60 percent of the BATCH work requests to the
F
pool of connections already established on the second instance. Here, only the work requests are
redistributed. The connections are not redistributed because you define them to make sure that
they cannot be saturated by the BATCH work requests.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 7
Open Workload
Connection Cache
33%
?
s a
33%
33%
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
RAC RAC erd
e Stu RAC
i l a v t h i s
CRM is CRM is v Inst2 se CRM is
Inst1
fine. i o _ u Inst3
ric e to
fine. fine.
a b
(f ens
d e ic © 2008, Oracle. All rights reserved.
r lCopyright
l
e
V ab e
i l
V sfera
Open Workloadi o
ic -tran
In a b rcase,
non
this you do not know in advance how many work requests will have to be handled by
Fyour connection pool. So, you cannot predefine them accordingly. This is typically the case with
shopping cart type of applications.
In consequence, you predefine a reasonable amount of connections in your pool, based on your
RAC capacity to handle work.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 8
Open Workload: Steady State
Connection Cache
33%
?
s a
33%
33%
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
RAC RAC erd
e Stu RAC
i l a v t h i s
CRM is CRM is v Inst2 se CRM is
Inst1
fine. i o _ u Inst3
ric e to
fine. fine.
a b
(f ens
d e ic © 2008, Oracle. All rights reserved.
r lCopyright
l
e
V ab e
i l a
V Steady erState
i o
Open Workload: n s f
b ric -this
Toaimplement t r aarchitecture
non
on your RAC system, you want it to be able not only to
Fredistribute the work requests in your connection pool, but also for your connections to be
redistributed to the least loaded nodes because you cannot determine in advance how many
connections are needed to avoid their saturation. You do so by setting the connection balancing
algorithm to SHORT as well as setting your Load Balancing Advisory algorithm to either service
time or throughput.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 9
Open Workload: More Work
Non-CRM Non-CRM
work requests work requests
Connection Cache
33%
?
s a
33%
33%
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
RAC RAC erd
e Stu RAC
i l a v t h i s
CRM is CRM is v Inst2 se CRM is
Inst1
very busy. i o _ u Inst3
ric e to
fine. busy.
a b
(f ens
d e ic © 2008, Oracle. All rights reserved.
r lCopyright
l
e
V ab e
i l
V Morea r
eWork
Open Workload:i o s f
b ic -tran
rslide,
In a
non
this more work is added to your RAC system by adding more work requests to your
FCRM service as well as by adding new services requests. This ends up overloading the first RAC
instance by consuming too many resources on the corresponding node, thereby decreasing its
capacity to serve CRM in an acceptable way. As a result, only the second node, shown in the
slide, is still capable to serve CRM requests normally.
In consequence, Load Balancing Advisory FAN events are sent to your connection pool asking
the pool to redistribute most of the CRM work requests to the second instance, which currently
serves CRM best.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 10
Open Workload: Reaction
Connection Cache
10%
?
s a
60%
30%
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
Gravitation si
c n t
@
e Stud e
RAC RAC erd RAC
i l a v t h i s
CRM is CRM is v Inst2 se CRM is
Inst1
very busy. i o _ u Inst3
ric e to
fine. busy.
a b
(f ens
d e ic © 2008, Oracle. All rights reserved.
r lCopyright
l
e
V ab e
i l a
V Reaction er
i o
Open Workload: s f
In a b ric to those
- t r anFAN events, your connection pool has to redistribute the work requests for
non
reaction
FCRM to the second instance. In this case, because you did not predefine a sufficient number of
connections to handle CRM work request, your connection pool must create additional
connections to handle the CRM service. Because your connection load balancing algorithm also
uses the Load Balancing Advisory information, listeners are going to send those new connection
requests to the second instance as illustrated in the slide. This is called connections gravitation.
In this example, not only most of the CRM work requests, but also connection requests, are
directed to the second instance.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 11
OCR-Related Tools Debugging
• OCR tools:
– ocrdump
– ocrconfig
– ocrcheck
– srvctl
• Logs generated in a
$ORA_CRS_HOME/log/<hostname>/client/ as
)hฺbr
• Debugging control through m
$ORA_CRS_HOME/srvm/admin/ocrlog.ini diฺco ide
ฺ
i c re t Gu
mesg_logging_level = 5
@ s den
comploglvl="OCRAPI:5 ; OCRSRV:5; OCRCAC:5; OCRMAS:5;
comptrclvl="OCRAPI:5 ; OCRSRV:5; OCRCAC:5;ve
rde OCRCONF:5;
S
OCRMAS:5;s OCRCONF:5;
tu OCRRAW:5"
i l a t h i OCRRAW:5"
i o _v use
a b ric e to
e (f ens
e d
e l ic © 2008, Oracle. All rights reserved.
r lCopyright
l a V ab
i er
VTools sDebugging
f
OCR-Related i o
c tran
b rialready
Asayou
F n o n- saw, you can use various tools to manipulate Oracle Cluster Registry (OCR):
ocrdump, ocrconfig, ocrcheck, and srvctl.
These utilities create log files in $ORA_CRS_HOME/log/<hostname>/client/. To change the
amount of logging, edit the $ORA_CRS_HOME/srvm/admin/ocrlog.ini file. The default logging
level is 0, which basically means minimum logging. When mesg_logging_level is set to 0,
which is its default value, only error conditions are logged. You can change this setting to 3 or 5
for detailed logging information.
If that is not enough, you can also change the logging and trace level for each of the components
used to manipulate OCR. To do that, edit the entries containing comploglvl and comptrclvl in
ocrlog.ini.
The slide shows you the three lines you could add to ocrlog.ini to turn on additional
debugging information. A typical example where you might have to change the ocrlog.ini file
is in a situation where you get errors while using either ocrdump or ocrconfig tools.
Note: You should never execute the commands shown on this slide on your production
environment unless explicitly asked by Oracle Support. For additional information about
Oracle Clusterware diagnosis, you can also refer to the Note 353335.1 from Metalink as well as
the Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment
guide. reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Unauthorized
Oracle Database 11g: RAC Administration B - 12
Enable Resource Debugging
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 13
Enable Oracle Clusterware Modules Debugging
crsctl
lsmodule debug
$ export SRVM_TRACE=TRUE
$ srvctl config database –d xwkE > /tmp/srvctl.trc
s a
$ cat /tmp/srvctl.trc
)h a
/u01/app/oracle/product/Crs/jdk/jre/bin/java -classpath
m ฺbr
/u01/app/oracle/product/Crs/jlib/netcfg.jar: …
i ฺ c o deฺ
srvctl.jar -DTRACING.ENABLED=true -DTRACING.LEVEL=2
r e d Gui
sic dent
oracle.ops.opsctl.OPSCTLDriver config database -d xwkE
[main] [9:47:27:454] [OPSCTLDriver.setInternalDebugLevel:165] @
de Stu
tracing is true at level 2 to file null
e r
v i lav e this
[main] [9:47:27:496] [OPSCTLDriver.<init>:95] Security manager
is set …
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er
V for Java-Based
f
i c i
Enable Tracing o a n s Tools
r t r
F b non-tools and utilities that are available in RAC are invoked by executing scripts of
AllaJava-based
the same name as the tool or utility. This includes the Cluster Verification Utility (cluvfy), the
Database Configuration Assistant (dbca), the Database Upgrade Assistant (dbua), the Net
Configuration Assistant (netca), the Virtual Internet Protocol Configuration Assistant (vipca),
Server Control (srvctl), and the Global Services Daemon (gsdctl). For example, to run the
Database Configuration Assistant, enter the command dbca.
By default, Oracle enables traces for dbca and dbua. The resulting log files are written to
$ORACLE_HOME/cfgtoollogs/dbca/ and $ORACLE_HOME/cfgtoollogs/dbua/, respectively.
For cluvfy, gsdctl, srvctl, and vipca, you can set the SRVM_TRACE environment variable to
TRUE to make the system generate traces. Traces are written to either log files or standard output.
For example, the system writes traces to log files in $ORA_CRS_HOME/cv/log/ for cluvfy.
However, as shown in the slide, it writes traces directly to the standard output for srvctl.
Note: Never execute these commands on a production system without explicit guidance from
Oracle Support.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 15
RAC Diagnostic Infrastructure: Overview
Node2
SGA
Trace buffer Pi
Pi
Trace buffer Pj
Pj
DIAG
s a
Online tools Node1 Node2 Node3
)h a
x$trace
x$trace_events SGA SGA SGA
m ฺbr
i ฺ c o deฺ
oradebug
r e d Gui
DIAGsic
alter tracing
alter system set DIAG DIAG
e n t
d @
e Stud
r
ve this Offline tools
i
v sel a Trace navigation
i o _ u Trace loader
r ic t o
( f ab nse
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er
V Infrastructure:
f
i c i
RAC Diagnostico a n s Overview
r t r
Fabslidenshows
The
on- you the diagnostic architecture of RAC instances in your cluster. This
architecture enables trace processing to incur very low overhead. The DIAG process was
introduced in Oracle9i Database to manage all diagnostics-related activities, acting as a broker
between online debugging tools and regular database processes. All debugging commands are
issued through the DIAG process on the same node to reach their intended targets. This DIAG
process then coordinates with DIAG processes on other nodes of the same cluster to complete
the commands. Activities such as setting trace levels, archiving the in-memory trace logs to
files, taking memory/crash dumps are done by the DIAG processes resulting in very little
overhead to the database server.
By default, minimal tracing is always on for foreground and background processes, and all trace
information is written into in-memory buffers within the System Global Area (SGA) instead of
being written into files directly. Via the online diagnostic tools, you can instruct DIAG to set
trace levels, archive the in-memory trace logs to files, and take memory dumps. This can be
done for one or all processes on all instances. Offline tools then transform the archived logs into
human-readable formats, load them into database for query, or display them with the GUI
interface of the Trace Navigation tool used by Oracle Support. All these trace files have .trw as
their file extension, so they can be distinguished from regular process trace files. Also, these
trace files are circular, similar to the memory buffers to limit the file size.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 16
DIAG Trace Control Interfaces
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 18
DIAG Trace Control Interface: Examples
s a
SQL> oradebug setmypid
)h5a
Statement processed.
m ฺbr
SQL> oradebug setinst all
i ฺ c o deฺ
Statement processed.
r e d Gui
SQL> oradebug -g def hanganalyze 3
@ sic dent
Hang Analysis in
e r de Stu
lav e this
/u01/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_diag_11347.trc
SQL>
v i
ic i o_ o us
( f abr nse t
e rde lCopyright
l i ce© 2008, Oracle. All rights reserved.
l a V ab e
i er
V sInterface:
f
DIAG Trace
i c i oControl
a n Examples
r
abslide shows r
-t you some possible examples of use as long as you can connect normally to your
The
F o n
database:n
1. The first example is used from a SQL*Plus session to turn on tracing for event 10425 at
level 10 for process ID 135.
2. You can then query X$TRACE_EVENTS to determine which events are traced (STATUS=1) at
which level. This view contains 1,000 event statuses. You can also query X$TRACE to
retrieve trace records directly from the SGA.
3. This statement is used to disable tracing for all events.
4. This is used to archive trace logs related to your process. Using this command, you can also
flush trace buffers of all other processes. Using some undocumented parameters, it is also
possible to continuously flush trace buffers to disk instead of having to manually flush
them.
5. This example shows you how to use the hang analyzer throughout your RAC cluster. After
you are connected to SQL*Plus as SYSDBA, you attach oradebug to your process. Then you
set the instance list to all instances in your cluster, and execute the hang analyzer at level 3.
This executes a hang analysis clusterwide. When executed, the command returns the name
of the trace file containing the result of this analysis.
Note: Never execute these commands on a production system without explicit guidance from
Oracle Support.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 19
Hang Analysis with 11gR1: Example
$ sqlplus /nolog
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Oracle Database 11g: RAC Administration B - 22
Appendix C
Practice Environment Scripts
s a
)h a
m ฺbr
i ฺ c o deฺ
r e d Gui
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2009, Oracle and/or its affiliatesฺ
Practice Environment Scripts
Included in the course files on the cluster nodes is a collection of scripts that can be used
to set up the complete cluster database environment according to the practice instructions.
In addition, the scripts can be used to catch up to any point in the practices if you
encounter any unforeseen difficulties. The scripts are located in
/home/oracle/PCPS. The directory is initially restricted to prevent inadvertent
execution of the scripts. To remove the access restrictions from the PCPS directory,
execute the /home/oracle/viewdir.sh script.
$ pwd
/home/oracle
$ ./viewdir.sh
$ cd PCPS
s a
The scripts can be used to install and configure one component at a time in parallel with
)h a
ฺbr
the practice instructions or the entire cluster database can be built with a single command
m
including RMAN and Services configuration and OCR and Voting Disk backups.
i ฺ c o deฺ
r e d Gui
Note: These scripts must be run on the first node from the PCPS
@ sicdirectory.
e n t The first node
can be determined by viewing the /home/oracle/nodeinfo
r d e Stud file.
i l a ve this
_v use
$ cat /home/oracle/nodeinfo
eg6608 Í First node i o
eg6610
a b ric e to
e (f ens
e r le lic
d
The following
l a V can
actions
a bbe performed:
i fe r
i c i o V networkn s
a b r command
1.
This
make
n - tra checks whether the RAC network setup is correct by pinging around and
F checking
no /etc/hosts. Note that pinging to the VIPs returns an error when the
clusterware is not installed or if the VIPs are down for any reason such as disabling the
nodeapps.
$ pwd
/home/oracle/PCPS
$ make network
./check_network
Checking public addresses.
Pinging eg6608: Received reply.
Pinging eg6610: Received reply.
Checking private addresses.
Pinging eg6608-priv: Received reply.
Pinging eg6610-priv: Received reply.
Checking VIP addresses.
Pinging eg6608-vip:
2. make raw
This checks the raw-devices setup by reading from or writing to them. The purpose of
this check is to verify the setup of the shared disks.
Note: Do not perform the “write” test after the clusterware is installed.
$ make raw
./check_raw
Type of test? (read/write): write
WARNING: This will overwrite your raw slices!!
Continue? (yes/no): yes
Writing to /dev/sdb1: OK.
Writing to /dev/sdb2: OK.
Writing to /dev/sdb5: OK.
Writing to /dev/sdb6: OK. s a
Writing to /dev/sdb7: OK. )h a
Writing to /dev/sdc: OK.
m ฺbr
Writing to /dev/sdd: OK.
i ฺ c o deฺ
Writing to /dev/sde: OK.
r e d Gui
Writing to /dev/sdf: OK.
@ sic dent
3. make ssh e r de Stu
This configures user equivalency between your
v i his
lavRACenodes.
t
ic i o_ o us
$ make ssh
( f abr nse t
de equivalency.
./configure_ssh
Setting up SSH ruser
e l i ce
l a
oracle@eg6610's
a le oracle@eg6610's password:
V password:
b
Checking i
V SSHsuser
f er equivalency.
i o
ic -tran
eg6608
b r
Fa non
eg6610
4. make crs
This silently installs the clusterware after prompting you for the cluster name and
database name.
$ make crs
./install_crs
Enter the cluster name: clustorl01
Enter the database name: RDBA
...
$ make asmhome
./install_asmhome
Starting Oracle Universal Installer...
...
6. make asm
This silently installs the Oracle software for the ASM home, configures ASM instances,
and creates the +DATA and +FRA disk groups.
$ make asm
./create_asm
creating ASM instances and ASM diskgroups.
Look at the log file
s a
"/u01/app/oracle/cfgtoollogs/dbca/silent.log" for further
)h a
details.
m ฺbr
HA Resource Target State
i ฺ c o deฺ
----------- ------ -----
r e d Gui
sic dent
ora.eg6608.ASM1.asm ONLINE ONLINE on eg6608
ora.eg6610.ASM2.asm ONLINE
@
ONLINE on eg6610
de Stu
e r
v i lav e this
7. make dbhome
ic i o_ o us
$ make dbhome ( f abr nse t
./install_dbhome r d e lice
Starting Oracle e le Installer...
V Universal
b
i l a a
er must be greater than 80 MB. Actual 6571 MB
V Tempsfspace:
i o
ic -tran
Checking
b r
Passed
Fa Checking
non swap space: must be greater than 150 MB. Actual 4095
MB Passed
Preparing to launch Oracle Universal Installer from
/tmp/OraInstall2008-08-14_01-05-23PM. Please wait ...Oracle
Universal Installer, Version 11.1.0.6.0 Production
Copyright (C) 1999, 2007, Oracle. All rights reserved.
...
8. make db
This silently creates the RAC database and installs the sample schemas. If you did not
install the clusterware by using make crs, you will be prompted for the database name
here.
$ make db s a
./create_db )h a
creating the RDBA database.
m ฺbr
Copying database files
i ฺ c o deฺ
...
r e d Gui
Creating and starting Oracle instance
... @ sic dent
Creating cluster database views
e r de Stu
...
v i lav e this
Completing Database Creation
... ic i o_ o us
f abr nse t
Look at the log file "Look at the log file
(
rde le lice
"/u01/app/oracle/cfgtoollogs/dbca/RDBA/RDBA.log" for further
details. e
V ab
... i l
V sfera
i i o
c tran
b r
HA Resource
-
Target State
Fa -----------
non
ora.RDBA.RDBA1.inst
------
ONLINE
-----
ONLINE on eg6608
ora.RDBA.RDBA2.inst ONLINE ONLINE on eg6610
ora.RDBA.db ONLINE ONLINE on eg6610
9. make rman
This configures the cluster database for archivelog mode and updates the necessary
RMAN persistent configuration parameters.
$ make rman
./configure_rman
Stopping the RDBA database instances.
ORACLE instance started.
Database mounted.
...
Database altered.
System altered.
e r de Stu
10. make service
v i lav e this
ic i o_ oactivates
This creates a cluster service called SERV1, u s the service, and configures the
tnsnames.ora files on bothb r nodes
a cluster e t to support the service.
( f
e licen s
$ make service r d
e ble
a V
Creating V ilthe SERV1
./configure_service
f e ra Service.
i o
ci trathe s
n SERV1 Service.
b r
Starting
on-
Fa Configuring
HAnResource
the SERV1 Service tnsnames.
Target State
----------- ------ -----
ora.RDBA.SERV1.RDBA1.srv ONLINE ONLINE on eg6608
ora.RDBA.SERV1.cs ONLINE ONLINE on eg6608
$ make ocr
./configure_ocr_mirror
Adding /dev/sdb2 as the OCR mirror.
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 616652
Used space (kbytes) : 4300
Available space (kbytes) : 612352
ID : 1473866508
$ make vdisk
./configure_vdisk_mirror
Now formatting voting disk: /dev/sdb6.
Successful addition of voting disk /dev/sdb6.
Now formatting voting disk: /dev/sdb7.
Successful addition of voting disk /dev/sdb7.
0. 0 /dev/sdb5
1. 0 /dev/sdb6
s a
2. 0 /dev/sdb7
)h a
Located 3 voting disk(s).
m ฺbr
i ฺ c o deฺ
r e d Gui
13. make bashrc s ic ent
This configures the .bashrc file on both nodes for the
d @ t udThese
eoracleSaccount to set shell
variables and to create useful functions to switchv e r
homes as required.
s functions
l a h i
include:
o _vi uhome.
• crs: Set variables for theiclusterware s et
b ic ASM thome.
rthe o
• asm: Set variables a for e
(f for theecluster
ns database home.
d e
• db: Set variables
c
V er ble li
ila fera
$ make bashrc
V
r i c io rans.bashrc
./configure_bashrc
t
Fab non-
Configuring
$ make all
./configure_ssh
Setting up SSH user equivalency.
oracle@eg6610's password: oracle@eg6610's password:
Checking SSH user equivalency.
eg6608
eg6610
./install_crs
Enter the cluster name: clustorl01
Enter the database name: RDBA
Starting Oracle Universal Installer...
...
located 3 votedisk(s).
./configure_rlwrap
Compiling and installing rlwrap.
./configure_bashrc
Configuring .bashrc
$ make progress
./check_progress
SSH user equivalency has been configured. s a
Oracle Clusterware is installed.
)h a
The ASM instances are created.
m ฺbr
The database software is installed.
i ฺ c o deฺ
The RDBA database is created.
r e d Gui
The SERV1 Service has been created.
The OCR is mirrored. @ sic dent
The voting disk is mirrored.
e r de Stu
RMAN has been configured.
v i lav e this
o_ o us
rlwrap is installed.
.bashrc is configured.
ic i
( f abr nse t
e rde le lice
l a V ab
16. make i er rlwrap to give SQL*Plus and RMAN history and command-
rlwrap
V andsfinstalls
Thisio compiles n
b r ic editing
line - a
trfunctionality by typing:
F a o n
n
• rlwrap sqlplus
• rlwrap rman
$ make rlwrap
./configure_rlwrap
Compiling and installing rlwrap.
Rebooting eg6610
Rebooting eg6608
...
s a
$ cd PCPS
)h a
ฺbr
$ make clean <After node 1 reboots, run make clean a second time>
./util_cleanup
c m
o deฺ
continuing cleanup procedure.
i ฺ
d Gui
Done.
r e
@ sic dent
e r de Stu
v i lav e this
ic i o_ o us
( f abr nse t
e rde le lice
l a V ab
i
V sfer
i o
ic -tran
b r
Fa non