115
Our Awards: Zahid Anwar, Senior Oracle DBA Consultant, Version 1 Clive Archibald, Senior Oracle DBA, Telefonica UK 9th December 2015 Deploying Oracle 12c Cloud Control in a Maximum Availability Architecture

UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Embed Size (px)

Citation preview

Page 1: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Our Awards:Our Awards:

Zahid Anwar, Senior Oracle DBA Consultant, Version 1

Clive Archibald, Senior Oracle DBA, Telefonica UK

9th December 2015

Deploying Oracle 12c Cloud Control in

a Maximum Availability Architecture

Page 2: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Introducing Version 1

A values-driven organisation that aims to prove that IT

can make a real difference to our clients’

businesses

IT Transformation to deliver business benefit in a

cost efficient manner through our service excellence,

innovation and service improvement

A circa. €75/£53m, 700-strong business with bases

across the UK and Ireland.

Broader and better than niche players, better

service than global players, nearshore and onshore

rather than offshore; values-driven approach to

delivering trusted advice to customers

Page 3: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Our History

Page 4: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Enterprise Architecture & Change

Microsoft Solutions

Oracle Solutions

Development Technologies and Services

Business Intelligence & Analytics

Infrastructure & Cloud Services

Licence Management

Section 1 - Introducing Version 1<Insert name>4 Main Sectors

3 Key Technology Specialisations 2 Delivery Practices

7 Areas of Deep Expertise

Business Solutions

Managed Services

About Version 1

26%

21%35%

18% Commercial

Financial

Public

Utilities

Page 5: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

A bit about myself

• Senior Oracle DBA Consultant

• 10+ years experience

• Recently become an Oracle Certified Master, 2nd in Version 1

• Aspiring to become an Oracle Ace

• Oracle Certified RAC Expert, Exadata and ODA Specialist

• Follow me on:

– facebook.ZedDBA.co.uk (blog)

– twitter.ZedDBA.co.uk or @ZedDBA

– LinkedIn.ZedDBA.co.uk

– www.ZedDBA.co.uk (coming soon!)

Page 6: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

A bit about Clive

• Senior Oracle Database Administrator

• 15+ years Oracle experience and 25+ years in IT

• Oracle Certified Professional (OCP) 10g & 11g

• Oracle Certified RAC Expert 10g

• Oracle Certified SQL Expert

• In the process of attaining the OCP 12c

• Keen wildlife photographer

• Follow me on:

– https://uk.linkedin.com/in/clivearchibald

– www.ukfozz.co.uk

Page 7: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture
Page 8: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Smart Metering Project

• Large Government Project

• Telefonica won 2/3rds of the UK, +/- 20 million smart meters by 2020

• Database Infrastructure includes a number of:

– Oracle Exadata Machines X4-2

– Oracle Database Appliances X4-2

– Oracle Database Appliances X5-2

Page 9: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Assumptions

• Experienced DBAs who can:

– Understand and deploy RAC

– Understand and deploy Data Guard

• Technical Deep Dive:

– Will go into details for 12c Cloud Control

– But not for RAC and Data Guard

Page 10: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Key Components in a Cloud Control Deployment

Data Centre 2

Data Centre 1

Agents/Targets

Console & EMCLI

OMS

SW Lib

Repository<1 ms

Agents/Targets

JDBC

Page 11: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Oracle’s official way to

“Deploying 12c Cloud Control in a MAA”

with our tweaks

Links to Oracle’s White Paper are available at the end of the presentation

Page 12: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Requirements for 12c MAA

• For each Data Centre:

– Minimum of 2 node RAC database cluster for EM repository database

– Minimum of 2 servers for Oracle Management Servers (OMS)

– Server Load Balancer (e.g. f5 SLB)

– Storage appliance for OMS installations and Software Library

• Needs to support replication between primary and standby sites

• Needs to support snapshots so that point-in-time consistent copies

can be taken

• e.g. ZFS, NetApp, etc

Page 13: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RAC

WebTier Cluster

em.example.com

EMREPDC11

FAS3250FAS3250

Agents/Targets Console & EMCLI

DNS

Load Balancer

dc1em01.example.com

OMS1

SW Lib OMS1 OMS2

EMREPDC1

EMREPDC12

dc1em02.example.com

OMS2

FAS3250FAS3250

Load Balancer

dc2em01.example.com

SW Lib OMS1 OMS2

EMREPDC2

dc2em02.example.com

DC1 DC2Active Passive

Data Guard

Snap Mirror

Active Active PassivePassive

RAC

WebTier Cluster

EMREPDC21

OMS1

EMREPDC22

OMS2

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

JDBC JDBC

NetworkLayer

WebTierLayer

DatabaseLayer

StorageLayer

Page 14: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Database Layer

Page 15: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Grid Infrastructure and Database Software Install

• Install the following on all nodes in the RAC cluster for the Repository database:

– Grid Infrastructure 11gR2 (11.2.0.4) binaries installed and configured

– Oracle Database 11gR2 (11.2.0.4) binaries installed and configured

– Apply latest PSU to both GI and RDBMS

– SCAN listeners configured

– ASM is optional but recommended

– dc1emrep01 and dc1emrep02 form dc1emrep cluster

– dc2emrep01 and dc2emrep02 form dc2emrep cluster

Page 16: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

DC1 DC2

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

Page 17: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

EMREP Database Creation

• Database Edition: Enterprise Edition

