Your SlideShare is downloading. ×
Oracle RAC 12c Best Practices with Appendices DOAG2013
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Oracle RAC 12c Best Practices with Appendices DOAG2013

835
views

Published on

Oracle RAC 12c Best Practices …

Oracle RAC 12c Best Practices
+ appendices with advanced configuration examples

Published in: Technology, News & Politics

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
835
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
110
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 11/20/13& 1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle Real Application Clusters (RAC) 12c Best Practices Markus Michalewicz Director of Product Management Oracle Real Application Clusters (RAC) 1&
  • 2. 11/20/13& 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 Oracle’s products remains at the sole discretion of Oracle. 3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Agenda !  !  Preparation of the Servers for Oracle RAC 12c !  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 !  4 Oracle RAC 12c and Standardization Appendices A-C Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 2&
  • 3. 11/20/13& Standardize on Clusters Scalability Clusters increase scalability and HA regardless of DB types used later 42.1 5847 the te: 1 f S nort Impact o cement MO o un Supp on Anno h Oracle rt wit ecati Depr le Resta 12c rac a se b of O Data GI le e rac alon O nd a St GI le ac Or a Or for GI le c ste Clu a GI le rac r a O fo r ste Clu r GI le ac Or GI le ac Or License Costs tion gura r onfi cluste Re-c able n to e High Availability 5 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Standardize on Oracle RAC For all the flexibility you need Scalability C RA le ac Or ac Or C RA cle a Or R le ta es e od eN On rt DB A DB A DB A DB A DB A DB A GI le ac Or ne Onli ine Onl de gra up tc g) Pa rollin ( GI le ac Or ion licat App SU dP h an GI le ac Or Flexibility 6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 3&
  • 4. 11/20/13& Standardize on Oracle RAC and Oracle Multitenant Agility The new standard for Oracle Database Consolidation de No ne O AC eR l ac Or C RA le ac Or GI le ac Or GI le ac Or Consolidation 7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Agenda !  !  Preparation of the Servers for Oracle RAC 12c !  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 !  8 Oracle RAC 12c and Standardization Appendices A-C Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 4&
  • 5. 11/20/13& Preparation of the Servers OS image setup and more !  Setup of the Servers include: –  Setting up network connections !  OS OL 6.4 dasher –  OS OL 6.4 OS OL 6.4 comet 9 Setting up shared storage for all servers dancer !  –  !  OS OL 6.4 Shared storage required Setting up the OS image – here OL 6.4 Suggestion: –  vixen Public and private with switch Use cloning to deploy OS images faster Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Preparation of the Servers Kernel and Oracle preinstall package !  Recommendations: [root@dasher ~]# uname –a Linux dasher 2.6.39-400.17.1.el6uek.x86_64 #1 SMP Fri Feb 22 –  Use OL 6.4+ UEK 18:16:18 PST 2013 x86_64 x86_64 x86_64 GNU/Linux –  Use the Oracle preinstall package !  #Get the pre-install package [root@dasher Desktop]# yum list oracle-* Available for –  ol6_latest ol6_latest –  Oracle Database 11g Rel. 2 –  oracle-rdbms-server-11gR2-preinstall.x86_64 1.0-7.el6 oracle-rdbms-server-12cR1-preinstall.x86_64 1.0-8.el6 Oracle Database 12c Rel. 1 Additional steps to perform after using the pre-install package for an Oracle RAC cluster: !  !  Align UIDs / GUIDs across servers !  Set SELinux to “permissive”, if possible !  10 Add a “grid” user & “dba” group Check large / huge pages settings Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 5&
  • 6. 11/20/13& Agenda !  !  Preparation of the Servers for Oracle RAC 12c !  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 !  11 Oracle RAC 12c and Standardization Appendices A-C 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…? !  !  Standard Cluster !  12 GI for a Cluster Installation Typical Installation Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 6&
  • 7. 11/20/13& 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 resource management in the cluster Leaf Nodes !  Use it as demand requires it !  Inherits all Flex ASM HA capabilities !  Will support more use cases in future DB DB DB B B A A DB –  Efficient High Availability and resource management across tiers A DB !  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. 7&
  • 8. 11/20/13& 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 reconfiguration 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 –  16 Recommended for all configurations Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 8&
  • 9. 11/20/13& 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 ASM network with the private interconnect. •  Using different subnets for the private interconnect is required. 18 –  MOS note 1210883.1 - 11gR2 Grid Infrastructure Redundant Interconnect and ora.cluster_interconnect.haip Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 9&
  • 10. 11/20/13& 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. 10&
  • 11. 11/20/13& Oracle ASM 12c – Overview Oracle ASM 12c Standard Deployment RAC Cluster Database Instance One to One Mapping of ASM Instances to Servers DBA DBB DBB DBB DBC ASM Instance Node1 Shared Disk Groups DBA ASM Instance ASM Node2 ASM Node3 ASM Node4 ASM Node5 ASM ASM Cluster Pool of Storage Disk Group A Disk Group B ASM Disk 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 DBA ASM Instance DBB DBB DBB DBC ASM Instance Node1 Node1 runs as ASM Client to Node4 Node2 Shared Disk Groups Node2 ASM Node3 ASM Node4 Node2 runs as ASM Client to Node3 ASM Node5 Node5 runs as ASM Client to Node4 ASM Cluster Pool of Storage Disk Group A Disk Group B ASM Disk Wide File Striping 22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 11&
  • 12. 11/20/13& 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 grid grid grid 3822 1 4865 1 9592 1 19114 19003 0 0 0 0 08:05 08:06 08:09 09:22 ? ? ? pts/0 00:00:00 00:00:00 00:00:00 00:00:00 asm_pmon_+ASM1 mdb_pmon_-MGMTDB apx_pmon_+APX1 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 –  –  24 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 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 12&
  • 13. 11/20/13& Install Oracle Grid Infrastructure 12c “Advanced Installation” – Prerequisite Checks Part 1 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 Physical memory requirements with Oracle RAC 12c: 4GB grid grid grid oracle 3227 3868 7364 7917 1 1 1 1 0 0 0 0 13:54 13:55 13:57 13:57 ? ? ? ? 00:00:02 00:00:01 00:00:01 00:00:02 asm_pmon_+ASM1 mdb_pmon_-MGMTDB apx_pmon_+APX1 ora_pmon_raccdb1_4 [RAC]> df -h Filesystem ... tmpfs Size Used Avail Use% Mounted on 1.7G 1.3G 475M 73% /dev/shm ... 26 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 13&
  • 14. 11/20/13& Install Oracle Grid Infrastructure 12c “Advanced Installation” – Prerequisite Checks Part 2 Do fix later! 27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Agenda !  !  Preparation of the Servers for Oracle RAC 12c !  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 !  28 Oracle RAC 12c and Standardization Appendices A-C Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 14&
  • 15. 11/20/13& Install the Oracle Database Home Nothing special – just a quick walk through Not the default… 29 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 … 30 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 15&
  • 16. 11/20/13& 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. 31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Agenda !  !  Preparation of the Servers for Oracle RAC 12c !  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 !  32 Oracle RAC 12c and Standardization Appendices A-C Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 16&
  • 17. 11/20/13& Create an Oracle Database What is the default when keeping the preselection in steps 1-4…? !  !  Oracle RAC-based !  33 Policy-managed Non-CDB Database 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. 34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 17&
  • 18. 11/20/13& 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…, but not recommended –  Use ACFS for database files, if you want to !  manage “all data” on a file system !  use advanced functionality such as 35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Milestone What has been installed and configured so far? raccdb1_2 Oracle RAC Oracle RAC Oracle GI for a cluster Oracle GI for a cluster OS OL 6.4 OS OL 6.4 dasher srvpool: frontoffice dancer srvpool: backoffice [RAC]> srvctl status database -d raccdb1 Instance raccdb1_1 is running on node comet Instance raccdb1_2 is running on node dancer [RAC]>srvctl status srvpool -serverpool backoffice -detail Server pool name: backoffice Active servers count: 2 Active server names: comet,dancer NAME=comet STATE=ONLINE NAME=dancer STATE=ONLINE [RAC]> srvctl status srvpool raccdb1_1 Oracle RAC Oracle RAC Oracle GI for a cluster Oracle GI for a cluster OS OL 6.4 comet srvpool: backoffice OS OL 6.4 vixen srvpool: frontoffice Server Active Server Active Server Active Server Active pool name: Free servers count: 0 pool name: Generic servers count: 0 pool name: backoffice servers count: 2 pool name: frontoffice servers count: 2 raccdb1 36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 18&
  • 19. 11/20/13& Create Pluggable Databases Create HR PDB on running instances raccdb1_2 Oracle RAC Oracle RAC Oracle GI for a cluster Create a PDB on a node that hosts a multintenant CDB instance Oracle GI for a cluster dasher srvpool: frontoffice dancer srvpool: backoffice raccdb1_1 Oracle RAC Oracle RAC Oracle GI for a cluster Oracle GI for a cluster comet srvpool: backoffice vixen srvpool: frontoffice raccdb1 37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Create Pluggable Databases Create CRM 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 raccdb1_1 Oracle RAC Oracle RAC Oracle GI for a cluster Oracle GI for a cluster comet srvpool: backoffice vixen srvpool: frontoffice raccdb1 38 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 19&
  • 20. 11/20/13& Agenda !  !  Preparation of the Servers for Oracle RAC 12c !  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 !  39 Oracle RAC 12c and Standardization Appendices A-C Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Post-Creation Steps Create services to balance the workload – part 1 !  Dynamic Database Services raccdb1_2 Oracle RAC Oracle RAC Oracle GI for a cluster dancer srvpool: backoffice For easier management of multitenant CDBs –  For better workload management in the cluster Oracle GI for a cluster dasher srvpool: frontoffice –  [RAC]> srvctl add service -d raccdb1 -s hrsvc -pdb hr serverpool backoffice raccdb1_1 Oracle RAC Oracle RAC Oracle GI for a cluster Oracle GI for a cluster comet srvpool: backoffice !  Start services after creation and as required vixen [RAC]> srvctl add service -d raccdb1 -s crmsvc -pdb crm serverpool frontoffice srvpool: frontoffice raccdb1 40 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 20&
  • 21. 11/20/13& Post-Creation Steps Create services to balance the workload – part 2 !  Pluggable Databases raccdb1_2 raccdb1_4 Oracle RAC Oracle RAC Oracle GI for a cluster Oracle GI for a cluster dasher srvpool: frontoffice –  By default are in mount status after creation –  They need to be opened in either r/o or w/r –  Startup and distribution of Pluggable databases can be automated and optimized using services dancer srvpool: backoffice [RAC]> srvctl status database -d raccdb1 raccdb1_1 raccdb1_3 Oracle RAC Oracle GI for a cluster comet srvpool: backoffice vixen srvpool: frontoffice is is is is running running running running on on on on node node node node comet dancer vixen dasher [RAC]> srvctl status service -d raccdb1 Service crmsvc is running on nodes: vixen,dasher Service hrsvc is running on nodes: comet,dancer raccdb1 41 raccdb1_1 raccdb1_2 raccdb1_3 raccdb1_4 Oracle RAC Oracle GI for a cluster Instance Instance Instance Instance More Information in Appendix C Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Post-Install Steps Check your environment regularly using CVU and RACcheck !  CVU is run regularly as part of the GI stack #CVU is run regularly by default [GRID]> srvctl status cvu CVU is enabled and running on node comet !  Use RACcheck - RAC Configuration Audit Tool –  For details see MOS note 1268927.1 –  New features in 2.2.2 included (latest version 2.2.3): !  Execution as the root user for sysadmin profile e.g. ./raccheck -profile sysadmin !  RACcheck daemon feature to automate execution of RACcheck non-interactively at predefined interval !  Support for Solaris Sparc 11 !  Upgrade best practices for 11.2.0.3, 11.2.0.4 and Oracle Database 12c !  Standard health check is now included in post upgrade 42 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 21&
  • 22. 11/20/13& Log Collection Essentials Use Trace File Analyzer (TFA) to collect Data !  LOGs Goals –  –  LOGs Efficient collection, packaging and transfer of data for customers –  Reduce round trips between customers and Oracle –  Supports 10.2, 11.1, 11.2 and 12.1 –  Oracle RAC Oracle GI dasher Improved comprehensive first failure diagnostics collection Included in the 11.2.0.4 patch set and future versions – including 12c TFA Oracle RAC Oracle GI comet 43 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Log Collection Essentials Use Trace File Analyzer (TFA) to collect Data !  LOGs Approach –  –  One command to collect all information –  Prune large files based on temporal criteria –  Oracle RAC Oracle GI Collect for all relevant components (OS, Grid Infrastructure, ASM, RDBMS) Collect time relevant IPS (incident) packages on RAC nodes –  Collect time relevant CHM/OS, OSWatcher data on all Oracle RAC nodes –  On-demand (default) and Event Driven diagnostic collections dasher LOGs TFA Oracle RAC Oracle GI comet !  44 TFA Collector – MOS note ID 1513912.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 22&
  • 23. 11/20/13& 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 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 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 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 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 Zip file size : 8.6MB Total time taken : 47s. OS Watcher files Pruning Relevant files only ADR Incident files 144MB pruned and compressed down to 8.6MB 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 45 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Post-Install Steps Monitor best practices notes and announcements !  RACcheck - RAC Configuration Audit Tool –  For details see MOS note 1268927.1 !  Great, but as any tool, RACcheck has a release cycle !  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 – –  46 Information Center: Oracle Scalability Grid Infrastructure / Clusterware and Real Application Clusters (RAC) Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 23&
  • 24. 11/20/13& Agenda !  !  Preparation of the Servers for Oracle RAC 12c !  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 !  47 Oracle RAC 12c and Standardization Appendices A-C Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Questions and Answers 48 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 24&
  • 25. 11/20/13& Agenda !  !  Preparation of the Servers for Oracle RAC 12c !  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 !  49 Oracle RAC 12c and Standardization Appendices A-C Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Appendix A: Converting to an Oracle Flex Cluster with Node Conversion Example 50 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 25&
  • 26. 11/20/13& Oracle Flex Cluster Some configuration details !  Oracle Flex Cluster –  Will be the basis for more uses cases in future releases (for resource mgmt) –  Can consist of only HUB-nodes –  [GRID]> crsctl get cluster mode config 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 reconfiguration of the cluster. Cluster is configured as "standard" [GRID]> crsctl get cluster mode status Cluster is running in "standard" mode [GRID]> olsnodes -s -a -t dasher vixen dancer comet Active Active Active Active Hub Hub Hub Hub Unpinned Unpinned Unpinned Unpinned •  Not a Flex Cluster yet. •  An all-Hub Flex Cluster is basically a Standard Cluster !  More Information: –  51 http://docs.oracle.com/cd/E16655_01/rac.121/e17886/ bigcluster.htm#CWADD92560 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle Flex Cluster Converting to Flex Cluster !  More Information: –  [GRID]> srvctl config gns http://docs.oracle.com/cd/E16655_01/rac.121/e17886/ bigcluster.htm#CHDJGBII PRKF-1110 : Neither GNS server nor GNS client is configured on this cluster [GRID]> more /etc/hosts |grep gns 10.1.1.99 mygns mygns.localdomain #Change to root [GRID]> su Password: [GRID]> srvctl add gns -vip mygns [GRID]> srvctl start gns [GRID]> crsctl set cluster mode flex Cluster mode set to "flex » [GRID]> crsctl get cluster mode status Cluster is running in "standard" mode !  Flex Cluster implementations require GNS !  Converting a Flex Cluster requires a cluster restart –  Use “crsctl stop crs” followed by “crsctl start crs” as root –  Hence the difference between “status” and “config” –  Nodes can be restarted in a rolling fashion: [GRID]> date ; hostname ; crsctl get cluster mode status Sat Sep 14 14:43:45 PDT 2013 dasher Cluster is running in "flex" mode [GRID]> date ; hostname ; crsctl get cluster mode status Sat Sep 14 14:43:37 PDT 2013 dancer Cluster is running in "standard" mode [GRID]> crsctl get cluster mode config Cluster is configured as "flex" 52 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 26&
  • 27. 11/20/13& Oracle Flex Cluster Standard to Flex Cluster conversion – what has changed? !  Nothing at first glance… –  An all-Hub Flex Cluster behaves like a Standard Cluster –  When converting from Standard Cluster all nodes are converted into HUB-nodes raccdb1_2 raccdb1_4 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB dasher srvpool: frontoffice dancer srvpool: backoffice [GRID]> crsctl get cluster mode status Cluster is running in "flex" mode [GRID]> olsnodes -a -s -t raccdb1_1 raccdb1_3 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB comet srvpool: backoffice vixen srvpool: frontoffice raccdb1 53 dasher vixen dancer comet Active Active Active Active Hub Hub Hub Hub Unpinned Unpinned Unpinned Unpinned [RAC]> srvctl status database -d raccdb1 Instance Instance Instance Instance raccdb1_1 raccdb1_2 raccdb1_3 raccdb1_4 is is is is running running running running on on on on node node node node comet dancer vixen dasher 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 Password: [GRID]> crsctl get node role config [GRID]> crsctl set node role leaf [GRID]> srvctl config vip -node vixen CRS-4408: Node 'vixen' configured role successfully changed; restart Oracle High Availability Services for new role to take effect. [GRID]> crsctl stop crs [GRID]> crsctl start crs 54 Node 'vixen' configured role is 'leaf' VIP VIP VIP VIP exists: network number 1, hosting node vixen Name: vixen-vip IPv4 Address: 10.1.1.33 IPv6 Address: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 27&
  • 28. 11/20/13& 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_2 raccdb1_4 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB dasher srvpool: frontoffice dancer srvpool: backoffice Oracle RAC Oracle RAC Oracle GI | HUB srvpool: backoffice Server Pool “frontoffice” is a database pool –  Note: all nodes in this example have access to shared storage, which means only the node role changes – storage access is preserved. [RAC]> srvctl status database -d raccdb1 raccdb1_1 comet !  Server vixen moved to Server Pool “FREE” as Oracle GI | LEAF vixen srvpool: FREE Instance raccdb1_1 is running on node comet Instance raccdb1_2 is running on node dancer Instance raccdb1_4 is running on node dasher [RAC]> srvctl status server -servers vixen -detail Server Server Server Server active pools: Free name: vixen state: ONLINE state details: raccdb1 55 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle Flex Cluster Revert role change – server vixen becomes a HUB again raccdb1_2 raccdb1_4 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB dasher srvpool: frontoffice dancer srvpool: backoffice #As root [GRID]> crsctl set node role hub CRS-4408: Node 'vixen' configured role successfully changed; restart Oracle High Availability Services for new role to take effect. [GRID]> crsctl stop crs [GRID]> crsctl start crs [RAC]> srvctl status database -d raccdb1 raccdb1_1 raccdb1_3 Oracle RAC Oracle RAC Oracle GI | HUB Instance Instance Instance Instance raccdb1_1 raccdb1_2 raccdb1_3 raccdb1_4 is is is is running running running running on on on on node node node node comet dancer vixen dasher Oracle GI | HUB comet srvpool: backoffice vixen srvpool: frontoffice raccdb1 56 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 28&
  • 29. 11/20/13& Appendix B: Oracle Flex ASM – Details and Test Scenarios 57 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle Flex ASM Configuration details !  Flex ASM introduces new local resources: –  [GRID]> crsctl stat res -t ------------------------------------------------------------------------------Name Target State Server State details ------------------------------------------------------------------------------Local Resources ------------------------------------------------------------------------------- ora.ASMNET1LSNR_ASM.lsnr ONLINE ONLINE ONLINE ONLINE comet dancer dasher vixen STABLE STABLE STABLE STABLE ONLINE ONLINE ONLINE OFFLINE ONLINE ONLINE ONLINE OFFLINE comet dancer dasher vixen STABLE STABLE STABLE STABLE ONLINE ONLINE ONLINE OFFLINE ... ora.DATA.dg ONLINE ONLINE ONLINE ONLINE ONLINE ONLINE ONLINE OFFLINE comet dancer dasher vixen comet dancer dasher vixen STABLE STABLE STABLE STABLE One “proxy_advm” (per node) !  Used for ACFS access to Flex ASM instances !  Connections from a database instance to an ASM STABLE STABLE STABLE STABLE ONLINE ONLINE ONLINE ONLINE At least one ASM listener –  ... ora.INFRA.dg instance are based on SQLnet using listeners. –  The listener directs the connection to the least loaded ASM instance based on the load metric it maintains. –  The connection details are fetched from CSS global data –  The ASM instance to which the database instance connects to is listed in the database alert log: !  ... ora.proxy_advm ONLINE ONLINE ONLINE ONLINE 58 –  NOTE: ASMB connected to ASM instance +ASM1 (Flex mode; client id 0x10004) The userid and password supplied are also managed automatically. They are supplied while establishing the session, not while connecting. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 29&
  • 30. 11/20/13& 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. ASM instance count: 3 !  Cluster ASM listener: [GRID]> srvctl modify asm -count all –  Flex ASM can have its own network or overlap with the private interconnect network used by RAC DB instances –  Cluster ASM listener: ASMNET1LSNR_ASM,ASMNET2LSNR_ASM It is recommended to configure a full overlap of the private interconnect and the ASM network in current use cases: [GRID]> srvctl status asm ASM is running on comet,dasher,dancer [GRID]> srvctl start asm [GRID]> srvctl status asm ASM is running on comet,vixen,dasher,dancer 59 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 grid grid grid oracle 3840 4093 4548 5092 1 1 1 1 0 0 0 0 09:11 11:35 11:36 11:36 00:00:01 00:00:00 00:00:00 00:00:00 mdb_pmon_-MGMTDB asm_pmon_+ASM1 apx_pmon_+APX1 ora_pmon_raccdb1_4 [GRID]> kill -9 4093 [GRID]> ps -ef |grep pmon grid grid oracle 3840 4548 5092 1 1 1 0 09:11 ? 0 11:36 ? 0 11:36 ? 00:00:01 mdb_pmon_-MGMTDB 00:00:00 apx_pmon_+APX1 00:00:00 ora_pmon_raccdb1_4 3840 1 4548 1 5092 1 5748 1 5793 19013 0 0 0 0 0 09:11 11:36 11:36 11:39 11:39 If an ASM instance is running on all nodes (count all) the ASM instance is restarted upon failure –  If an ASM instance is running on a subset of nodes the ASM instance might be restarted on another node The client using the ASM instance may change !  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 grid oracle grid grid –  –  ? ? ? ? ? ? ? ? pts/1 00:00:01 00:00:00 00:00:00 00:00:00 00:00:00 mdb_pmon_-MGMTDB apx_pmon_+APX1 ora_pmon_raccdb1_4 asm_pmon_+ASM1 grep pmon !  A failure of the APX will lead to a restart of the database instance (on the node) that uses an ACFS file system. [GRID]> asmcmd lsct data DB_Name +APX Status CONNECTED Software_Version 12.1.0.1.0 Compatible_version 12.0.0.0.0 Instance_Name +APX1 Disk_Group DATA [GRID]> ssh vixen /u01/app/12.1.0/grid/bin/asmcmd lsct data DB_Name +APX +APX 60 Status CONNECTED CONNECTED Software_Version 12.1.0.1.0 12.1.0.1.0 Compatible_version 12.0.0.0.0 12.0.0.0.0 Instance_Name +APX2 +APX3 Disk_Group DATA DATA !  More information: –  http://docs.oracle.com/cd/E16655_01/server.121/e17612/ asminst.htm#OSTMG95329 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 30&
  • 31. 11/20/13& Appendix C: Policy-Managed Databases and with Oracle RAC 12c 61 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Policy-Managed Databases with Oracle RAC 12c Database Services !  Database Services –  raccdb1_2 raccdb1_4 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB dasher srvpool: frontoffice Ensure that workload is hosted in the respective server pool with the cardinality defined as part of the policy definition. dancer srvpool: backoffice raccdb1_1 raccdb1_3 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB comet srvpool: backoffice vixen srvpool: frontoffice [GRID]> srvctl status serverpool Server pool name: frontoffice Active Servers count: 2 Server pool name: backoffice Active Servers count: 2 [RAC]> srvctl status service -d raccdb1 Service crmsvc is running on nodes: dasher,vixen Service hrsvc is running on nodes: comet,dancer raccdb1 62 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 31&
  • 32. 11/20/13& Policy-Managed Databases with Oracle RAC 12c Improved HA Management - Startup 3rd 1st !  Defining a Service Startup Order –  Ensure services are started in specified groups and specified order. –  Leverages Serverpool Min and Importance properties raccdb1_2 raccdb1_4 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB dasher srvpool: frontoffice dancer srvpool: backoffice 2nd 4th [GRID]> srvctl config serverpool Server pool name: frontoffice Importance: 10, Min: 2, Max 2 Server pool name: backoffice raccdb1_1 raccdb1_3 Oracle RAC Oracle RAC Oracle GI | HUB comet srvpool: backoffice Importance: 5, Min: 1, Max 1 Server pool name: Free Importance: 0, Min: 0, Max -1 Oracle GI | HUB vixen srvpool: frontoffice raccdb1 63 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 –  raccdb1_4 raccdb1_2 raccdb1_2 Oracle RAC Oracle RAC Oracle GI | HUB Ensures workload isolation between pools –  Less important workloads shutdown transactionally Oracle GI | HUB dasher srvpool: frontoffice Protects against cascade failures due to load –  dancer srvpool: backoffice frontoffice [GRID]> srvctl config serverpool Server pool name: frontoffice Importance: 10, Min: 2, Max 2 Server pool name: backoffice raccdb1_1 raccdb1_3 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB comet srvpool: backoffice vixen srvpool: frontoffice Importance: 5, Min: 1, Max 1 [GRID]> srvctl status serverpool Server pool name: frontoffice Active Servers count: 2 Server pool name: backoffice Active Servers count: 1 raccdb1 64 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 32&
  • 33. 11/20/13& Policy-Managed Databases with Oracle RAC 12c Improved HA Management – Manage Last Service Standing !  Business Critical Services survive multiple failures –  raccdb1_4 raccdb1_2 raccdb1_2 Oracle RAC Oracle RAC Oracle GI | HUB –  Services preserved across multiple failures –  Less important workloads shutdown transactionally Oracle GI | HUB dasher srvpool: frontoffice Most important pool always gets the servers dancer srvpool: backoffice frontoffice [RAC]> srvctl config serverpool Server pool name: frontoffice Importance: 10, Min: 2, Max 2 Server pool name: backoffice raccdb1_1 raccdb1_3 Oracle RAC Oracle RAC Oracle GI | HUB comet srvpool: backoffice srvpool: frontoffice Oracle GI | HUB vixen Importance: 5, Min: 1, Max 1 [RAC]> srvctl status service –db Service crmsrv is running on nodes comet,vixen Service hrsvc is not running srvpool: frontoffice raccdb1 65 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 –  raccdb1_4 raccdb1_2 raccdb1_2 Oracle RAC Oracle RAC Oracle GI | HUB Dynamically controlled by QoS Management –  Planned control via Clusterware or QoSM Policies Oracle GI | HUB dasher srvpool: frontoffice Server Pools sized via Min and Max properties –  dancer srvpool: backoffice frontoffice [GRID]> srvctl modify serverpool –serverpool backoffice –max 1 [RAC]> srvctl config serverpool raccdb1_1 raccdb1_3 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB comet srvpool: backoffice vixen srvpool: frontoffice Server pool name: frontoffice Importance: 10, Min: 2, Max 4 Server pool name: backoffice Importance: 5, Min: 1, Max 1 [RAC]> srvctl status service –db Service crmsrv is running on nodes dasher,dancer,vixen Service hrsvc is not running raccdb1 66 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 33&
  • 34. 11/20/13& 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 –  [GRID]> crsctl modify policyset –attr "LAST_ACTIVATED_POLICY=NightTime“ QoS Management OR CRS-2673: Attempting to stop 'ora.raccdb1.crmsvc.svc' on 'comet' CRS-2673: Attempting to stop 'ora.raccdb1.crmsvc.svc' on 'dancer' CRS-2677: Stop of 'ora.raccdb1.crmsvc.svc' on 'comet' succeeded CRS-2673: Attempting to start 'ora.raccdb1.backup.svc' on 'comet' CRS-2677: Stop of 'ora.raccdb1.crmsvc.svc' on 'dancer' succeeded CRS-2672: Attempting to start 'ora.raccdb1.hrsvc.svc' on 'dancer‘ Server Categories !  Server Categories use server attributes to allow for an active use of differently sized servers –  Policy Sets !  Policy Sets allow for dynamic adjustment to demand changes in an atomic transaction Server Attributes •  NAME •  MEMORY_SIZE! •  CPU_COUNT •  CPU_CLOCK_RATE! •  CPU_HYPERTHREADING! •  CPU_EQUIVALENCY • …! … Oracle Clusterware - CRSCTL 67 Server Categories •  •  •  •  NAME ACL EXPRESSION … 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 –serverpool backup –min 0 –max 2 –importance 20 [GRID] srvctl status serverpool !  Set up policy set with 3 server pools & 3 policies as follows: –  Active Servers count: 1 Server pool name: backup –  backoffice uses one server (MIN_SIZE=1) !  Server pool name: backoffice frontoffice uses three servers (MIN_SIZE=3) !  Active Servers count: 3 Active Servers count: 0 DayTime: !  Server pool name: frontoffice backup does not run during daytime (MIN_SIZE=0) NightTime: !  backoffice uses two servers (MIN_SIZE=2) !  –  frontoffice uses one server (MIN_SIZE=1) !  [GRID]> crsctl modify policyset -file /u01/app/…/policyset.txt backup uses only one server (MIN_SIZE=1) Weekend: !  backoffice uses one server (MIN_SIZE=1) !  68 frontoffice uses one server (MIN_SIZE=1) !  backup uses two servers (MIN_SIZE=2) Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 34&
  • 35. 11/20/13& 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 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: 69 !  Activate the policy for the weekend 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_2 raccdb1_4 Oracle RAC Oracle RAC Oracle GI | HUB dasher srvpool: backoffice Oracle GI | HUB dancer srvpool: backup [RAC]> srvctl status database -d raccdb1 raccdb1_1 raccdb1_3 Oracle RAC raccdb1_1 raccdb1_2 raccdb1_3 raccdb1_4 is is is is running running running running on on on on node node node node comet dancer vixen dasher Oracle RAC Oracle GI | HUB comet Instance Instance Instance Instance srvpool: backup Oracle GI | HUB vixen srvpool: frontoffice [RAC]> srvctl status service -d raccdb1 Service backup is running on nodes: comet,dancer Service crmsvc is running on nodes: vixen Service hrsvc is running on nodes: dasher raccdb1 70 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 35&
  • 36. 11/20/13& Policy-Management with Oracle RAC 12c Adding Server Categories to the picture – part 1 !  Assume you have 2 servers that have better IO [GRID]> su Password: [GRID]> crsctl set server label IOplus ... –  Use these servers for backups whenever possible !  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 [GRID]> crsctl status server comet dancer –f Comet Dancer NAME=comet MEMORY_SIZE=3338 CPU_COUNT=1 CPU_CLOCK_RATE=2132 CPU_HYPERTHREADING=0 CPU_EQUIVALENCY=1000 DEPLOYMENT=other CONFIGURED_CSS_ROLE=hub RESOURCE_USE_ENABLED=1 NAME=dancer MEMORY_SIZE=3338 CPU_COUNT=1 CPU_CLOCK_RATE=2247 CPU_HYPERTHREADING=0 CPU_EQUIVALENCY=1000 DEPLOYMENT=other CONFIGURED_CSS_ROLE=hub RESOURCE_USE_ENABLED=1 SERVER_LABEL=IOplus SERVER_LABEL=IOplus ... !  What you need to do: –  Set up a server category that identifies the servers –  Add the use of the server category to the server pool ... 71 !  Define the server pools that utilize the category and during which policy activation it shall be used. !  You need to restart the cluster stack on the servers that you modify in this fashion 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: [GRID]> crsctl add category moreIO –attr "EXPRESSION='SERVER_LABEL co IOplus'" [GRID]> crsctl status category moreIO –  Set up a server category that identifies the servers done –  Add the use of the server category to the server pool NAME=moreIO ACL=owner:grid:rwx,pgrp:oinstall:rwx,other::r-ACTIVE_CSS_ROLE=hub EXPRESSION=(SERVER_LABEL co IOplus) [GRID]> crsctl modify serverpool ora.backup -attr "SERVER_CATEGORY=moreIO" -all_policies !  Define the server pools that utilize the category and during which policy activation it shall be used !  Note: Add the server category usage to the server pool(s) that require it & specify the policies that should be altered accordingly –  72 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. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 36&
  • 37. 11/20/13& 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 NAME=DayTime DESCRIPTION= SERVERPOOL NAME=Free ... SERVERPOOL NAME=ora.backoffice IMPORTANCE=0 MAX_SIZE=1 MIN_SIZE=1 SERVER_CATEGORY= SERVER_NAMES= SERVERPOOL NAME=ora.backup IMPORTANCE=0 MAX_SIZE=0 MIN_SIZE=0 SERVER_CATEGORY= SERVER_NAMES= SERVERPOOL NAME=ora.frontoffice IMPORTANCE=0 MAX_SIZE=3 MIN_SIZE=3 SERVER_CATEGORY= SERVER_NAMES= 73 POLICY NAME=DayTime DESCRIPTION= SERVERPOOL NAME=Free ... SERVERPOOL NAME=ora.backoffice IMPORTANCE=0 MAX_SIZE=1 MIN_SIZE=1 SERVER_CATEGORY= SERVER_NAMES= SERVERPOOL NAME=ora.backup IMPORTANCE=0 MAX_SIZE=0 MIN_SIZE=0 SERVER_CATEGORY=moreIO SERVER_NAMES= SERVERPOOL NAME=ora.frontoffice IMPORTANCE=0 MAX_SIZE=3 MIN_SIZE=3 SERVER_CATEGORY= SERVER_NAMES= 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_2 raccdb1_4 Oracle RAC Oracle GI | HUB dasher srvpool: backoffice Oracle GI | HUB dancer srvpool: backup raccdb1_2 raccdb1_4 Oracle RAC Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB 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 comet srvpool: backup Oracle GI | HUB vixen raccdb1 74 srvpool: frontoffice Oracle GI | HUB comet srvpool: frontoffice Oracle GI | HUB vixen srvpool: backoffice raccdb1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 37&
  • 38. 11/20/13& Policy-Management with Oracle RAC 12c Using Policy Sets means changing policies on a push of a button raccdb1_2 raccdb1_4 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“ raccdb1_1 raccdb1_1 [GRID] Server Active Server Active Server Active raccdb1_3 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB comet srvpool: frontoffice srvpool: backup vixen srvpool: frontoffice srvctl status serverpool pool name: frontoffice Servers count: 3 pool name: backoffice Servers count: 1 pool name: backup Servers count: 0 [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 75 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 … raccdb1_4 Oracle RAC Oracle GI | HUB dasher srvpool: backoffice raccdb1_1 Oracle RAC Oracle GI | HUB comet srvpool: backup [GRID]> date; crsctl modify policyset -attr raccdb1_2 "LAST_ACTIVATED_POLICY=DayTime"; date vixen raccdb1 76 srvpool: frontoffice comet raccdb1_2 raccdb1_4 Oracle RAC Oracle RAC Mon Sep 16 19:26:42 PDT 2013 Oracle GI | 'dancer' Oracle GI | HUB CRS-2673: Attempting to stop 'ora.raccdb1.backup.svc' on HUB CRS-2673: Attempting to stop 'ora.raccdb1.backup.svc' onfrontoffice dancer srvpool: backup dasher srvpool: 'comet' 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 CRS-2676: Start of 'ora.raccdb1.crmsvc.svc' on 'comet' succeeded raccdb1_1 raccdb1_3 Mon Sep 16 19:26:43 PDT 2013 Oracle RAC Oracle RAC " Time to execute: 1 second! Oracle GI | HUB Oracle GI | HUB srvpool: frontoffice Oracle RAC Oracle GI | HUB dancer srvpool: frontoffice raccdb1_3 Oracle RAC Oracle GI | HUB vixen srvpool: backoffice raccdb1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 38&
  • 39. 11/20/13& Policy-Management with Oracle RAC 12c What-If evaluation of policy changes [RAC]> srvctl status service -d raccdb1 raccdb1_2 raccdb1_4 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB dasher srvpool: frontoffice dancer srvpool: backoffice Service backup is not running. Service crmsvc is running on nodes: dancer,vixen,dasher Service hrsvc is running on nodes: comet [GRID]> crsctl eval activate policy Weekend Stage Group 1: ------------------------------------------------------------------------------Stage Number Required Action ------------------------------------------------------------------------------1 Y Y raccdb1_1 raccdb1_3 Oracle RAC Oracle RAC Oracle GI | HUB Oracle GI | HUB comet srvpool: frontoffice vixen Y Y 2 Y srvpool: frontoffice Y Server 'comet' will be moved from pools [ora.frontoffice] to pools [ora.backup] Server 'dancer' will be moved from pools [ora.frontoffice] to pools [ora.backup] Resource 'ora.raccdb1.crmsvc.svc' (1/1) will be in state [OFFLINE] Resource 'ora.raccdb1.crmsvc.svc' (2/1) will be in state [OFFLINE] Resource in state Resource in state [dancer] 'ora.raccdb1.backup.svc' [ONLINE|INTERMEDIATE] on 'ora.raccdb1.backup.svc' [ONLINE|INTERMEDIATE] on (1/1) will be server[comet] (2/1) will be server raccdb1 77 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 Service backup is not running. Service crmsvc is running on nodes: dancer,vixen,dasher Service hrsvc is running on nodes: comet [GRID]> crsctl eval activate policy Weekend -admin -l 'resources' -------------------------------------------------------------------------------Name Target State Server Effect -------------------------------------------------------------------------------Cluster Resources -------------------------------------------------------------------------------ora.mgmtdb 1 ONLINE ONLINE dasher ora.raccdb1.backup.svc 1 ONLINE ONLINE comet Started 2 ONLINE ONLINE dancer Started ora.raccdb1.crmsvc.svc 1 ONLINE OFFLINE Stopped 2 ONLINE OFFLINE Stopped 3 ONLINE ONLINE dasher ora.raccdb1.db 1 ONLINE ONLINE comet 2 ONLINE ONLINE dancer 3 ONLINE ONLINE vixen 4 ONLINE ONLINE dasher ora.raccdb1.hrsvc.svc 1 ONLINE ONLINE vixen 2 ONLINE OFFLINE -------------------------------------------------------------------------------- 78 [RAC]> srvctl status service -d raccdb1 Service backup is not running. Service crmsvc is running on nodes: dancer,vixen,dasher Service hrsvc is running on nodes: comet [GRID]> crsctl eval activate policy Weekend NAME = Free ACTIVE_SERVERS = NAME = Generic ACTIVE_SERVERS -admin -l 'serverpools' = NAME = ora.backoffice ACTIVE_SERVERS = vixen NAME = ora.backup ACTIVE_SERVERS = comet dancer NAME = ora.frontoffice ACTIVE_SERVERS = dasher Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 39&
  • 40. 11/20/13& Policy-Management with Oracle RAC 12c Information on each step on the way Before After [GRID]> crsctl modify policyset -attr "LAST_ACTIVATED_POLICY=NightTime“ [GRID]> crsctl modify policyset -attr "LAST_ACTIVATED_POLICY=DayTime" CRS-2673: CRS-2673: CRS-2677: CRS-2677: CRS-2672: CRS-2672: CRS-2676: CRS-2676: CRS-2673: CRS-2673: CRS-2677: CRS-2677: CRS-2672: CRS-2672: CRS-2676: CRS-2676: Attempting to stop 'ora.raccdb1.crmsvc.svc' on 'dancer' Attempting to stop 'ora.raccdb1.crmsvc.svc' on 'comet' Stop of 'ora.raccdb1.crmsvc.svc' on 'dancer' succeeded Stop of 'ora.raccdb1.crmsvc.svc' on 'comet' succeeded Attempting to start 'ora.raccdb1.backup.svc' on 'dancer' Attempting to start 'ora.raccdb1.backup.svc' on 'comet' Start of 'ora.raccdb1.backup.svc' on 'dancer' succeeded Start of 'ora.raccdb1.backup.svc' on 'comet' succeeded 79 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 80 Attempting to stop 'ora.raccdb1.backup.svc' on 'dancer' Attempting to stop 'ora.raccdb1.backup.svc' on 'comet' Stop of 'ora.raccdb1.backup.svc' on 'dancer' succeeded Stop of 'ora.raccdb1.backup.svc' on 'comet' succeeded Attempting to start 'ora.raccdb1.crmsvc.svc' on 'dancer' Attempting to start 'ora.raccdb1.crmsvc.svc' on 'comet' Start of 'ora.raccdb1.crmsvc.svc' on 'dancer' succeeded Start of 'ora.raccdb1.crmsvc.svc' on 'comet' succeeded Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 40&