high availability and consolidation with se1 / se2 ... availability and consolidation with se1 / se2...
TRANSCRIPT
High Availability and Consolidation with SE1 / SE2
(without Virtualisation)
Susanne Jahr
DOAG-Konferenz Nürnberg 19.11.2015
Herrmann & Lenz Services GmbH Herrmann & Lenz Solutions GmbH • Successful in the market since 1996 • Head Office: Burscheid (near Leverkusen) • Consulting, training and operation/remote maintenance on
the topic of the Oracle Database • Focus: High availability, tuning, migrations and
troubleshooting / monitoring • Herrmann & Lenz Solutions GmbH
– Products: Monitoring Module, Taskzone – Booth on level 2 (236)
2 2
Overview
• Initial Situation
• Idea
• Realisation
• Conclusion
3
Initial Situation
4
Situation
• Multiple databases SE1
• Virtual environment with ESX-Cluster already in place
• Requirements: High Availability, databases are needed for production control
Problem: Licensing Oracle and VM
Environment with Vsphere version Oracle-Licensing
6
Entire VCenter
Entire Environment…?
Entire Cluster
< 5.0: Migration within a cluster
>= 5.0: Migration within a Vcenter (cross-cluster)
>= 6.0: cross-Vcenter-migration possible
Idea
7
What if we provided HA without Virtualisation?
• We used to do that, didn't we…?
• High Availability of the database
• As little down time as possible during a maintenance window
• License costs not growing incontrollably
8
Alternative: HA with Oracle GI
• Cluster consisting of 2 or more phsyical servers with Oracle Grid Infrastructure
• No RAC installation but single-instance installations on each node
• Prerequisite: Hardware restrictions in SE1 / SE2 must be met
Alternative: HA with Oracle GI (2)
• Advantages
– Database(s) as cluster resource(s)
– Further use of existing SE1-licenses
„…Oracle Clusterware may be used to protect any application (restarting or failing over
the application in the event of a failure) on any server, free of charge. Oracle will provide support for Clusterware only if the server is running an Oracle product, which
may include Oracle Linux or Oracle Solaris, that is also under Oracle support. …“
Source: Oracle Database Licensing Information 12c Release 1
Realisation
11
Test Scenario
• Grid Infrastructure configuration with two blades
• Flex-ASM (no GNS subdomain)
• Single instance installations SE1 on each Server
12
Test Scenario (2)
13
Source: Oracle Clusterware Administration and Deployment Guide
Test-Szenario (3)
14
Database Configuration
• CREATE DATABASE as Single Instance on one node with ASM (Shared Storage) and OMF
• Entry in /etc/oratab on both nodes
• Pointer to spfile within ASM in $ORACLE_HOME/dbs/init<SID>.ora on both nodes
15
Database Configuration (2)
• Database is NOT registered in the clusterware with srvctl add database
• Registration as a cluster resource is necessary to benefit from the advantages of the GI configuration
• Registration with crsctl add resource • Prerequisites:
– Action Script definition of actions for start, stop and check events
– Configuration file resource creation and administration
16
Action Script
• Accessible from any node
• More scripts may be called from here
• This means: Storage
– On every node or
– Within Shared Storage (ACFS-Volume)
17
Action Script (2)
• Creation of separate disk group acfsdg and ACFS-Volume acfsvol1
18
ASMCMD [+] > volinfo -G acfsdg acfsvol1
Diskgroup Name: ACFSDG
Volume Name: ACFSVOL1
Volume Device: /dev/asm/acfsvol1-265
State: ENABLED
Size (MB): 5120
Resize Unit (MB): 64
Redundancy: UNPROT
Stripe Columns: 8
Stripe Width (K): 1024
mkfs -t acfs /dev/asm/acfsvol1-265
mkfs.acfs: version = 12.1.0.2.0
mkfs.acfs: on-disk version = 39.0
mkfs.acfs: volume = /dev/asm/acfsvol1-265
mkfs.acfs: volume size = 5368709120 (5.00 GB)
mkfs.acfs: Format complete.
[root@test-ora12-rac1 ~]# acfsutil registry -a /dev/asm/acfsvol1-265
/acfsmounts/acfsvol1
acfsutil registry: mount point /acfsmounts/acfsvol1 successfully added to Oracle
Registry
Action Script (3) … 'start') $SWITCH_USER "$ACTION_SRC/crs_res/start_oracle.sh"
RET=$?
;;
'stop') $SWITCH_USER "$ACTION_SRC/crs_res/stop_oracle.sh"
RET=$?
;;
'clean') $SWITCH_USER "$ACTION_SRC/crs_res/stop_oracle_abort.sh"
RET=$?
;;
'check') EXISTS=`ps -ef | grep pmon | grep $ORA_SID | wc -l`
if [ $EXISTS = 0 ]; then
RET=1
else
RET=0
fi
;;
… 19
Database Resource
• Dependencies: – (SCAN-)Listener
– Disk Group(s)
• Start on max. one node
• List of potential hosts
• Permissions for the oracle-User
• Storage location of the action script
20
Configuration Database Resource TYPE=cluster_resource ACL=owner:oracle:rwx,pgrp:dba:rwx,other::r-- ACTION_SCRIPT=/acfsmounts/acfsvol1/crs_res/ora12_action.scr ACTIVE_PLACEMENT=0 AUTO_START=restore CARDINALITY=1 CHECK_INTERVAL=10 DEGREE=1 DESCRIPTION=Resource ORA12 DB ENABLED=1 HOSTING_MEMBERS=test-ora12-rac1 test-ora12-rac2 LOAD=1 LOGGING_LEVEL=1 PLACEMENT=restricted RESTART_ATTEMPTS=1 START_DEPENDENCIES=hard(ora.DATA.dg,ora.acfsdg.acfsvol1.acfs) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,global:ora.gns) pullup(ora.DATA.dg,ora.acfsdg.acfsvol1.acfs) START_TIMEOUT=600 STOP_DEPENDENCIES=hard(intermediate:ora.asm,shutdown:ora.DATA.dg) STOP_TIMEOUT=600 UPTIME_THRESHOLD=1h
21
Anlage der Ressource app.ora12.db
crsctl add resource app.ora12.db -type
cluster_resource -file
/acfsmounts/acfsvol1/crs_res/ora.ora12.conf
• Important:
– Don't try to use a name like ora.xxx
– Use some other prefix like app.xxx instead – the ora.xxx prefix is reserved for Oracle resources
22
Start of the Resource app.ora12.db
crsctl start res app.ora12.db
• Check with:
crsctl stat res app.ora12.db –p
or
crsctl stat res -t
---------------------------------------------------- Name Target State Server State details …
---------------------------------------------------- Cluster Resources ---------------------------------------------------- …
app.ora12.db 1 ONLINE ONLINE test-ora12-rac2 STABLE
23
Extended Configuration
• Multiple Server • Multiple Databases • Load distribution by defining different hosts in
the host list of each resource • One config file per resource • HA also for applications • …
24
Conclusion
25
Test Results
• Resource administration passed the tests – Start
– Stop
– Manual relocation
– Autostart after system reboot
• Transparent for the application due to registration with the SCAN listeners
26
Conclusion
Implementation is operational Requirements in terms of licensing are met Can't compete with a complex VMWare environment technically as these are able to do a (planned) live migration between physically different hardware without any application downtime Is a low cost alternative to RAC, however some restrictions Can be an alternative to VMWare if a short downtime in case of relocation / failover is acceptable
27
Questions & Contact
• Mail: [email protected] • Web: www.hl-services.de • Blog: blog.hl-services.de • Twitter: @soesa69 • Live: Exhibition, booth 236 Level 2 (yellow), 2. booth on the left from the
escalator
28