• Global Database Name: EMREP

• Database Unique Name: EMREPDC1

• Options: Oracle Partitioning

• Specify Fast Recovery Area

• Automatic Memory Management: 12G

• Database and National Character Set: AL32UTF8 and AL16UTF16

• Enable Archive Log Mode, Flashback and Force Logging required for Data Guard

• Processes: 800

• If using DBCA:

– Template: Custom database (Includes Datafiles: No)

– Don’t “Configure Enterprise Manager”

– Uncheck “Database Components”

Page 18: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

EMREP Database Creation continued…

• ASM:

• +DATA for Data

• +FRA for Fast Recovery Area

• Cluster File System (e.g. ZFS, NetApp):

• /u01/app/oracle/oradata for data

– owner oracle:oinstall and file permissions 755

• /u01/app/oracle/fast_recovery_area for Fast Recovery Area

– owner oracle:oinstall and file permissions 755

Page 19: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

EMREP Database Post Tasks

• Change the following and restart Database:

ALTER SYSTEM SET job_queue_processes=50 SCOPE=SPFILE;

ALTER SYSTEM SET open_cursors=400 SCOPE=SPFILE;

ALTER SYSTEM SET shared_pool_size=1G;

ALTER SYSTEM SET session_cached_cursors=250 SCOPE=SPFILE;

ALTER USER DBSNMP ACCOUNT UNLOCK;

• Create Database Service that runs only on primary for EM to connect to:

srvctl add service -d EMREP -s EMREPMAA -r EMREP1,EMREP2 -P

BASIC -l PRIMARY

Page 20: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RACEMREPDC11

EMREPDC1

EMREPDC12

DC1 DC2

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

Page 21: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Storage Layer

Page 22: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Preparing Shared Storage for OMSs and Software Library

• ZFS:

– Storage pool: dc1em (in DC1) and dc2em (in DC2) (300Gb – Double Parity)

• Project: OMS, share: OMS1 and OMS2 60Gb each, mount as /em,

continuous replication

• Project: SWLIB, share: swlib 100Gb, mount as /swlib, continuous

replication

• NetApp:

– Volume: dc1oms (in DC1) and dc2oms (in DC2), 120Gb each – on DP

Aggregate, mount as /em_share, SnapMirror every 15 minutes

– Volume: dc1swlib (in DC1) and dc2swlib (in DC2), 100Gb – on DP

Aggregate, mount as /swlib, SnapMirror every 5 minutes

Page 23: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RACEMREPDC11

FAS3250FAS3250

SW Lib OMS1 OMS2

EMREPDC1

EMREPDC12

DC1 DC2

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

Page 24: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

OMS Layer

Page 25: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Preparing OMS Nodes (ZFS)

• Change ownership and file permissions:

chown oracle:oinstall /em

chown oracle:oinstall /swlib

chmod 775 /em

chmod 775 /swlib

• Create the software lib sub-directory:

mkdir –p /swlib/software

Page 26: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Preparing OMS Nodes (NFS)

• Change ownership and file permissions:

chown oracle:oinstall /em_share

chown oracle:oinstall /swlib

chmod 775 /em_share

chmod 775 /swlib

• Create the software lib sub-directory:

mkdir –p /swlib/software

Page 27: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Preparing OMS Nodes (NFS) continued…

• Create symbolic links on each OMS node to give a common path (/em) to a

shared storage (/em_share):

• 1st OMS node:

mkdir -p /em_share/OMS1

su -

ln -s /em_share/OMS1 /em

exit

• 2nd OMS node:

mkdir -p /em_share/OMS2

su -

ln -s /em_share/OMS2 /em

exit

Page 28: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Preparing OMS Nodes continued…

• On dc1em1 and dc1em02 add the following to /etc/hosts:

127.0.0.1 localhost localhost.localdomain

10.1.1.1 dc1em01.example.com dc1em01 ## Physical OMS Host Details

10.1.1.2 dc1em02.example.com dc1em02 ## Physical OMS Host Details

10.1.1.1 em01.example.com em01 ## Virtual OMS Host Details

10.1.1.2 em02.example.com em02 ## Virtual OMS Host Details

• On dc2em01 and dc2em02 add the following to /etc/hosts:

127.0.0.1 localhost localhost.localdomain

10.1.2.1 dc2em01.example.com dc2em01 ## Physical OMS Host Details

10.1.2.2 dc2em02.example.com dc2em02 ## Physical OMS Host Details

10.1.2.1 em01.example.com em01 ## Virtual OMS Host Details

10.1.2.2 em02.example.com em02 ## Virtual OMS Host Details

Page 29: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RACEMREPDC11

FAS3250FAS3250

dc1em01.example.com

SW Lib OMS1 OMS2

EMREPDC1

EMREPDC12

dc1em02.example.com dc2em01.example.com dc2em02.example.com

DC1 DC2

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

Page 30: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Before installing the OMS, we need to create shared Oracle Inventory that

will move with the OMS through the shared storage:

vi /etc/oraInst_OMS.loc

inventory_loc=/em/oraInventory

inst_group=oinstall

chmod 644 /etc/oraInst_OMS.loc

chown root:root /etc/oraInst_OMS.loc

./runInstaller -invPtrLoc /etc/oraInst_OMS.loc

• The default Oracle Inventory pointer file and location is intentionally not

used, which will become apparent later on

12c Cloud Control Install

