Sie sind auf Seite 1von 88

1 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Oracle Real Application


Clusters (RAC) 12c
Collaborate Best Practices
Markus Michalewicz
Director of Product Management
Oracle Real Application Clusters (RAC)
@OracleRACpm
http://www.linkedin.com/in/markusmichalewicz

http://www.slideshare.net/MarkusMichalewicz
Safe Harbor Statement

The following is intended to outline our general product direction. It is


intended for information purposes only, and may not be incorporated
into any contract. It is not a commitment to deliver any material, code, or
functionality, and should not be relied upon in making purchasing
decisions. The development, release, and timing of any features or
functionality described for Oracles products remains at the sole
discretion of Oracle.

3 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Agenda

! Oracle RAC 12c and Standardization


! Installation of Oracle Grid Infrastructure 12c
! Installation of the Oracle Database Home
! Oracle RAC Database Creation using DBCA
! Post-install Steps and Configuration
! Summary and Q&A
! Appendices A-C

4 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle RAC Family of Solutions
For more information see:
http://www.slideshare.net/MarkusMichalewicz/

http://www.slideshare.net/MarkusMichalewicz/the-oracle-real-application-clusters-rac-family-of-solutions

5 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Standardize on Clusters
Clusters increase flexibility and HA regardless of DB types used later
Flexibility

r
n
atio r License Costs
gu
onfi uste
Re-c able cl
n
to e

High Availability

6 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Standardize on Oracle RAC
For all the flexibility you need
Scalability