Page 31: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

12c Cloud Control Install continued…

• Important: the oracle inventory needs to be on shared storage /em:

/em/oraInventory

Page 32: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

12c Cloud Control Install continued…

• Advanced install:

Page 33: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Middleware and Agent on /em/Middleware and /em/Agent:

12c Cloud Control Install continued…

em01.example.com

Important Virtual Hostname to be used here!

Accept the warning that:“Installer has detected host name as dc1em01.example.com, you have changed that host name to em01.example.com.”

/em/Middleware/em/Agent

Page 34: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

12c Cloud Control Install continued…

• Enter credentials and leave OMS Instance Base Location as default:

Page 35: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Enter database connection details:

12c Cloud Control Install continued…

dc1emrep-scan.example.com

emrepmaa1521

••••••

Page 36: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

12c Cloud Control Install continued…

• Enter credentials, datafiles and software library location (including sub-dir):

/swlib/software

Page 37: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

12c Cloud Control Install continued…

• Ports that will be used in the installation:

Page 38: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

12c Cloud Control Install continued…

./em/Middleware/oms/bin/emctl status oms –details

Oracle Enterprise Manager Cloud Control 12c Release 4

Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.

Enter Enterprise Manager Root (SYSMAN) Password :

Console Server Host : em01.example.com

HTTP Console Port : 7788

HTTPS Console Port : 7799

HTTP Upload Port : 4889

HTTPS Upload Port : 4900

EM Instance Home : /em/gc_inst/em/EMGC_OMS1

OMS Log Directory Location : /em/gc_inst/em/EMGC_OMS1/sysman/log

OMS is not configured with SLB or virtual hostname

Agent Upload is locked.

OMS Console is locked.

Active CA ID: 1

Console URL : https://em01.example.com:7799/em

Upload URL : https://em01.example.com:4900/empbs/upload

WLS Domain Information

Domain Name : GCDomain

Admin Server Host : em01.example.com

Admin Server HTTPS Port : 7101

Admin Server is RUNNING

Managed Server Information

Managed Server Instance Name : EMGC_OMS1

Managed Server Instance Host : em01.example.com

WebTier is Up

Oracle Management Server is Up

Page 39: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

12c Cloud Control Install continued…

./em/Middleware/oms/bin/emctl config oms -list_repos_details

Oracle Enterprise Manager Cloud Control 12c Release 4

Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.

Repository Connect Descriptor :

(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dc1emrep-scan.example.com)(PORT=1521)))

(CONNECT_DATA=(SERVICE_NAME=emrepmaa)))

Repository User : SYSMAN

Page 40: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

12c Cloud Control Install continued…

./em/Middleware/oms/bin/emctl status agent

Oracle Enterprise Manager Cloud Control 12c Release 4

Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.

---------------------------------------------------------------

Agent Version : 12.1.0.4.0

OMS Version : 12.1.0.4.0

Protocol Version : 12.1.0.1.0

Agent Home : /em_share/OMS1/Agent/agent_inst

Agent Log Directory : /em_share/OMS1/Agent/agent_inst/sysman/log

Agent Binaries : /em/Agent/core/12.1.0.4.0

Agent Process ID : 9022

Parent Process ID : 8954

Agent URL : https://em01.example.com:3872/emd/main/

Local Agent URL in NAT : https://em01.example.com:3872/emd/main/

Repository URL : https://em01.example.com:4900/empbs/upload

Started at : 2015-01-20 18:27:32

Started by user : oracle

Operating System : Linux version 2.6.32-431.el6.x86_64 (amd64)

Last Reload : (none)

Last successful upload : 2015-01-21 09:52:00

Last attempted upload : 2015-01-21 09:52:00

Total Megabytes of XML files uploaded so far : 2.05

Number of XML files pending upload : 0

Size of XML files pending upload(MB) : 0

Available disk space on upload filesystem : 91.50%

Collection Status : Collections enabled

Heartbeat Status : Ok

Last attempted heartbeat to OMS : 2015-01-21 09:53:00

Last successful heartbeat to OMS : 2015-01-21 09:53:00

Next scheduled heartbeat to OMS : 2015-01-21 09:54:09

--------------------------------------------------------------

Agent is Running and Ready

Page 41: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Backup EMREP database

• Patch OMS to latest PSU

• Change the lock file location from shared storage to local disk (at earliest convenience):

su root

mkdir –p /em_lock

chown oracle:oinstall /em_lock

chmod 774 /em_lock

vi /em/gc_inst/WebTierIH1/config/OHS/ohs1/httpd.conf

For the lines “MPM Prefork Module” & “MPM Worker Module”, change the LockFile to be:

LockFile "/em_lock/http_lock“

Restart OMS:

emctl stop oms

emctl start oms

12c Cloud Control Install – Post Tasks

Page 42: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RAC

WebTier Cluster

EMREPDC11

FAS3250FAS3250

dc1em01.example.com

OMS1

SW Lib OMS1 OMS2

EMREPDC1

EMREPDC12

dc1em02.example.com dc2em01.example.com dc2em02.example.com

DC1 DC2

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

JDBC

Page 43: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Network Layer

Page 44: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Configure SLBs – Create Health Monitors

Page 45: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Configure SLBs – Create TCP Profiles

• Create 2 TCP Profiles at each Data Centre (with default settings):

• 1 for the Secure Console

• 1 for the Secure Upload

Page 46: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Configure SLBs – Create Pools

dc1em01.example.com:7799dc1em02.example.com:7799

dc1em01.example.com:4900dc1em02.example.com:4900

dc2em01.example.com:7799dc2em02.example.com:7799

dc2em01.example.com:4900dc2em02.example.com:4900

Page 47: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Configure SLBs – Persistence Profile

Page 48: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Configure SLBs – Create Virtual Servers

Page 49: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Configure SLBs – Summary

pool_ccsc7799

pool_ccsu4900

Page 50: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Update OMS Configuration

• Add Virtual Server Name into DNS:

em.example.com CNAME em_slb_dc1.example.com (TTL 60)

em_slb_dc1.example.com A 123.1.2.110

em_slb_dc2.example.com A 123.2.2.110

• Re-configuration in OMS:

emctl secure oms -sysman_pwd <sysman_pwd> -reg_pwd <agent_reg_password>

-host em.example.com -secure_port 4900 -slb_port 4900 -slb_console_port 443 -console

-lock_upload -lock_console

• Bounce OMS:

emctl stop oms -all

emctl start oms

Page 51: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Update OMS Configuration continued…

./em/Middleware/oms/bin/emctl status oms –details

Oracle Enterprise Manager Cloud Control 12c Release 4

Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.

Enter Enterprise Manager Root (SYSMAN) Password :

Console Server Host : em01.example.com

HTTP Console Port : 7788

HTTPS Console Port : 7799

HTTP Upload Port : 4889

HTTPS Upload Port : 4900

EM Instance Home : /em/gc_inst/em/EMGC_OMS1

OMS Log Directory Location : /em/gc_inst/em/EMGC_OMS1/sysman/log

SLB or virtual hostname : em.example.com

HTTPS SLB Upload Port : 4900

HTTPS SLB Console Port : 443

Agent Upload is locked.

OMS Console is locked.

Active CA ID: 1

Console URL : https://em.example.com:443/em

Upload URL : https://em.example.com:4900/empbs/upload

WLS Domain Information

Domain Name : GCDomain

Admin Server Host : em01.example.com

Admin Server HTTPS Port : 7101

Admin Server is RUNNING

Managed Server Information

Managed Server Instance Name: EMGC_OMS1

Managed Server Instance Host: em01.example.com

WebTier is Up

Oracle Management Server is Up

Page 52: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Update OMS Configuration continued…

• Reconfigure OMS agent upload url (only agent deployed at this stage):

emctl secure agent –emdWalletSrcUrl https://em.example.com:4900/em

• Any new agent deployments will have the new agent upload url (em.example.com)

Page 53: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Update OMS Configuration continued…

./em/Middleware/oms/bin/emctl status agent

Oracle Enterprise Manager Cloud Control 12c Release 4

Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.

---------------------------------------------------------------

Agent Version : 12.1.0.4.0

OMS Version : 12.1.0.4.0

Protocol Version : 12.1.0.1.0

Agent Home : /em_share/OMS1/Agent/agent_inst

Agent Log Directory : /em_share/OMS1/Agent/agent_inst/sysman/log

Agent Binaries : /em/Agent/core/12.1.0.4.0

Agent Process ID : 5815

Parent Process ID : 5749

Agent URL : https://em01.example.com:3872/emd/main/

Local Agent URL in NAT : https://em01.example.com:3872/emd/main/

Repository URL : https://em.example.com:4900/empbs/upload

Started at : 2015-01-26 11:52:40

Started by user : oracle

Operating System : Linux version 2.6.32-431.el6.x86_64 (amd64)

Last Reload : (none)

Last successful upload : 2015-01-26 11:52:53

Last attempted upload : 2015-01-26 11:52:53

Total Megabytes of XML files uploaded so far : 0.05

Number of XML files pending upload : 0

Size of XML files pending upload(MB) : 0

Available disk space on upload filesystem : 91.34%

Collection Status : Collections enabled

Heartbeat Status : Ok

Last attempted heartbeat to OMS : 2015-01-26 11:52:49

Last successful heartbeat to OMS : 2015-01-26 11:52:49

Next scheduled heartbeat to OMS : 2015-01-26 11:53:49

--------------------------------------------------------------

Agent is Running and Ready

Page 54: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Update OMS Configuration continued…

• Reconfigure emcli:

emcli setup -url=https://em.example.com:7799/em -username=SYSMAN -trustall

Page 55: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Update OMS Configuration continued…

emcli>status()

Oracle Enterprise Manager 12c Release 4 EM CLI with Scripting option.

Copyright (c) 1996, 2014 Oracle Corporation and/or its affiliates. All rights reserved.

Verb Jars Home (EMCLI_VERBJAR_DIR) : /em/Middleware/oms/bin/bindings/12.1.0.4.0/.emcli

EM CLI Home (EMCLI_INSTALL_HOME) : /em/Middleware/oms/bin

EM CLI Version : 12.1.0.4.0

Java Home : /em_share/OMS1/Middleware/jdk16/jdk/jre

Java Version : 1.6.0_43

Log file (EMCLI_LOG_LOC) : CONSOLE

Log level (EMCLI_LOG_LEVEL) : SEVERE

EM URL (EMCLI_OMS_URL) : https://em.example.com:7799/em

EM user (EMCLI_USERNAME) : SYSMAN

Auto login (EMCLI_AUTOLOGIN) : true