ine
Onl de
ra
upg
plic ation
SU Ap
h a nd P
c
ling) Pat
ne (rol
Onli

Flexibility

7 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Standardize on Oracle RAC and Oracle Multitenant
The new standard for Oracle Database Consolidation
Agility

More on Fiday, Apr 11th, Session


2548 Oracle Multinenant meets
RAC Level 3, Lido 3103, 11am Consolidation

8 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Agenda

! Oracle RAC 12c and Standardization


! Installation of Oracle Grid Infrastructure 12c
! Installation of the Oracle Database Home
! Oracle RAC Database Creation using DBCA
! Post-install Steps and Configuration
! Summary and Q&A
! Appendices A-C

9 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Preparation of the Servers
OS image setup and more
! Setup of the Servers include:
Setting up network connections
! Public and private with switch

OS OL 6.4 OS OL 6.4
Setting up shared storage for all servers
dasher dancer
! Shared storage required

Setting up the OS image here OL 6.4

! Suggestion:
OS OL 6.4 OS OL 6.4
comet vixen Use cloning to deploy OS images faster

10 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Preparation of the Servers
Kernel and Oracle preinstall package
! Recommendations:
[root@dasher ~]# uname a Use OL 6.4+ UEK
Linux dasher 2.6.39-400.17.1.el6uek.x86_64 #1 SMP Fri Feb 22
18:16:18 PST 2013 x86_64 x86_64 x86_64 GNU/Linux
Use the Oracle preinstall package
#Get the pre-install package
! Available for
[root@dasher Desktop]# yum list oracle-*
oracle-rdbms-server-11gR2-preinstall.x86_64 1.0-7.el6 ol6_latest Oracle Database 11g Rel. 2
oracle-rdbms-server-12cR1-preinstall.x86_64 1.0-8.el6 ol6_latest
Oracle Database 12c Rel. 1
Additional steps to perform after using the
pre-install package for an Oracle RAC cluster:
! Add a grid user & dba group
! Align UIDs / GUIDs across servers
! Set SELinux to permissive, if possible
! Check large / huge pages settings

11 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
What is the default when keeping the preselection in steps 1-4?

! GI for a Cluster Installation


! Standard Cluster
! Typical Installation

12 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
Step 3: Double-check the cluster topology to deploy!

13 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Flex Cluster
The new standard for resource management in the cluster
! Oracle Flex Cluster:
The new standard for flexible
Leaf Nodes resource management in the cluster
! Use it as demand requires it

! Inherits all Flex ASM HA capabilities


! Will support more use cases in future

Efficient High Availability and


resource management across tiers
! Lightweight cluster stack on leaf nodes
Hub Nodes

Benefit from virtualization and


physical deployments in one cluster

14 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
For now, Standard Cluster is the default given the preselection
! Oracle Flex Cluster
Can consist of only HUB-nodes
! If a Leaf-node has access to shared storage,
it can perform a role change to a HUB-node
A Standard Cluster can be converted to a
Flex Cluster at any time after the installation
! Once a cluster is configured as a Flex Cluster
this configuration is irreversible without a re-
configuration of the cluster.

! Recommendation:
An all-HUB-node Flex Cluster behaves the
same as a Standard Cluster using Flex ASM.
Either can be used, but if in doubt, you can
choose standard cluster and convert later.
More Information in Appendix A

15 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
Step 4: Do not accept the default choose Advanced Installation

! Typical Installation
Does not provide an option to use Flex ASM
Does not provide an option to create the Mgmt
DB / Grid Infrastructure Management Repository
! Enhancement Requests for later
releases have been filed already

! Advanced Option
Recommended for all configurations

16 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
Advanced Installation SCAN & GNS requirement
! Recommendations:
SCAN remains to be required for the cluster
Choose cluster-specific unique SCAN names
OUI will try to enforce it as much as possible
! http://www.oracle.com/technetwork/products/
clustering/overview/scan-129069.pdf

Choose Configure GNS if:


! You want to use dynamic IP management
(DHCP assigned / IPv6 Stateless Address
Autoconfiguration) for client connectivity
In this case, GNS requirements remain as
with previous version for standard cluster
! You chose to install an Oracle Flex Cluster

17 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
Advanced Installation Network Interface Usage

! Recommendations:
Use Redundant Interconnect Usage feature
! Bonding can be used underneath if required

! MOS notes explain further configuration e.g.:

It is recommended to align the MOS note 1210883.1 - 11gR2 Grid


ASM network with the private Infrastructure Redundant Interconnect
interconnect. and ora.cluster_interconnect.haip
Using different subnets for the
private interconnect is required.

18 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
Advanced Installation Grid Infrastructure Management Repository
! Grid Infrastructure Management Repository (GIMR)
A Single Instance Oracle Database 12c
It will be installed on one of the nodes
! It is managed as a failover database

It contains the Cluster Health Monitor (CHM) data


It is stored in the first ASM disk group created

As part of the configuration, Quality of Service


Management (QoS) required resources are
added to the cluster configuration (e.g. OC4J)

! Recommendation: configure the GIMR!

19 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
Advanced Installation Storage Options
! For Standard Cluster Installations
three storage options are available:

1. Standard ASM
! ASM configuration as known
from previous releases
2. Oracle Flex ASM

! Recommended option available


with Oracle Grid Infrastructure 12c
Flex Cluster requires Flex ASM
3. Shared File System
! Alternative

20 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle ASM 12c Overview
Oracle ASM 12c Standard Deployment
RAC Cluster
Database Instance

One to One
Mapping of ASM DBA
ASM Instance
DBA DBB DBB DBB DBC
Instances to ASM Instance

Servers
Node1 ASM Node2 ASM Node3 ASM Node4
ASM Node5 ASM

ASM Cluster Pool of Storage


Shared Disk Disk Group A Disk Group B ASM Disk
Groups

Wide File Striping

21 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Introducing Oracle Flex ASM
Removal of One to One Mapping and HA
RAC Cluster
Database Instance

Databases share
ASM instances DBA
ASM Instance
DBA DBB DBB DBB DBC
ASM Instance

Node1 Node2 ASM Node3 ASM Node4


ASM Node5

Node1 Node2 Node5


runs as runs as runs as
ASM Client ASM Client ASM Client
to Node4
Node2 to Node3 to Node4

ASM Cluster Pool of Storage


Shared Disk Disk Group A Disk Group B ASM Disk
Groups

Wide File Striping

22 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
Use Oracle Flex ASM for storage management

! Recommendations:
Use Oracle Flex ASM for storage
! For better HA of database instances
! Reserve per-node spare memory

[GRID]> ps -ef |grep pmon


grid 3822 1 0 08:05 ? 00:00:00 asm_pmon_+ASM1
grid 4865 1 0 08:06 ? 00:00:00 mdb_pmon_-MGMTDB
grid 9592 1 0 08:09 ? 00:00:00 apx_pmon_+APX1
grid 19114 19003 0 09:22 pts/0 00:00:00 grep pmon

More Information in Appendix B

23 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
Advanced Installation Create ASM Disk Group
! Recommendations:
Create Infrastructure Disk Group (DG) first
! Use it to host OCR / Voting Disk
Choose Redundancy accordingly
Normal(+) redundancy is recommended
Create Data and FRA disk groups
post installation and as required.

! Optional: Use it to host shared DB homes


by creating an ACFS file system on top of it
http://www.oracle.com/technetwork/products/cloud-storage/
oop-patching-of-acfs-shared-oh-1885763.pdf
ADVM volumes can be of lower
redundancy than the underlying DG

24 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install Oracle Grid Infrastructure 12c
Advanced Installation Prerequisite Checks: Use FixUp Scripts!

25 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


New Memory Requirements
Just something to consider

[GRID]> srvctl status asm


ASM is running on comet,dasher,dancer

[GRID]> srvctl status mgmtdb


Database is enabled
Instance -MGMTDB is running on node dasher

[GRID]> ps -ef |grep pmon


grid 3227 1 0 13:54 ? 00:00:02 asm_pmon_+ASM1
Physical memory requirements grid 3868 1 0 13:55 ? 00:00:01 mdb_pmon_-MGMTDB
with Oracle RAC 12c: 4GB grid 7364 1 0 13:57 ? 00:00:01 apx_pmon_+APX1
oracle 7917 1 0 13:57 ? 00:00:02 ora_pmon_raccdb1_4

[RAC]> df -h
Filesystem Size Used Avail Use% Mounted on
...
tmpfs 1.7G 1.3G 475M 73% /dev/shm
...

26 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Agenda

! Oracle RAC 12c and Standardization


! Installation of Oracle Grid Infrastructure 12c
! Installation of the Oracle Database Home
! Oracle RAC Database Creation using DBCA
! Post-install Steps and Configuration
! Summary and Q&A
! Appendices A-C

27 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install the Oracle Database Home
Nothing special just a quick walk through

Not the
default

28 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Install the Oracle Database Home
A few things to point out

ACFS based
shared home

29 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Before Creating Databases
Create Server Pools and additional disk groups as required

[GRID]$ srvctl add srvpool serverpool backoffice


min 1 max 2 i 1

[GRID]$ srvctl add srvpool serverpool frontoffice


min 1 max 4 i 2

Create additional disk


groups as required.

30 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Agenda

! Oracle RAC 12c and Standardization


! Installation of Oracle Grid Infrastructure 12c
! Installation of the Oracle Database Home
! Oracle RAC Database Creation using DBCA
! Post-install Steps and Configuration
! Summary and Q&A
! Appendices A-C

31 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Create an Oracle Database
What is the default when keeping the preselection in steps 1-4?

! Policy-managed
! Oracle RAC-based
! Non-CDB Database

32 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Create an Oracle RAC Database
A few tips and tricks

Create an empty
multitenant CDB.

33 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Create an Oracle RAC Database
A few tips and tricks
! Recommendations:
Use a different disk group than the database file
location-disk group as the Fast Recovery Area.
Automatic Storage Management (ASM)
recommendation remains unchanged
! Use it for any current production database

! New in Oracle Database 12c:


ACFS can be used to host database files
This is the default, Use ACFS for database files, if you want to
but not recommended
! manage all data on a file system
! use advanced functionality

34 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Milestone
What has been installed and configured so far?

raccdb1_2
[RAC]> srvctl status database -d raccdb1
Instance raccdb1_1 is running on node comet
Oracle RAC Oracle RAC
Instance raccdb1_2 is running on node dancer
Oracle GI for a cluster Oracle GI for a cluster
[RAC]>srvctl status srvpool -serverpool backoffice -detail
OS OL 6.4 OS OL 6.4 Server pool name: backoffice
Active servers count: 2
dasher srvpool: frontoffice dancer srvpool: backoffice Active server names: comet,dancer
NAME=comet STATE=ONLINE
NAME=dancer STATE=ONLINE

[RAC]> srvctl status srvpool


raccdb1_1 Server pool name: Free
Active servers count: 0
Oracle RAC Oracle RAC Server pool name: Generic
Active servers count: 0
Oracle GI for a cluster Oracle GI for a cluster Server pool name: backoffice
Active servers count: 2
OS OL 6.4 OS OL 6.4 Server pool name: frontoffice
Active servers count: 2
comet srvpool: backoffice vixen srvpool: frontoffice

raccdb1

35 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Create Pluggable Databases
Create HR PDB on running instances

raccdb1_2

Oracle RAC Oracle RAC


Oracle GI for a cluster Oracle GI for a cluster
dasher srvpool: frontoffice dancer srvpool: backoffice
Create a PDB on a node
that hosts a multintenant
CDB instance

raccdb1_1

Oracle RAC Oracle RAC


Oracle GI for a cluster Oracle GI for a cluster
comet srvpool: backoffice vixen srvpool: frontoffice

raccdb1

36 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Agenda

! Oracle RAC 12c and Standardization


! Installation of Oracle Grid Infrastructure 12c
! Installation of the Oracle Database Home
! Oracle RAC Database Creation using DBCA
! Post-install Steps and Configuration
! Summary and Q&A
! Appendices A-C

37 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Post-Creation Steps
Create services to balance the workload
! Use Dynamic Database Services
For easier management of multitenant CDBs
raccdb1_2
Details on FRI, Apr 11th, Session
For better workload management in the cluster
Oracle RAC Oracle RAC
2548 Oracle Multinenant meets
Oracle GI for a cluster Oracle GI for a cluster
dasher srvpool: frontoffice dancer srvpool: backoffice RAC Level 3, Lido 3103, 11am
! Start services after creation and as required

raccdb1_1 [RAC]> srvctl add service -d raccdb1 -s hrsvc -pdb hr -


serverpool backoffice
Oracle RAC Oracle RAC
[RAC]> srvctl add service -d raccdb1 -s crmsvc -pdb crm -
Oracle GI for a cluster Oracle GI for a cluster serverpool frontoffice
comet srvpool: backoffice vixen srvpool: frontoffice

raccdb1
More Information in Appendix C

38 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Agenda

! Oracle RAC 12c and Standardization


! Installation of Oracle Grid Infrastructure 12c
! Installation of the Oracle Database Home
! Oracle RAC Database Creation using DBCA
! Post-install Steps and Configuration
Testing
Monitoring &Analysis

! Summary and Q&A


! Appendices A-C

39 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Engineered Systems
Optimized and already tested

IB Interconnect
Low Overhead IPC Prot.
Preconfigured

Oracle Database
Appliance Full Rack

Half Rack

Quarter Rack
Oracle Exadata
Database Machine

40 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Real Application Testing
Gather and deploy workload on any database type

ERP

CRM

DW

41 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Standardize on Oracle RAC (One Node)
Here: to simplify Oracle RAC testing
Scalability

ine
Onl de
ra
upg

ur a tion
g r
e - c onfi cluste
R le
o e nab
t

Flexibility

42 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Standardize on Oracle RAC (One Node)
To simplify Oracle RAC testing
Decide Oracle RAC testing made simple:
1. Standardize on Oracle RAC (One Node)

2. Run tests on Oracle RAC One Node instance


AWR Online AWR
--- ---
ASH
upgrade ASH RAC One Node behaves basically like a single instance

3. Online Upgrade to Oracle RAC for testing only

4. Run tests on Oracle RAC

5. Decide whether the application provides service


RON_1
RON RON_2
goals when load balanced over multiple active
Oracle RAC Oracle RAC
instances
Oracle GI Oracle GI
comet vixen Identify bottlenecks and tuning actions as required

43 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Agenda

! Oracle RAC 12c and Standardization


! Installation of Oracle Grid Infrastructure 12c
! Installation of the Oracle Database Home
! Oracle RAC Database Creation using DBCA
! Post-install Steps and Configuration
Testing
Monitoring &Analysis

! Summary and Q&A


! Appendices A-C

44 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Post-Install Steps
Check your environment regularly using CVU and ORAcheck
! CVU is run regularly as part of the GI stack

#CVU is run regularly by default


! Use ORAcheck (formerly RACcheck)
[GRID]> srvctl status cvu
CVU is enabled and running on node comet the Oracle RAC Configuration Audit Tool
For details see MOS note 1268927.1
! Checks the Oracle Database:
Standalone Database
Grid Infrastructure & RAC
Maximum Availability Architecture (MAA) Validation
Upgrade Readiness Validation
Golden Gate
! E-Business Suite
! Oracle SUN Systems

45 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Monitoring Essentials
Use Cluster Health Monitor for OS (CHM/OS)
1. First failure diagnostics: Collects as much
system metrics and data as feasible
LOGGERD
2. Collects system metrics on all
sysmond
nodes in the cluster synchronized
sysmond
Oracle GI Oracle GI 3. Persistent storage of all
dasher dancer
collected data in a database
4. Integrated with Oracle Grid Infrastructure
starting with 11.2.0.2 (12c: uses GIMR)
5. Robust collection in situations
sysmond
of resource starvation
sysmond
Oracle GI Oracle GI 6. Data dump or visualization
comet vixen

LOGGERD
sysmond

46 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Log Collection Essentials
Runtime and Emergency Data Collections
! Save database statistics
For baselines and reference: export AWR
LOGs LOGs
! For diagnostics:
Oracle RAC Oracle RAC Always get AWR and ASH reports
Oracle GI Oracle GI
dasher dancer
! For emergencies and last gasp
get ASH dump (e.g. oradebug ashdunp level 0)

! CHM/OS
LOGs LOGs oclumon dumpnodeview -n pecdb08 pecdb09 -s
"2011-09-30 15:00:00" -e "2011-09-30 15:30:00" -v

Oracle RAC Oracle RAC oclumom manage report <ret. time in secs>
Oracle GI Oracle GI
comet vixen ! CSS logs from all nodes
Node and instance evictions
Interconnect issues (e.g. gc blocks lots )

47 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Log Collection Essentials
Use Trace File Analyzer (TFA) to collect Data

! Goals
LOGs
Improved comprehensive first
Oracle RAC
failure diagnostics collection
Oracle GI Efficient collection, packaging
dasher
and transfer of data for customers
Reduce round trips between
TFA customers and Oracle
LOGs
Supports 10.2, 11.1, 11.2 and above
Oracle RAC Included in the 11.2.0.4
Oracle GI patch set and future versions
comet

48 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Log Collection Essentials
Use Trace File Analyzer (TFA) to collect Data
! Approach
LOGs
Collect for all relevant components
(OS, Grid Infrastructure, ASM, RDBMS)
Oracle RAC
Oracle GI One command to collect all information
dasher
Prune large files based on temporal criteria
Collect time relevant IPS (incident)
TFA packages on RAC nodes
LOGs
Collect time relevant CHM/OS,
Oracle RAC OSWatcher data on all Oracle RAC nodes
Oracle GI
comet
On-demand (default) and
Event Driven diagnostic collections
! TFA Collector MOS note ID 1513912.1

49 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Log Collection Essentials
Use Trace File Analyzer (TFA) to collect Data
! TFA Version 3.2 Updates (07Apr14):
LOGs 1. First version of the Log Analyzer.
2. Addition of notrim for diagnostic collections.
Oracle RAC
Oracle GI 3. Support for TFA on zLinux.
dasher
4. Collection of ExaWatcher data.
5. Sundiag collection

TFA 6. Aging of TFA log files restricting maximum size.


LOGs
7. Multiple performance enhancements
Oracle RAC 8. Critical Bug fixes
Oracle GI
comet ! TFA Collector MOS note ID 1513912.1

50 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


TFA Usage Example
$ sudo ./tfactl diagcollect One simple command
Sending diagcollect request to host : myhost2
Getting list of files satisfying time range [Tue Sep 03 14:17:43 PDT 2013, Tue Sep 03 18:17:43 PDT 2013]
myhost1: Zipping File: /opt/oracle/oak/oswbb/archive/oswiostat/myhost1_iostat_13.09.03.1500.dat.gz
OS Watcher files
myhost1: Zipping File: /u01/app/oracle/diag/rdbms/bill/bill1/trace/alert_bill1.log
Trimming file : /u01/app/oracle/diag/rdbms/bill/bill1/trace/alert_bill1.log with original file size : 109kB
myhost1: Zipping File: /opt/oracle/oak/oswbb/archive/oswtop/myhost1_top_13.09.03.1500.dat.gz
myhost1: Zipping File: /opt/oracle/oak/log/myhost1/oak/oakd.log
Trimming file : /opt/oracle/oak/log/myhost1/oak/oakd.log with original file size : 9.2MB
myhost1: Zipping File: /u01/app/11.2.0.3/grid/log/myhost1/gipcd/gipcd.log
Pruning
myhost1: Zipping File: /u01/app/11.2.0.3/grid/log/myhost1/agent/ohasd/oraagent_grid/oraagent_grid.log
Trimming file : /u01/app/11.2.0.3/grid/log/myhost1/agent/ohasd/oraagent_grid/oraagent_grid.log with original filesize 4.3MB
myhost1: Zipping File: /var/log/messages
Truncated for brevity Relevant files only
myhost1: Zipping File: /opt/oracle/oak/oswbb/archive/oswslabinfo/myhost1_slabinfo_13.09.03.1800.dat
Collecting ADR incident files...
Total Number of Files checked : 10543
Total Size of all Files Checked : 3.9GB ADR Incident files
Number of files containing required range : 68
Total Size of Files containing required range : 129MB
Number of files trimmed : 10
Total Size of data prior to zip : 144MB
Saved 63MB by trimming files
144MB pruned and compressed down to 8.6MB
Zip file size : 8.6MB
Total time taken : 47s.
47 seconds! 1 command, 2 nodes, 4 databases, ASM, Clusterware, OS
Logs are collected to:
/opt/oracle/tfa/tfa_home/repository/collection_Tue_Sep_3_18_17_24_PDT_2013_node_all/myhost1.tfa_Tue_Sep_3_18_17_24_PDT_2013.zip
/opt/oracle/tfa/tfa_home/repository/collection_Tue_Sep_3_18_17_24_PDT_2013_node_all/myhost2.tfa_Tue_Sep_3_18_17_24_PDT_2013.zip

51 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Analysis Essentials
Time Series Analysis AWR Reports are not enough due to average

! Solution
ASH reports

V$SESSION
V$SESSION_WAIT

V$ACTIVE_SESSION_HISTORY DBA_HIST_ACTIVE_SESS_HISTORY

Write 1
Session
state out of 10
objects samples
Circular buffer
Every
in SGA
1 hour
MMON Lite (2MB per CPU) AWR
or
(MMNL) out-of-space

Occurrence of an interconnect Variable Direct path


problem ~18 secs avg !!!! length rows inserts

52 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Post-Install Steps
Monitor best practices notes and announcements
! ORAcheck - Oracle Configuration Audit Tool
For details see MOS note 1268927.1

! Best practices My Oracle Support (MOS) notes:


MOS note 810394.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (Platform Independent)
! MOS note 811306.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (Linux)

! MOS note 811280.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (Solaris)
Note: Engineered Systems with the same OS will have additional recommendations
! MOS note 811271.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (Windows)

! MOS note 811303.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (HP-UX)

! MOS note 811293.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (AIX)

! MOS note 1452965.2


Information Center: Oracle Scalability Grid Infrastructure / Clusterware and Real Application Clusters (RAC)

53 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Agenda

! Oracle RAC 12c and Standardization


! Installation of Oracle Grid Infrastructure 12c
! Installation of the Oracle Database Home
! Oracle RAC Database Creation using DBCA
! Post-install Steps and Configuration
! Summary and Q&A
! Appendices A-C

54 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


More Information Extended RAC and More
! Presentation: Oracle RAC on Extended Distance Clusters
http://www.slideshare.net/MarkusMichalewicz/oracle-rac-on-extended-distance-clusters

! WP: Oracle Real Application Clusters on Extended Distance Clusters


http://www.oracle.com/technetwork/database/options/clustering/overview/extendedracversion11-435972.pdf
! WP: Using standard NFS to support a third voting file for extended cluster configurations
http://www.oracle.com/technetwork/database/database-technologies/clusterware/overview/grid-infra-thirdvoteonnfs-131158.pdf

! Presentation: Oracle Clusterware Node Management and Voting Disks


http://www.slideshare.net/MarkusMichalewicz/oracle-clusterware-node-management-and-voting-disks

! Presentation: Oracle Database with RAC 12c HA BP TCOUG


http://www.slideshare.net/MarkusMichalewicz/oracle-database-with-rac-12c-ha-bp-tcoug

55 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Questions
and
Answers

56 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Agenda

! Oracle RAC 12c and Standardization


! Installation of Oracle Grid Infrastructure 12c
! Installation of the Oracle Database Home
! Oracle RAC Database Creation using DBCA
! Post-install Steps and Configuration
! Summary and Q&A
! Appendices A-C

57 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Appendix A:
Converting to an Oracle
Flex Cluster with Node
Conversion Example

58 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Flex Cluster
Some configuration details
! Oracle Flex Cluster
Will be the basis for more uses cases
[GRID]> crsctl get cluster mode config
Cluster is configured as "standard" in future releases (for resource mgmt)
Can consist of only HUB-nodes
[GRID]> crsctl get cluster mode status
Cluster is running in "standard" mode
If a Leaf-node has access to shared storage,
[GRID]> olsnodes -s -a -t it can perform a role change to a HUB-node
dasher Active Hub Unpinned
vixen Active Hub Unpinned A Standard Cluster can be converted to a
dancer Active Hub Unpinned Flex Cluster at any time after the installation
comet Active Hub Unpinned
Once a cluster is configured as a Flex Cluster
this configuration is irreversible without a re-
Not a Flex Cluster yet. configuration of the cluster.
An all-Hub Flex Cluster is
basically a Standard Cluster ! More Information:
http://docs.oracle.com/cd/E16655_01/rac.121/e17886/
bigcluster.htm#CWADD92560

59 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Flex Cluster
Converting to Flex Cluster
! More Information:
http://docs.oracle.com/cd/E16655_01/rac.121/e17886/
[GRID]> srvctl config gns bigcluster.htm#CHDJGBII
PRKF-1110 : Neither GNS server nor GNS client is configured on
this cluster

[GRID]> more /etc/hosts |grep gns ! Flex Cluster implementations require GNS
10.1.1.99 mygns mygns.localdomain
! Converting a Flex Cluster requires a cluster restart
#Change to root
[GRID]> su Use crsctl stop crs followed by crsctl start crs as root
Password:
[GRID]> srvctl add gns -vip mygns
Hence the difference between status and config
[GRID]> srvctl start gns Nodes can be restarted in a rolling fashion:

[GRID]> crsctl set cluster mode flex [GRID]> date ; hostname ; [GRID]> date ; hostname ;
Cluster mode set to "flex crsctl get cluster mode status crsctl get cluster mode status
Sat Sep 14 14:43:45 PDT 2013 Sat Sep 14 14:43:37 PDT 2013
dasher dancer
[GRID]> crsctl get cluster mode status
Cluster is running in "flex" mode Cluster is running in "standard" mode
Cluster is running in "standard" mode

[GRID]> crsctl get cluster mode config


Cluster is configured as "flex"

60 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Flex Cluster
Standard to Flex Cluster conversion what has changed?
! Nothing at first glance
An all-Hub Flex Cluster behaves
raccdb1_4 raccdb1_2 like a Standard Cluster
Oracle RAC Oracle RAC When converting from Standard Cluster
Oracle GI | HUB Oracle GI | HUB
all nodes are converted into HUB-nodes
dasher srvpool: frontoffice dancer srvpool: backoffice

[GRID]> crsctl get cluster mode status


Cluster is running in "flex" mode

[GRID]> olsnodes -a -s -t
dasher Active Hub Unpinned
raccdb1_1 raccdb1_3 vixen Active Hub Unpinned
dancer Active Hub Unpinned
Oracle RAC Oracle RAC comet Active Hub Unpinned

Oracle GI | HUB Oracle GI | HUB [RAC]> srvctl status database -d raccdb1


comet srvpool: backoffice vixen srvpool: frontoffice Instance raccdb1_1 is running on node comet
Instance raccdb1_2 is running on node dancer
Instance raccdb1_3 is running on node vixen
Instance raccdb1_4 is running on node dasher
raccdb1

61 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Flex Cluster
Changing node roles server vixen becomes a Leaf node
! More Information:
[GRID]> hostname
vixen http://docs.oracle.com/cd/E16655_01/rac.121/e17886/
bigcluster.htm#BABHCEAE
[GRID]> srvctl config vip -node vixen
VIP exists: network number 1, hosting node vixen
VIP Name: vixen-vip
VIP IPv4 Address: 10.1.1.33
VIP IPv6 Address:

[GRID]> crsctl get node role config


Node 'vixen' configured role is 'hub'

#Change to root
[GRID]> su [GRID]> crsctl get node role config
Password: Node 'vixen' configured role is 'leaf'

[GRID]> crsctl set node role leaf [GRID]> srvctl config vip -node vixen
CRS-4408: Node 'vixen' configured role successfully changed; restart VIP exists: network number 1, hosting node vixen
Oracle High Availability Services for new role to take effect. VIP Name: vixen-vip
VIP IPv4 Address: 10.1.1.33
[GRID]> crsctl stop crs VIP IPv6 Address:
[GRID]> crsctl start crs

62 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Flex Cluster
Node role change to Leaf what has changed?
! Server vixen has converted to a Leaf node
! Leaf nodes do not host DB instances in 12.1
raccdb1_4 raccdb1_2
! Server vixen moved to Server Pool FREE as
Oracle RAC Oracle RAC
Server Pool frontoffice is a database pool
Oracle GI | HUB Oracle GI | HUB
Note: all nodes in this example have access
dasher srvpool: frontoffice dancer srvpool: backoffice
to shared storage, which means only the node
role changes storage access is preserved.

[RAC]> srvctl status database -d raccdb1


raccdb1_1 Instance raccdb1_1 is running on node comet
Instance raccdb1_2 is running on node dancer
Oracle RAC Oracle RAC Instance raccdb1_4 is running on node dasher

Oracle GI | HUB Oracle GI | LEAF [RAC]> srvctl status server -servers vixen -detail
comet srvpool: backoffice vixen srvpool: FREE Server active pools: Free
Server name: vixen
Server state: ONLINE
Server state details:
raccdb1

63 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Flex Cluster
Revert role change server vixen becomes a HUB again

raccdb1_4 raccdb1_2
#As root
Oracle RAC Oracle RAC [GRID]> crsctl set node role hub
CRS-4408: Node 'vixen' configured role successfully changed;
Oracle GI | HUB Oracle GI | HUB restart Oracle High Availability Services for new role to take
effect.
dasher srvpool: frontoffice dancer srvpool: backoffice
[GRID]> crsctl stop crs
[GRID]> crsctl start crs

[RAC]> srvctl status database -d raccdb1


Instance raccdb1_1 is running on node comet
raccdb1_1 raccdb1_3 Instance raccdb1_2 is running on node dancer
Instance raccdb1_3 is running on node vixen
Oracle RAC Oracle RAC Instance raccdb1_4 is running on node dasher

Oracle GI | HUB Oracle GI | HUB


comet srvpool: backoffice vixen srvpool: frontoffice

raccdb1

64 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Appendix B:
Oracle Flex ASM
Details and Test Scenarios

65 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Flex ASM
Configuration details
! Flex ASM introduces new local resources:
At least one ASM listener
[GRID]> crsctl stat res -t One proxy_advm (per node)
-------------------------------------------------------------------------------
Name Target State Server State details ! Used for ACFS access to Flex ASM instances
-------------------------------------------------------------------------------
Local Resources
-------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr ! Connections from a database instance to an ASM
ONLINE ONLINE comet STABLE
ONLINE ONLINE dancer STABLE instance are based on SQLnet using listeners.
ONLINE ONLINE dasher STABLE

...
ONLINE ONLINE vixen STABLE The listener directs the connection to the least loaded
ora.DATA.dg ASM instance based on the load metric it maintains.
ONLINE ONLINE comet STABLE
ONLINE
ONLINE
ONLINE
ONLINE
dancer
dasher
STABLE
STABLE
The connection details are fetched from CSS global data
OFFLINE OFFLINE vixen STABLE
... The ASM instance to which the database instance
ora.INFRA.dg
ONLINE ONLINE comet STABLE
connects to is listed in the database alert log:
ONLINE ONLINE dancer STABLE
ONLINE ONLINE dasher STABLE ! NOTE: ASMB connected to ASM instance
OFFLINE OFFLINE vixen STABLE
...
+ASM1 (Flex mode; client id 0x10004)
ora.proxy_advm The userid and password supplied are also managed
ONLINE ONLINE comet STABLE
ONLINE
ONLINE
ONLINE
ONLINE
dancer
dasher
STABLE
STABLE
automatically. They are supplied while establishing the
ONLINE ONLINE vixen STABLE session, not while connecting.

66 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Flex ASM
Administering Flex ASM
! Check ASM mode using asmcmd
! Check where ASM instances are running using srvctl
[GRID]> asmcmd
ASMCMD> showclustermode
ASM cluster : Flex mode enabled ! Check the configuration of ASM using srvctl

[GRID]> srvctl status asm


ASM is running on comet,dasher,dancer
! Modify the ASM configuration using srvctl
[GRID]> srvctl config asm -detail
ASM home: /u01/app/12.1.0/grid
Password file: +INFRA/orapwASM
ASM listener: LISTENER
ASM is enabled.
! Cluster ASM listener:
ASM instance count: 3
Cluster ASM listener: ASMNET1LSNR_ASM,ASMNET2LSNR_ASM Flex ASM can have its own network or overlap with the
private interconnect network used by RAC DB instances
[GRID]> srvctl modify asm -count all
It is recommended to configure a full overlap of the private
[GRID]> srvctl status asm interconnect and the ASM network in current use cases:
ASM is running on comet,dasher,dancer

[GRID]> srvctl start asm

[GRID]> srvctl status asm


ASM is running on comet,vixen,dasher,dancer

67 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Oracle Flex ASM
Some test scenarios
! A failure of an ASM instance is without effect for the
databases using ASM disk groups (here: -MGMTDB)
[GRID]> ps -ef |grep pmon If an ASM instance is running on all nodes (count all)
grid 3840 1 0 09:11 ? 00:00:01 mdb_pmon_-MGMTDB
grid 4093 1 0 11:35 ? 00:00:00 asm_pmon_+ASM1 the ASM instance is restarted upon failure
grid 4548 1 0 11:36 ? 00:00:00 apx_pmon_+APX1
oracle 5092 1 0 11:36 ? 00:00:00 ora_pmon_raccdb1_4 If an ASM instance is running on a subset of nodes
the ASM instance might be restarted on another node
[GRID]> kill -9 4093
[GRID]> ps -ef |grep pmon The client using the ASM instance may change
grid 3840 1 0 09:11 ? 00:00:01 mdb_pmon_-MGMTDB
grid 4548 1 0 11:36 ? 00:00:00 apx_pmon_+APX1
oracle 5092 1 0 11:36 ? 00:00:00 ora_pmon_raccdb1_4
! A failure of an ASM instance is without effect for
the APX (ADVM proxy) running on the same node
[GRID]> ps -ef |grep pmon
grid 3840 1 0 09:11 ? 00:00:01 mdb_pmon_-MGMTDB
grid 4548 1 0 11:36 ? 00:00:00 apx_pmon_+APX1
oracle 5092 1 0 11:36 ? 00:00:00 ora_pmon_raccdb1_4 ! A failure of the APX will lead to a restart of the database
grid 5748 1 0 11:39 ? 00:00:00 asm_pmon_+ASM1
grid 5793 19013 0 11:39 pts/1 00:00:00 grep pmon instance (on the node) that uses an ACFS file system.
[GRID]> asmcmd lsct data
DB_Name Status Software_Version Compatible_version Instance_Name Disk_Group
+APX CONNECTED 12.1.0.1.0 12.0.0.0.0 +APX1 DATA
! More information:
[GRID]> ssh vixen /u01/app/12.1.0/grid/bin/asmcmd lsct data
DB_Name Status Software_Version Compatible_version Instance_Name Disk_Group http://docs.oracle.com/cd/E16655_01/server.121/e17612/
+APX CONNECTED 12.1.0.1.0 12.0.0.0.0 +APX2 DATA
+APX CONNECTED 12.1.0.1.0 12.0.0.0.0 +APX3 DATA asminst.htm#OSTMG95329

68 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Appendix C:
Policy-Managed Databases
and with Oracle RAC 12c

69 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Managed Databases with Oracle RAC 12c
Database Services
! Database Services
Ensure that workload is hosted in the respective
raccdb1_4 raccdb1_2 server pool with the cardinality defined as part of
Oracle RAC Oracle RAC
the policy definition.

Oracle GI | HUB Oracle GI | HUB


dasher srvpool: frontoffice dancer srvpool: backoffice

[GRID]> srvctl status serverpool


Server pool name: frontoffice
Active Servers count: 2
Server pool name: backoffice
Active Servers count: 2
raccdb1_1 raccdb1_3

Oracle RAC Oracle RAC


[RAC]> srvctl status service -d raccdb1
Oracle GI | HUB Oracle GI | HUB Service crmsvc is running on nodes: dasher,vixen
Service hrsvc is running on nodes: comet,dancer
comet srvpool: backoffice vixen srvpool: frontoffice

raccdb1

70 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Managed Databases with Oracle RAC 12c
Improved HA Management - Startup
1st 3rd
! Defining a Service Startup Order
Ensure services are started in specified groups
raccdb1_4 raccdb1_2 and specified order.
Oracle RAC Oracle RAC Leverages Serverpool Min and Importance properties
Oracle GI | HUB Oracle GI | HUB
dasher srvpool: frontoffice dancer srvpool: backoffice

[GRID]> srvctl config serverpool


4th 2nd Server pool name: frontoffice
Importance: 10, Min: 2, Max 2
Server pool name: backoffice
Importance: 5, Min: 1, Max 1
raccdb1_1 raccdb1_3 Server pool name: Free
Importance: 0, Min: 0, Max -1
Oracle RAC Oracle RAC
Oracle GI | HUB Oracle GI | HUB
comet srvpool: backoffice vixen srvpool: frontoffice

raccdb1

71 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Managed Databases with Oracle RAC 12c
Improved HA Management New Failover Strategy
! Servers Move to Replace Failed node
Protects against cascade failures due to load
raccdb1_4 raccdb1_2
raccdb1_2
Ensures workload isolation between pools
Oracle RAC Oracle RAC
Less important workloads shutdown transactionally
Oracle GI | HUB Oracle GI | HUB
dasher srvpool: frontoffice dancer srvpool: backoffice
frontoffice

[GRID]> srvctl config serverpool


Server pool name: frontoffice
Importance: 10, Min: 2, Max 2
Server pool name: backoffice
Importance: 5, Min: 1, Max 1
raccdb1_1 raccdb1_3
[GRID]> srvctl status serverpool
Oracle RAC Oracle RAC Server pool name: frontoffice
Active Servers count: 2
Oracle GI | HUB Oracle GI | HUB Server pool name: backoffice
comet srvpool: backoffice vixen srvpool: frontoffice Active Servers count: 1

raccdb1

72 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Managed Databases with Oracle RAC 12c
Improved HA Management Manage Last Service Standing
! Business Critical Services survive multiple failures
Most important pool always gets the servers
raccdb1_4 raccdb1_2
raccdb1_2
Services preserved across multiple failures
Oracle RAC Oracle RAC
Less important workloads shutdown transactionally
Oracle GI | HUB Oracle GI | HUB
dasher srvpool: frontoffice dancer srvpool: backoffice
frontoffice

[RAC]> srvctl config serverpool


Server pool name: frontoffice
Importance: 10, Min: 2, Max 2
Server pool name: backoffice
Importance: 5, Min: 1, Max 1
raccdb1_1 raccdb1_3
[RAC]> srvctl status service db
Oracle RAC Oracle RAC Service crmsrv is running on nodes comet,vixen
Oracle GI | HUB Oracle GI | HUB Service hrsvc is not running
comet srvpool:frontoffice
srvpool: backoffice vixen srvpool: frontoffice

raccdb1

73 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Managed Databases with Oracle RAC 12c
Improved HA Management Dynamic Provisioning
! Add Servers Just-In Time to meet demand
Server Pools sized via Min and Max properties
raccdb1_4 raccdb1_2
raccdb1_2
Dynamically controlled by QoS Management
Oracle RAC Oracle RAC
Planned control via Clusterware or QoSM Policies
Oracle GI | HUB Oracle GI | HUB
dasher srvpool: frontoffice dancer srvpool: backoffice
frontoffice

[GRID]> srvctl modify serverpool


serverpool backoffice max 1

[RAC]> srvctl config serverpool


Server pool name: frontoffice
raccdb1_1 raccdb1_3 Importance: 10, Min: 2, Max 4
Server pool name: backoffice
Oracle RAC Oracle RAC Importance: 5, Min: 1, Max 1
Oracle GI | HUB Oracle GI | HUB [RAC]> srvctl status service db
comet srvpool: backoffice vixen srvpool: frontoffice Service crmsrv is running on nodes dasher,dancer,vixen
Service hrsvc is not running

raccdb1

74 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Support for Multiple Policies tracking business objectives
! More Information:
http://docs.oracle.com/cd/E16655_01/rac.121/e17886/pbmgmt.htm

! New in Oracle Grid Infrastructure 12c


Server Categories
[GRID]> crsctl modify policyset attr
"LAST_ACTIVATED_POLICY=NightTime ! Server Categories use server attributes to allow
CRS-2673: Attempting to stop for an active use of differently sized servers
'ora.raccdb1.crmsvc.svc' on 'comet'
CRS-2673: Attempting to stop
'ora.raccdb1.crmsvc.svc' on 'dancer' Policy Sets
CRS-2677: Stop of 'ora.raccdb1.crmsvc.svc' on
'comet' succeeded ! Policy Sets allow for dynamic adjustment
CRS-2673: Attempting to start
'ora.raccdb1.backup.svc' on 'comet'
to demand changes in an atomic transaction
QoS Management CRS-2677: Stop of 'ora.raccdb1.crmsvc.svc' on
'dancer' succeeded
CRS-2672: Attempting to start Server Attributes
'ora.raccdb1.hrsvc.svc' on 'dancer NAME
MEMORY_SIZE!

OR
CPU_COUNT Server Categories
CPU_CLOCK_RATE! NAME
CPU_HYPERTHREADING! ACL
CPU_EQUIVALENCY EXPRESSION
Oracle Clusterware - CRSCTL !

75 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Setting up policy sets Provision Server Pools and creating a PolicySet
! Add another server pool backup

[GRID]> srvctl add serverpool ! Set up policy set with 3 server pools & 3 policies as follows:
serverpool backup min 0 max 2 importance 20
DayTime:
[GRID] srvctl status serverpool
Server pool name: frontoffice ! frontoffice uses three servers (MIN_SIZE=3)
Active Servers count: 3
Server pool name: backoffice
! backoffice uses one server (MIN_SIZE=1)
Active Servers count: 1 ! backup does not run during daytime (MIN_SIZE=0)
Server pool name: backup
Active Servers count: 0 NightTime:
[GRID]> crsctl modify policyset ! frontoffice uses one server (MIN_SIZE=1)
-file /u01/app//policyset.txt ! backoffice uses two servers (MIN_SIZE=2)
! backup uses only one server (MIN_SIZE=1)
Weekend:
! frontoffice uses one server (MIN_SIZE=1)
! backoffice uses one server (MIN_SIZE=1)
! backup uses two servers (MIN_SIZE=2)

76 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Using Policy Sets part 1: Activate a policy

[GRID]> crsctl modify policyset


-attr "LAST_ACTIVATED_POLICY=Weekend"

[GRID]> srvctl config serverpool


Server pool name: Free
Importance: 0, Min: 0, Max: -1
Category:
Candidate server names:
Server pool name: Generic
Importance: 0, Min: 0, Max: -1 ! Activate the policy for the weekend
Category:
Candidate server names:
Server pool name: backoffice
Importance: 0, Min: 1, Max: 1
Category:
Candidate server names:
Server pool name: backup
Importance: 1, Min: 2, Max: 2
Category:
Candidate server names:
Server pool name: frontoffice
Importance: 0, Min: 1, Max: 1
Category:
Candidate server names:

77 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Using Policy Sets part 2: check the result
! With an activated weekend policy

raccdb1_4 raccdb1_2

Oracle RAC Oracle RAC


Oracle GI | HUB Oracle GI | HUB
dasher srvpool: backoffice dancer srvpool: backup

[RAC]> srvctl status database -d raccdb1


Instance raccdb1_1 is running on node comet
Instance raccdb1_2 is running on node dancer
Instance raccdb1_3 is running on node vixen
Instance raccdb1_4 is running on node dasher
raccdb1_1 raccdb1_3

Oracle RAC Oracle RAC


[RAC]> srvctl status service -d raccdb1
Oracle GI | HUB Oracle GI | HUB Service backup is running on nodes: comet,dancer
comet srvpool: backup vixen srvpool: frontoffice Service crmsvc is running on nodes: vixen
Service hrsvc is running on nodes: dasher

raccdb1

78 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Adding Server Categories to the picture part 1

[GRID]> su
! Assume you have 2 servers that have better IO
Password:
Use these servers for backups whenever possible
[GRID]> crsctl set server label IOplus
... ! Here comet and dancer have better IO by definition
#On dancer
[GRID]> crsctl set server label Ioplus

[GRID]> crsctl get server label


CRS-4972: Current SERVER_LABEL parameter value is Ioplus
! What you need to do:

[GRID]> crsctl status server comet dancer f


Set up a server category that identifies the servers
Comet Dancer Add the use of the server category to the server pool
NAME=comet NAME=dancer
MEMORY_SIZE=3338 MEMORY_SIZE=3338 ! Define the server pools that utilize the category
CPU_COUNT=1 CPU_COUNT=1 and during which policy activation it shall be used.
CPU_CLOCK_RATE=2132 CPU_CLOCK_RATE=2247
CPU_HYPERTHREADING=0 CPU_HYPERTHREADING=0
CPU_EQUIVALENCY=1000 CPU_EQUIVALENCY=1000
DEPLOYMENT=other
CONFIGURED_CSS_ROLE=hub
DEPLOYMENT=other
CONFIGURED_CSS_ROLE=hub
! You need to restart the cluster stack on
RESOURCE_USE_ENABLED=1 RESOURCE_USE_ENABLED=1 the servers that you modify in this fashion
SERVER_LABEL=IOplus SERVER_LABEL=IOplus
... ...

79 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Adding Server Categories to the picture part 2
! What you need to do:
Set up a server category that identifies the servers -
[GRID]> crsctl add category moreIO
attr "EXPRESSION='SERVER_LABEL co IOplus'" done

[GRID]> crsctl status category moreIO Add the use of the server category to the server pool
NAME=moreIO
ACL=owner:grid:rwx,pgrp:oinstall:rwx,other::r-- ! Define the server pools that utilize the category
ACTIVE_CSS_ROLE=hub and during which policy activation it shall be used
EXPRESSION=(SERVER_LABEL co IOplus)

[GRID]> crsctl modify serverpool ora.backup


-attr "SERVER_CATEGORY=moreIO" -all_policies
! Note: Add the server category usage to the
server pool(s) that require it & specify the
policies that should be altered accordingly
In this example the backup server pool is the one
that will benefit the most and the policies will only
start this server pool as required.

80 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Adding Server Categories to the picture comparison
Before After

[GRID]> crsctl status policy DayTime [GRID]> crsctl status policy DayTime
POLICY POLICY
NAME=DayTime NAME=DayTime
DESCRIPTION= DESCRIPTION=
SERVERPOOL SERVERPOOL
NAME=Free NAME=Free
... ...
SERVERPOOL SERVERPOOL
NAME=ora.backoffice NAME=ora.backoffice
IMPORTANCE=0 IMPORTANCE=0
MAX_SIZE=1 MAX_SIZE=1
MIN_SIZE=1 MIN_SIZE=1
SERVER_CATEGORY= SERVER_CATEGORY=
SERVER_NAMES= SERVER_NAMES=
SERVERPOOL SERVERPOOL
NAME=ora.backup NAME=ora.backup
IMPORTANCE=0 IMPORTANCE=0
MAX_SIZE=0 MAX_SIZE=0
MIN_SIZE=0 MIN_SIZE=0
SERVER_CATEGORY= SERVER_CATEGORY=moreIO
SERVER_NAMES= SERVER_NAMES=
SERVERPOOL SERVERPOOL
NAME=ora.frontoffice NAME=ora.frontoffice
IMPORTANCE=0 IMPORTANCE=0
MAX_SIZE=3 MAX_SIZE=3
MIN_SIZE=3 MIN_SIZE=3
SERVER_CATEGORY= SERVER_CATEGORY=
SERVER_NAMES= SERVER_NAMES=

81 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Using Policy Sets and the effect of Server Categories

raccdb1_4 raccdb1_2 raccdb1_4 raccdb1_2

Oracle RAC Oracle RAC Oracle RAC Oracle RAC


Oracle GI | HUB Oracle GI | HUB Oracle GI | HUB Oracle GI | HUB
dasher srvpool: backoffice dancer srvpool: backup dasher srvpool: frontoffice dancer srvpool: frontoffice

raccdb1_1 raccdb1_3 raccdb1_1 raccdb1_3

Oracle RAC Oracle RAC Oracle RAC Oracle RAC


Oracle GI | HUB Oracle GI | HUB Oracle GI | HUB Oracle GI | HUB
comet srvpool: backup vixen srvpool: frontoffice comet srvpool: frontoffice vixen srvpool: backoffice

raccdb1 raccdb1

82 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Using Policy Sets means changing policies on a push of a button

raccdb1_4 raccdb1_2

Oracle RAC Oracle RAC


Oracle GI | HUB Oracle GI | HUB
dasher srvpool: frontoffice dancer srvpool: backup
backoffice

[GRID]> crsctl modify policyset attr


"LAST_ACTIVATED_POLICY=DayTime

[GRID] srvctl status serverpool


Server pool name: frontoffice
raccdb1_1
raccdb1_1 raccdb1_3 Active Servers count: 3
Server pool name: backoffice
Oracle RAC Oracle RAC Active Servers count: 1
Server pool name: backup
Oracle GI | HUB Oracle GI | HUB Active Servers count: 0

comet srvpool:
srvpool:frontoffice
backup vixen srvpool: frontoffice [RAC]> srvctl status service -d raccdb1
Service backup is not running.
Service crmsvc is running on nodes: dasher,vixen,comet
Service hrsvc is running on nodes: dancer
raccdb1

83 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Using Policy Sets changing policies on the push of a button is fast

[GRID]> date; crsctl modify policyset -attr


raccdb1_4 raccdb1_2 raccdb1_4 raccdb1_2
"LAST_ACTIVATED_POLICY=DayTime"; date
Oracle RAC Oracle RAC Oracle RAC Oracle RAC
Mon Sep 16 19:26:42 PDT 2013
Oracle GI | HUB OracleAttempting
CRS-2673: Oracle GIon| HUB
GI | HUB to stop 'ora.raccdb1.backup.svc' 'dancer' Oracle GI | HUB
dasher srvpool: backoffice CRS-2673: Attempting
dancer srvpool: backup to stop 'ora.raccdb1.backup.svc' on 'comet'
dasher srvpool: frontoffice dancer srvpool: frontoffice
CRS-2677: Stop of 'ora.raccdb1.backup.svc' on 'dancer' succeeded
CRS-2677: Stop of 'ora.raccdb1.backup.svc' on 'comet' succeeded
CRS-2672: Attempting to start 'ora.raccdb1.crmsvc.svc' on 'dancer'
CRS-2672: Attempting to start 'ora.raccdb1.crmsvc.svc' on 'comet'
CRS-2676: Start of 'ora.raccdb1.crmsvc.svc' on 'dancer' succeeded
raccdb1_1 CRS-2676: Start of 'ora.raccdb1.crmsvc.svc' on 'comet'
raccdb1_3 succeeded
raccdb1_1 raccdb1_3
Mon Sep 16 19:26:43 PDT 2013
Oracle RAC Oracle RAC Oracle RAC Oracle RAC
" Time to execute: 1 second!
Oracle GI | HUB Oracle GI | HUB Oracle GI | HUB Oracle GI | HUB
comet srvpool: backup vixen srvpool: frontoffice comet srvpool: frontoffice vixen srvpool: backoffice

raccdb1 raccdb1

84 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
What-If evaluation of policy changes

[RAC]> srvctl status service -d raccdb1


Service backup is not running.
raccdb1_4 raccdb1_2 Service crmsvc is running on nodes: dancer,vixen,dasher
Service hrsvc is running on nodes: comet
Oracle RAC Oracle RAC
Oracle GI | HUB Oracle GI | HUB
[GRID]> crsctl eval activate policy Weekend
dasher srvpool: frontoffice dancer srvpool: backoffice Stage Group 1:
-------------------------------------------------------------------------------
Stage Number Required Action
-------------------------------------------------------------------------------

1 Y Server 'comet' will be moved from pools


[ora.frontoffice] to pools [ora.backup]
Y Server 'dancer' will be moved from pools
[ora.frontoffice] to pools [ora.backup]
raccdb1_1 raccdb1_3 Y Resource 'ora.raccdb1.crmsvc.svc' (1/1) will be
in state [OFFLINE]
Oracle RAC Oracle RAC Y Resource 'ora.raccdb1.crmsvc.svc' (2/1) will be
in state [OFFLINE]

Oracle GI | HUB Oracle GI | HUB 2 Y Resource 'ora.raccdb1.backup.svc' (1/1) will be


in state [ONLINE|INTERMEDIATE] on server[comet]
comet srvpool: frontoffice vixen srvpool: frontoffice Y Resource 'ora.raccdb1.backup.svc' (2/1) will be
in state [ONLINE|INTERMEDIATE] on server
[dancer]

raccdb1

85 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


What-If with Oracle RAC 12c
What-If evaluation of policy changes in various levels

[RAC]> srvctl status service -d raccdb1 [RAC]> srvctl status service -d raccdb1
Service backup is not running. Service backup is not running.
Service crmsvc is running on nodes: dancer,vixen,dasher Service crmsvc is running on nodes: dancer,vixen,dasher
Service hrsvc is running on nodes: comet Service hrsvc is running on nodes: comet

[GRID]> crsctl eval activate policy Weekend -admin -l 'resources' [GRID]> crsctl eval activate policy Weekend -admin -l 'serverpools'

--------------------------------------------------------------------------------
Name Target State Server Effect NAME = Free
-------------------------------------------------------------------------------- ACTIVE_SERVERS =
Cluster Resources
-------------------------------------------------------------------------------- NAME = Generic
ora.mgmtdb ACTIVE_SERVERS =
1 ONLINE ONLINE dasher
ora.raccdb1.backup.svc NAME = ora.backoffice
1 ONLINE ONLINE comet Started ACTIVE_SERVERS = vixen
2 ONLINE ONLINE dancer Started
ora.raccdb1.crmsvc.svc
NAME = ora.backup
1 ONLINE OFFLINE Stopped
2 ONLINE OFFLINE Stopped ACTIVE_SERVERS = comet dancer
3 ONLINE ONLINE dasher
ora.raccdb1.db NAME = ora.frontoffice
1 ONLINE ONLINE comet ACTIVE_SERVERS = dasher
2 ONLINE ONLINE dancer
3 ONLINE ONLINE vixen
4 ONLINE ONLINE dasher
ora.raccdb1.hrsvc.svc
1 ONLINE ONLINE vixen
2 ONLINE OFFLINE
--------------------------------------------------------------------------------

86 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Policy-Management with Oracle RAC 12c
Information on each step on the way

Before After

[GRID]> crsctl modify policyset -attr [GRID]> crsctl modify policyset -attr
"LAST_ACTIVATED_POLICY=NightTime "LAST_ACTIVATED_POLICY=DayTime"

CRS-2673: Attempting to stop 'ora.raccdb1.crmsvc.svc' on 'dancer' CRS-2673: Attempting to stop 'ora.raccdb1.backup.svc' on 'dancer'
CRS-2673: Attempting to stop 'ora.raccdb1.crmsvc.svc' on 'comet' CRS-2673: Attempting to stop 'ora.raccdb1.backup.svc' on 'comet'
CRS-2677: Stop of 'ora.raccdb1.crmsvc.svc' on 'dancer' succeeded CRS-2677: Stop of 'ora.raccdb1.backup.svc' on 'dancer' succeeded
CRS-2677: Stop of 'ora.raccdb1.crmsvc.svc' on 'comet' succeeded CRS-2677: Stop of 'ora.raccdb1.backup.svc' on 'comet' succeeded
CRS-2672: Attempting to start 'ora.raccdb1.backup.svc' on 'dancer' CRS-2672: Attempting to start 'ora.raccdb1.crmsvc.svc' on 'dancer'
CRS-2672: Attempting to start 'ora.raccdb1.backup.svc' on 'comet' CRS-2672: Attempting to start 'ora.raccdb1.crmsvc.svc' on 'comet'
CRS-2676: Start of 'ora.raccdb1.backup.svc' on 'dancer' succeeded CRS-2676: Start of 'ora.raccdb1.crmsvc.svc' on 'dancer' succeeded
CRS-2676: Start of 'ora.raccdb1.backup.svc' on 'comet' succeeded CRS-2676: Start of 'ora.raccdb1.crmsvc.svc' on 'comet' succeeded

87 Copyright 2013, Oracle and/or its affiliates. All rights reserved.


88 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Das könnte Ihnen auch gefallen