Trust all certificates (EMCLI_TRUSTALL) : true

Type help('client_properties') to see a list of available client properties.

emcli>

Page 56: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RAC

WebTier Cluster

em.example.com

EMREPDC11

FAS3250FAS3250

Agents/Targets Console & EMCLI

DNS

Load Balancer

dc1em01.example.com

OMS1

SW Lib OMS1 OMS2

EMREPDC1

EMREPDC12

dc1em02.example.com

Load Balancer

dc2em01.example.com dc2em02.example.com

DC1 DC2Active Passive

Active

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

JDBC

Page 57: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

OMS Layer

High Availability

Page 58: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Before adding the 2nd OMS, we need to create shared Oracle Inventory that

will move with the OMS through shared storage:

vi /etc/oraInst.loc

inventory_loc=/em/oraInventory

inst_group=oinstall

chmod 644 /etc/oraInst.loc

chown root:root /etc/oraInst.loc

Adding the Second OMS

Page 59: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Adding the Second OMS continued…

• Push agent to host of second OMS using virtual address em02.example.com:

em02.example.com

ADD_HOST_SYSMAN_Jan_26_2015_12:14:48_AM_UTC

Page 60: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Specify the same port and location for agent as 1st OMS:

Adding the Second OMS continued…

Page 61: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Run -> Enterprise | Provisioning and Patching | Procedure Library and then select the

“Add Management Service Deployment Procedure”:

Adding the Second OMS continued…

Page 62: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Adding the Second OMS continued…

• Tick all the tasks that should now be completed:

Page 63: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Adding the Second OMS continued…

• Enter second OMS host using virtual address em02.example.com:

em02.example.com

Page 64: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Adding the Second OMS continued…

• Use Shared Directory for Transfer Mode and keep port same as 1st OMS:

Page 65: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Adding the Second OMS continued…

• Steps 1 and 2 already done, run root.sh for step 3:

Page 66: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Adding the Second OMS continued…

• Finally you’ll see the 2 OMS in the EMGC_GCDomain Farm:

Page 67: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Move the Oracle Inventory pointer file to match the 1st node:

mv /etc/oraInst.loc /etc/oraInst_OMS.loc

• Change the lock file location from shared storage to local disk (to avoid the

performance issues):

su root

mkdir –p /em_lock

chown oracle:oinstall /em_lock

chmod 774 /em_lock

vi /em/gc_inst/WebTierIH1/config/OHS/ohs1/httpd.conf

For the lines “MPM Prefork Module” & “MPM Worker Module”, change the LockFile to be:

LockFile "/em_lock/http_lock“

Restart OMS:

emctl stop oms

emctl start oms

Adding the Second OMS – Post Tasks

Page 68: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RAC

WebTier Cluster

em.example.com

EMREPDC11

FAS3250FAS3250

Agents/Targets Console & EMCLI

DNS

Load Balancer

dc1em01.example.com

OMS1

SW Lib OMS1 OMS2

EMREPDC1

EMREPDC12

dc1em02.example.com

OMS2

Load Balancer

dc2em01.example.com dc2em02.example.com

DC1 DC2Active Passive

Active Active

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

JDBC

Page 69: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Database Layer

Disaster Recovery

Page 70: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Creating Physical Standby

• Create Physical Standby EMREPDC2 ensuring you use the physical host

names via:

• Cloud Control

• RMAN Duplicate from Active Database

• Storage Replication

• Ensure you have set:

• Archive Log Mode

• Forced Logging

• Flashback on (for easier reinstatement)

Page 71: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Update OMS Connect String

• Add Virtual Server Name into DNS (to avoid reconfiguration at database layer):

emrep.example.com CNAME dc1emrep.example.com (TTL 60)

dc1emrep.example.com CNAME dc1emrep-scan.example.com

dc2emrep.example.com CNAME dc2emrep-scan.example.com

Page 72: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Update OMS Connect String continued…

• On both active OMS nodes run:

emctl stop oms -all

emctl start oms -admin_only

emctl config oms -store_repos_details -repos_conndesc

"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)

(HOST=emrep.example.com)(PORT=1521)))

(CONNECT_DATA=(SERVICE_NAME=EMREPMAA)))" -repos_user sysman

emctl stop oms -all

emctl start oms

To avoid long TNS timeouts when hosts not available (DR scenario)

Page 73: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RAC

WebTier Cluster

em.example.com

EMREPDC11

FAS3250FAS3250

Agents/Targets Console & EMCLI

DNS

Load Balancer

dc1em01.example.com

OMS1

SW Lib OMS1 OMS2

EMREPDC1

EMREPDC12

dc1em02.example.com

OMS2

Load Balancer

dc2em01.example.com

EMREPDC2

dc2em02.example.com

DC1 DC2Active Passive

Data Guard

Active Active

RACEMREPDC21 EMREPDC22

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

JDBC

Page 74: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

OMS Layer

Disaster Recovery

Page 75: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Check OMS Pre-Requisites

• Run the OUI installer for OMS on the standby nodes to check pre-requisites

and then cancel and exit install

Page 76: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Replication for Shared Storage

• ZFS:

– Ensure the projects OMS and SWLIB have continuous replication from

storage pool dc1em (in DC1) to dc2em (in DC2)

• NetApp:

– Ensure the volume dc1oms (in DC1) is SnapMirror every 15 minutes to

it’s Snap Destination dc2oms (in DC2)

– Ensure the volume dc1swlib (in DC1) is SnapMirror every 5 minutes to

it’s Snap Destination dc2swlib (in DC2)

Page 77: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Preparing Standby OMS Nodes

• Create symbolic links on each OMS node (if using NFS):

su -

ln -s /em_share/OMS1 /em (on 1st node)

ln -s /em_share/OMS2 /em (on 2nd node)

exit

• Copy Oracle Inventory pointer file:

scp /etc/oraInst_OMS.loc root@dc2emrep01:/etc

scp /etc/oraInst_OMS.loc root@dc2emrep02:/etc

Page 78: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Preparing Standby OMS Nodes continued…

• Create lock folder for lock file:

su root

mkdir –p /em_lock

chown oracle:oinstall /em_lock

chmod 774 /em_lock

exit

Page 79: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Install local agents on all 8 servers using physical hostnames

• On RAC nodes physical hostname:

– Discover local agent, host, databases, ASM if present, listeners, etc

• On OMS nodes physical hostname:

– Discover local agent and host only

– Remove any OMS targets if discovered

• On OMS nodes virtual hostname (agent already installed with OMS install):

– Discover shared agent, shared host, OMS, etc

Deployment Post Tasks

Page 80: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Local Oracle Inventory:

/etc/oraInst.loc

inventory_loc=/u01/app/oracle/oraInventory

• Shared Oracle Inventory:

/etc/oraInst_OMS.loc

inventory_loc=/em/oraInventory

Deployment Post Tasks continued…

Page 81: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

dc1em01.example.com dc1em02.example.com dc2em01.example.com dc2em02.example.com

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

Shared Inventory on /emShared AgentShared HostShared OMS

Local Inventory on /u01Local AgentLocal Host

Shared Inventory on /emShared AgentShared HostShared OMS

Local Inventory on /u01Local AgentLocal Host

Local Inventory on /u01Local AgentLocal Host

Grid InfrastructureRDBMS

Local Inventory on /u01Local AgentLocal Host

Grid InfrastructureRDBMS

Local Inventory on /u01Local AgentLocal Host

Grid InfrastructureRDBMS

Local Inventory on /u01Local AgentLocal Host

Grid InfrastructureRDBMS

Local Inventory on /u01Local AgentLocal Host

Local Inventory on /u01Local AgentLocal Host

Moves with storage

WebTier (OMS)Layer

DatabaseLayer

DC2DC1

Page 82: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

OMS 12c MAA

Page 83: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RAC

WebTier Cluster

em.example.com

EMREPDC11

FAS3250FAS3250

Agents/Targets Console & EMCLI

DNS

Load Balancer

dc1em01.example.com

OMS1

SW Lib OMS1 OMS2

EMREPDC1

EMREPDC12

dc1em02.example.com

OMS2

FAS3250FAS3250

Load Balancer

dc2em01.example.com

SW Lib OMS1 OMS2

EMREPDC2

dc2em02.example.com

DC1 DC2Active Passive

Data Guard

Snap Mirror

Active Active PassivePassive

RAC

WebTier Cluster

EMREPDC21

OMS1

EMREPDC22

OMS2

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

JDBC JDBC

NetworkLayer

WebTierLayer

DatabaseLayer

StorageLayer

Page 84: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Switchover

Page 85: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Switchover of OMS

• On all active OMS nodes, perform:

emctl stop oms -all

emctl stop agent

Unmount the /em or /em_share and /swlib

Page 86: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Switchover of OMS continued…

• On shared storage:

• If ZFS, perform on-demand replication for the SWLIB and OMS Projects, then perform role

reversal for these projects to make DC2 primary, ensure continuous replication schedule is

created.

• If NFS, take final SnapMirror of the dc1oms and dc1swlib volumes, break mirror, make DC2

volumes read/write and then reverse the SnapMirror relationship.

Page 87: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Switchover of OMS continued…

• Update DNS so as follows:

em.example.com CNAME em_slb_dc2.example.com (TTL 60)

emrep.example.com CNAME dc2emrep.example.com (TTL 60)

• Switchover EMREP database:

dgmgrl

connect sys/<password>

switchover to ‘EMREPDC2’

Page 88: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Switchover of OMS continued…

• On all inactive OMS nodes, perform:

Mount the /em or /em_share and /swlib

emctl start oms

emctl start agent

Page 89: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Failover

Page 90: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Failover of OMS

• On shared storage:

• If ZFS, perform role reversal for the SWLIB and OMS Projects to make DC2 primary, ensure

continuous replication schedule is created when DC1 comes back.

• If NFS, break the SnapMirror for the dc1oms and dc1swlib volumes, make DC2 volumes

read/write and then reverse the SnapMirror relationship when DC1 comes back.

Page 91: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Failover of OMS continued…

• Update DNS so as follows:

em.example.com CNAME em_slb_dc2.example.com (TTL 60)

emrep.example.com CNAME dc2emrep.example.com (TTL 60)

• Failover EMREP database:

dgmgrl

connect sys/<password>

failover to ‘EMREPDC2’

Page 92: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Failover of OMS continued…

• On all inactive OMS nodes, perform:

Mount the /em or /em_share and /swlib

• On the 1st OMS node, perform:

emctl start oms -admin_only

emctl resync repos -full -name "failover_resync"

emctl start agent

• On all the remaining OMS nodes, perform:

emctl start oms

emctl start agent

Page 93: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Failover of OMS continued…

• When DC1 as a site is available again:

• For ZFS Shared Storage ensure continuous replication schedule is created for the SWLIB

and OMS Projects and for NFS Shared Storage the SnapMirror relationship is reversed for

dc1oms and dc1swlib volumes (so DC2 -> DC1)

• Reinstate EMREPDC1:

dgmgrl (on new primary DC2)

connect sys/<password>

reinstate database ‘EMREPDC1’

Page 94: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Licensing

Implications

Page 95: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Licensing Implications

• The clustering of the OMS WebTier is covered as per the restricted-use license (free)

• Database Enterprise Edition license required for all servers except for 1 server which

can be used as part of restricted-use license

• RAC licenses required for all servers

• Data Guard is covered by the Database Enterprise Edition license

Page 96: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RAC

WebTier Cluster

em.example.com

EMREPDC11

FAS3250FAS3250

Agents/Targets Console & EMCLI

DNS

Load Balancer

dc1em01.example.com

OMS1

SW Lib OMS1 OMS2

EMREPDC1

EMREPDC12

dc1em02.example.com

OMS2

FAS3250FAS3250

Load Balancer

dc2em01.example.com

SW Lib OMS1 OMS2

EMREPDC2

dc2em02.example.com

DC1 DC2Active Passive

Data Guard

Snap Mirror

Active Active PassivePassive

RAC

WebTier Cluster

EMREPDC21

OMS1

EMREPDC22

OMS2

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

dc1emrep01.example.com dc1emrep02.example.com dc2emrep01.example.com dc2emrep02.example.com

JDBC JDBC

RAC RAC

DB EE

RAC

DB EE

RAC

DB EE

R-UseFree

R-UseFree

R-UseFree

R-UseFree

Page 97: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

References

• Deploying a Highly Available Enterprise Manager 12c Cloud Control:

http://www.oracle.com/technetwork/oem/framework-infra/wp-em12c-building-ha-level3-1631423.pdf

• Enterprise Manager Cloud Control 12c Disaster Recovery with Storage Replication:

http://www.oracle.com/technetwork/oem/cloud-mgmt/wp-em12cr3-dr-solution-1965514.pdf

• Oracle Real Application Cluster:

http://docs.oracle.com/cd/E11882_01/rac.112/e16795/toc.htm

• Oracle Data Guard:

http://docs.oracle.com/cd/E11882_01/server.112/e41134/toc.htm

Page 98: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

References

• Architecture Principles and Implementation Practices for Remote Replication Using Oracle ZFS

Storage Appliance:

http://www.oracle.com/technetwork/server-storage/sun-unified-storage/documentation/zfssa-

replication-2014-1-2120969.pdf

• NetApp Snap Mirror:

http://www.netapp.com/uk/products/protection-software/snapmirror.aspx

• Enterprise Manager Restricted-use License:

http://docs.oracle.com/cd/E24628_01/doc.121/e24474/ch1_introduction.htm#OEMLI112

• Infrastructure Repository Databases:

http://docs.oracle.com/database/121/DBLIC/editions.htm#BABDFJIC

Page 99: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Thank you for listening!

[email protected]

– facebook.ZedDBA.co.uk (blog)

– twitter.ZedDBA.co.uk or @ZedDBA

– LinkedIn.ZedDBA.co.uk

– www.ZedDBA.co.uk (coming soon!)

[email protected]

– https://uk.linkedin.com/in/clivearchibald

– www.ukfozz.co.uk

Page 100: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Bonus Material

Page 101: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Bonus Material

• Deploying 12c Cloud Control (DR) using 2 servers

• Deploying 12c Cloud Control (MAA) using 4 servers instead of 8

Page 102: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Deploying 12c CC (DR) using 2 servers

• Exactly the same as deployment with the following amendments:

• No SLB

• No WebTier Cluster

• No RAC Cluster

• But still gives resilience through the use of a 2nd Data Centre while

minimising the cost

Page 103: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Deploying 12c CC (DR) using 2 servers

• On dc1em1:

127.0.0.1 localhost localhost.localdomain

10.1.1.1 dc1em01.example.com dc1em01 ## Physical Host Details - DB

10.1.1.1 em01.example.com em01 ## Virtual Host Details - OMS

• On dc2em01:

127.0.0.1 localhost localhost.localdomain

10.1.2.1 dc2em01.example.com dc2em01 ## Physical Host Details - DB

10.1.2.1 em01.example.com em01 ## Virtual Host Details - OMS

Page 104: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

em.example.com

EMREPDC11

FAS3250FAS3250

Agents/Targets Console & EMCLI

DNS

dc1em01.example.com

OMS1

SW Lib OMS1 OMS2

EMREPDC1

FAS3250FAS3250

dc2em01.example.com

SW Lib OMS1 OMS2

EMREPDC2

DC1 DC2Active Passive

Data Guard

Snap Mirror

EMREPDC21

OMS1

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

Page 105: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Update OMS Configuration

• Add Virtual Server Name into DNS:

em.example.com CNAME dc1em01.example.com (TTL 60)

dc1em01.example.com A 10.1.1.1

dc2em01.example.com A 10.1.2.1

• Re-configuration in OMS (using the same ports):

emctl secure oms -sysman_pwd <sysman_pwd> -reg_pwd <agent_reg_password>

-host em.example.com -secure_port 4900 -slb_port 4900 -slb_console_port 7799 -console

-lock_upload -lock_console

• Bounce OMS:

emctl stop oms -all

emctl start oms

Page 106: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Pre-steps before update OMS Connect String

• Prior to updating the Connect String create DB Service:

exec DBMS_SERVICE.CREATE_SERVICE(SERVICE_NAME => 'EMREPMAA',

NETWORK_NAME => 'EMREPMAA');

Page 107: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Pre-steps before update OMS Connect String continued…

• And Service Startup Trigger:

CREATE OR REPLACE TRIGGER SYS.MANAGE_SERVICES AFTER STARTUP

ON DATABASE

DECLARE

ROLE VARCHAR (30);

OMODE VARCHAR (30);

BEGIN

SELECT DATABASE_ROLE INTO ROLE FROM V$DATABASE;

SELECT OPEN_MODE INTO OMODE FROM V$DATABASE;

IF ROLE = 'PRIMARY'

THEN

DBMS_SERVICE.START_SERVICE ('EMREPMAA');

END IF;

END;

/

Page 108: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

dc1em01.example.com dc2em01.example.com

Shared Inventory on /emShared AgentShared HostShared OMS

Local Inventory on /u01Local AgentLocal Host

Grid InfrastructureRDBMS

Local Inventory on /u01Local AgentLocal Host

Grid InfrastructureRDBMS

Moves with storage

WebTier (OMS)and

DatabaseLayer

DC2DC1

Page 109: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Deploying 12c CC (MAA) using 4 instead of 8 servers

• Exactly the same as deploying on 8 server, however the OMS WebTier and

RAC cluster co-exist

Page 110: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Deploying 12c CC (MAA) using 4 instead of 8 servers

• On dc1em1 and dc1em02:

127.0.0.1 localhost localhost.localdomain

10.1.1.1 dc1em01.example.com dc1em01 ## Physical Host Details - RAC

10.1.1.2 dc1em02.example.com dc1em02 ## Physical Host Details - RAC

10.1.1.1 em01.example.com em01 ## Virtual Host Details - OMS

10.1.1.2 em02.example.com em02 ## Virtual Host Details - OMS

• On dc2em01 and dc2em02:

127.0.0.1 localhost localhost.localdomain

10.1.2.1 dc2em01.example.com dc2em01 ## Physical Host Details - RAC

10.1.2.2 dc2em02.example.com dc2em02 ## Physical Host Details - RAC

10.1.2.1 em01.example.com em01 ## Virtual Host Details - OMS

10.1.2.2 em02.example.com em02 ## Virtual Host Details - OMS

Page 111: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

RAC

WebTier Cluster

em.example.com

EMREPDC11

FAS3250FAS3250

Agents/Targets Console & EMCLI

DNS

Load Balancer

dc1em01.example.com

OMS1

SW Lib OMS1 OMS2

EMREPDC1

EMREPDC12

dc1em02.example.com

OMS2

FAS3250FAS3250

Load Balancer

dc2em01.example.com

SW Lib OMS1 OMS2

EMREPDC2

dc2em02.example.com

DC1 DC2Active Passive

Data Guard

Snap Mirror

Active Active PassivePassive

RAC

WebTier Cluster

EMREPDC21

OMS1

EMREPDC22

OMS2

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

GI 11.2.0.4RDBMS 11.2.0.4

OMS 12.1.0.4

Page 112: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Before adding the 2nd OMS, we need to create shared Oracle Inventory that

will move with the OMS:

mv /etc/oraInst.loc /etc/oraInst_DB.loc

vi /etc/oraInst.loc

inventory_loc=/em/oraInventory

inst_group=oinstall

chmod 644 /etc/oraInst.loc

chown root:root /etc/oraInst.loc

Adding the Second OMS when using 4 instead of 8 servers

Page 113: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

• Same as before but for the Oracle Inventory pointer file use these commands instead:

mv /etc/oraInst.loc /etc/oraInst_OMS.loc

mv /etc/oraInst_DB.loc /etc/oraInst.loc

• For the EMREP Virtual Server Name in DNS:

emrep.example.com CNAME dc1emrep.example.com (TTL 60)

dc1emrep.example.com CNAME dc1em-scan.example.com

dc2emrep.example.com CNAME dc2em-scan.example.com

Adding the Second OMS – Post Tasks

Page 114: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

dc1em01.example.com dc1em02.example.com dc2em01.example.com dc2em02.example.com

Shared Inventory on /emShared AgentShared HostShared OMS

Shared Inventory on /emShared AgentShared HostShared OMS

Local Inventory on /u01Local AgentLocal Host

Grid InfrastructureRDBMS

Local Inventory on /u01Local AgentLocal Host

Grid InfrastructureRDBMS

Local Inventory on /u01Local AgentLocal Host

Grid InfrastructureRDBMS

Local Inventory on /u01Local AgentLocal Host

Grid InfrastructureRDBMS

Moves with storage

WebTier (OMS)and

DatabaseLayer

DC2DC1

Page 115: UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Architecture

Thank you for listening!

[email protected]

– facebook.ZedDBA.co.uk (blog)

– twitter.ZedDBA.co.uk or @ZedDBA

– LinkedIn.ZedDBA.co.uk

– www.ZedDBA.co.uk (coming soon!)

[email protected]

– https://uk.linkedin.com/in/clivearchibald

– www.ukfozz.co.uk