oracle*ac?ve*dataguard:* power,*speed,*ease,*and* … · mds repo sql server ! virtualization !...

80
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Ac?ve Data Guard: Power, Speed, Ease, and Protec?on CON6531 Larry M. Carpenter Master Product Manager Oracle High Availability Systems Suresh Torlikonda Weblogic SOA Infra Architect Vasu Raghunathan Director, Database Administra?on

Upload: duongminh

Post on 19-Sep-2018

238 views

Category:

Documents


0 download

TRANSCRIPT

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Oracle  Ac?ve  Data  Guard:  Power,  Speed,  Ease,  and  Protec?on  CON6531  Larry  M.  Carpenter  Master  Product  Manager  Oracle  High  Availability  Systems    

Suresh  Torlikonda  Weblogic  SOA  Infra  Architect      

Vasu  Raghunathan  Director,  Database  Administra?on  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

• Available  now    – Exadata  Express  Cloud  Service  

• Coming  soon  – Database  Cloud  Services    – Exadata  Cloud  Machine  

2  

Announcing  Oracle  Database  12c  Release  2  on  Oracle  Cloud  

Oracle  is  presen?ng  features  for  Oracle  Database  12c  Release  2  on  Oracle  Cloud.      We  will  announce  availability  of  the  On-­‐Prem  release  some?me  aVer  Open  World.  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Safe  Harbor  Statement  The  following  is  intended  to  outline  our  general  product  direc?on.  It  is  intended  for  informa?on  purposes  only,  and  may  not  be  incorporated  into  any  contract.  It  is  not  a  commitment  to  deliver  any  material,  code,  or  func?onality,  and  should  not  be  relied  upon  in  making  purchasing  decisions.  The  development,  release,  and  ?ming  of  any  features  or  func?onality  described  for  Oracle’s  products  remains  at  the  sole  discre?on  of  Oracle.  

3  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Agenda  

Introduc?ons  

MAA  in  Produc?on  at  Mul?Plan  

Ease  

Power  

Speed  

Protec?on  

MAA  in  Produc?on  at  IndianOil  

 

 

 

    4  

In  all  things  Oracle  Data  Guard!  

MultiPlan proprietary ─ do not distribute without permission MultiPlan proprietary ─ do not distribute without permission

Maximum Availability Architecture Suresh Torlikonda/Vasu Raghunathan September 2016

*

MultiPlan is a cost containment company in health care space

Who We Are

*

Goal

Regardless of the type of failure:

No noticeable downtime

All applications fail gracefully

Zero data loss

! ! !

*

•  Lack of high availability for applications, databases and business processes

•  Lack of seamless disaster recovery due to various site specific configurations and deployments

•  Longer RTO to switchover between active and standby database

•  Lack of Redundancy across all layers was causing disruption for business processes

•  Single point of failures for certain applications

Problem

*

•  Moved away from tradition DNS round robin to connect to RAC cluster for database

•  Configure F5 LTM to load balance requests between the Web Tier to achieve another layer of

abstraction between application and web tier

•  Configured F5 LTM with scan IP’s for both the active and standby database

•  Configured F5 LTM to periodically check database status

•  Deployed a dedicated service on the database for F5 LTM to execute a monitor SQL

•  LTM executes the SQL monitor script every 30 seconds

•  F5 LTM would failover to the standby database after three consecutive failures occur when

executing SQL monitor script

•  By using F5 as abstract layer helped us avoid changing client configuration between switchovers and

failover

•  Implementation of GTM to avoid site specific configurations

•  Deployed GTM on both the sites.

•  Configured GTM to resolve to the client request based on the location where the requests are

originated .

Solution/Innovation

•  Introduce redundancy at all layers – Network, Storage, Server(Physical & VM), Database &

Application

•  Update the configuration at the existing Disaster Recovery Datacenter to match production

which is located approximately 1500 miles apart

•  Utilize technologies and practices to maintain infrastructure, deployment and code level

across datacenters

•  Introduce service names instead of site specific hostnames in configuration to establish

communication between various components in data centers

•  Identical URI’s in both locations to access the services

Solution Innovation

LTM Local Transaction Manager is used to proxy and load balance request across multiple hosts with a single address

URI Uniform Resource Identifier is a mechanism of retrieving a resource existing on intranet or extranet network

GTM Global Transaction Manager is used to resolved names to IP’s based on availability and location

* 10

The diagram below shows how our conceptual architecture is mapped onto the Fusion Middleware stack

Ø Service Bus, SOA Suite, Weblogic ,Coherence, JMS

SOA Suite Composite Services

Service Bus

Business Services

BPM, BPEL, Components

Business Rules Components

Weblogic Services

Service Implementations

Messaging

Coherence

Business Services

External Requests

Oracle

Proxy Services Proxy Services Proxy Services

MDS Repo SQL Server

Ø  Virtualization

Ø  Orchestration Ø  Implementation

Architecture

*

•  Database

•  OS – Oracle Enterprise Linux – 6.5

•  ASM/Grid – Oracle 12.1.0.2

•  Database – Oracle 11.2.0.4, 12.1.0.2

•  SQL Server 2008, 2012, 2014

•  Middleware

•  Oracle Service Bus -12.1.3

•  Weblogic Application Server -10.3.6/12.2.0

•  Coherence - 3.7/12.2.1

•  WebSphere - 6.x

•  Cold Fusion - 10.x

Platform Components

*

Single Site

*

•  Maximum availability for local failover/switchover – with zero Data loss

•  Local Standby - SYNC Mode

•  Used for patching, this reduces the production downtime

•  Read only queries

•  DR Standby – ASYNC Mode

•  Moved RMAN backups to DR – Freeing up I/O and CPU resources on primary

•  We generate close to 1TB archive logs per day, the lag between Primary and DR standby is less than a few minutes

Active Data Guard Setup

*

Netw

orkWe

b  Tie

r

Web  

Tier

App  

Tier

App  

Tier

Datab

ase  

Tier

Datab

ase  

Tier

Prod

Stand

by

Prod

LOCAL  DNSLOCAL  DNS

1) The client machine asks the local DNS server the question: what IP is www.abc.com?

2) The local DNS server realizes www.abc.com is a CNAME

3) The DNS server recurses to the GTM for the question: what is the destination for www.abc.com?

Site  1

GTM  4) The GTM reviews the topology records and determine either Site1 or Site 2

is the active datacenter for that www.abc.com and returns the virtual server LTM VIP from Site 1 or Site 2

Netw

ork

Storage  Array  1 Storage  Array  2 Storage  Array  3

Active  Data  Guard

Site  2

Multi Site

*

Service to Database

Application Servers

Request Flow

Local DNS GTM

LTM

Service to Service

Application/Web Servers GTM Local DNS

Client

Local DNS GTM

LTM

Client to Service

*

•  Using F5 as abstract layer reduced the RTO from 2hrs to less than 5 min for failover and less than 15 min for manual

switchover within a site

•  The actual time for failover will be reduced once the Observer is turned on

•  Combination of GTM and LTM reduced the time to cutover to a Disaster Recovery site to less than hour

•  By utilizing network devices like (GTM and LTM) the configurations were maintained at single locations for multiple

datacenters

•  Automated release management to eliminate the need of deployments to multiple sites

Benefits

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Thank  you!  Back  to  you  Larry  

17  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

EASE  Making  your  life  easier  

18  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Ease  of  use  in  Data  Guard  Release  12.2  • Use  DBCA  and  EMCLI  to  create  Standbys  • Use  RMAN  and  Enterprise  Manager  to  create  Far  Sync  Instances    • Rest  Interface  to  the  Data  Guard  Broker  • Chef  tools  to  create  and  manage  Data  Guard  standbys  • Puang  the  FSFO  Observer  in  the  Background  •  Scrip?ng  with  the  Broker  DGMGRL    command  line  interface  

19  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

DBCA  Standby  Crea?on  

• At  the  Standby  server  install  the  Oracle  SoVware  and  start  a  listener  •  Execute  a  single  line  command  

•  First  release  caveats  – SIDB  only,  does  not  support  Mul?tenant  Primary  databases,  yet!  – Cannot  directly  create  RAC  Standby  databases,  but  they  can  be  converted  to  RAC.  

    20  

Simple  and  scriptable!  

dbca -silent -createDuplicateDB -primaryDBConnectionString myprimary.domain:1523/chicago.domain -gdbName chicago.domain -sid boston -initParams instance_name=boston -createAsStandby -customScripts /tmp/test.sql

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

DBCA  Standby  Crea?on  

• Use  the  post  SQL  to  ?dy  things  up  (in  /tmp/Test.sql)  

•  Then  configure  your  network  TNSNAMES  for  Data  Guard  • And  Build  your  Broker  configura?on.    

– Or  just  add  this  new  standby  to  your  exis?ng  Broker  configura?on  

21  

Finish  up  

connect / as sysdba alter database flashback on; shutdown immediate startup alter system register; exit

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Enterprise  Manager  Cloud  Control  

•  Enterprise  Manager  has  had  a  Standby  Crea?on  Wizard  for  many  versions  •  It  also  has  a  command  line  interface  called  EMCLI  

– Now  you  can  script  standby  crea?on  through  it.  

– No?ce  how  the  target  can  be  a  RAC  or  Single  Instance  database  – RMAN  duplicate  from  ac?ve  database  is  also  the  default  

    22  

Command  line  standby  creaCon  

emcli create_standby -source_db_target_name=“BOS” -source_db_target_type=“rac_database” -dest_oracle_sid=“BOS1_1” -spname=“BOS1” -use_broker çMy  favorite  qualifier!  (it’s  the  default  too!)

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   23  

URL  access  to  DGMGRL  funcCons  and  more!  A  RESTful  API  for  Oracle  Data  Guard  Broker  

Primary  Data  Center   DR  Data  Center  

Data  Guard  Redo  Transport  

Broker    Service  

Broker    Service  

HTTP(S)  RESTful  Services  Interfaces  

DBCA    Service  

DBCA    Service  

Data  Guard  Broker  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

A  RESTful  API  for  Oracle  Data  Guard  Broker  

    24  

Convert  back  to  Physical  Standby  from  Snapshot  Standby  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Chef1  for  Data  Guard  

• Automate  your  Physical  Standby  Crea?on  – Chef  as  solu?on  to  automate  OS  &  database  configura?on  –   Chef  cookbook/recipes  designed  for  flexible  deployments  –   Cookbook  akributes  designed  for  Data  Guard  setup  between:  

•  DBaaS  <-­‐>  DBaaS  •  RACDBaaS  <-­‐>  RACDBaaS  •  ExaCS  <-­‐>  ExaCS  •  On-­‐prem  (standalone)  -­‐>  DBaaS  •  On-­‐prem  (RAC)  -­‐>  RACDBaaS  •  On-­‐prem  (RAC)  -­‐>  ExaCS  

25  

Now  We’re  Cooking  

1hkps://www.chef.io/chef/    

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Automa?ng  Data  Guard  

• Chef  cookbook  process  op?ons:  – Data  Guard  setup  using  duplica?on  from  Ac?ve  Database  – Data  Guard  setup  using  duplica?on  from  local  backup  – All  environments  configura?ons  and  process  op?ons  available  through  cookbook  akributes  configura?on  

26  

Chef  cookbook  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Automa?ng  Data  Guard  

• Download  the  cookbook1  tar  (soon)  and  upload  to  your  chef  server  • Configure  cookbook  akributes  to  match  system  specific  configura?ons  

– For  flexibility  purpose  there  is  an  op?on  to  provide  a  json  file  with  most  frequent  changes  in  configura?on  

•  Execute  a  single  recipe  on  the  primary  site  •  Execute  a  single  recipe  on  the  standby  site  •  Execute  a  single  recipe  to  enable  Ac?ve  Data  Guard.    

27  

Deployment  

1Stay  Tuned  to  Oracle.com  for  more  informa?on  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Power  Giving  you  more  control  and  ability  

28  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

More  Power  in  Data  Guard  in  Data  Guard  Release  12.2    

• Using  all  your  Standby  Instance  to  apply  redo  •  Easily  create  Subset  Standby  databases  in  Mul?tenant  • Data  Guard  Broker  Support  and  involvement  in  DBMS_ROLLING  controlled  rolling  upgrades    

• Migrate  and  Failover  PDBs  with  the  Broker  

29  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Physical  Standby  Redo  Apply  •  The  MRP  and  its  redo  apply  servers  have  always  run  on  one  node  of  a  Physical  Standby  RAC.  

•  This  limits  it  to  the  CPU  and  IO  power  of  that  one  node.  • But  s?ll  our  performance  has  been  geang  beker  with  each  release.  

30  

Standby  Apply  Rate  

MB/sec  

0  

200  

400  

600  

800  

Oracle  9i   Oracle  10g   Oracle  11g    (Commodity)  

Oracle  11g  (Exadata)  

OLTP  Workload  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Single-­‐Instance  Redo  Apply  

MRP  Processes  

MRP  Processes  

Standby  Instance  1  

RFS  Process  

Coordinator  Process  

MRP  Processes  

RFS  Process  

Coordinator  Process  

MRP  Processes  

RFS  Process  

Primary  Instance  1  

ASYNC/SYNC  Process  

Primary  Instance  2  

ASYNC/SYNC  Process  

Primary  Instance  3  

ASYNC/SYNC  Process  

Thread  1  Redo  

Thread  2  Redo  

Thread  3  Redo  

SRL  

SRL  

SRL  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Mul?-­‐Instance  Redo  Apply  –  3  Node  Standby  

Coordinator  Process  

MRP  Processes  

Standby  Instance  1  

RFS  Process  

Coordinator  Process  

MRP  Processes  

Standby  Instance  2  

RFS  Process  

Coordinator  Process  

MRP  Processes  

Standby  Instance  3  

RFS  Process  

Primary  Instance  1  

ASYNC/SYNC  Process  

Primary  Instance  2  

ASYNC/SYNC  Process  

Primary  Instance  3  

ASYNC/SYNC  Process  

Thread  1  Redo  

Thread  2  Redo  

Thread  3  Redo  

SRL  

SRL  

SRL  

   

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Mul?-­‐Instance  Redo  Apply  –  2  Node  Standby  

Coordinator  Process  

MRP  Processes  

Standby  Instance  1  

RFS  Process  

Coordinator  Process  

MRP  Processes  

Standby  Instance  2  

RFS  Process  

Coordinator  Process  

RFS  Process  

Primary  Instance  1  

ASYNC/SYNC  Process  

Primary  Instance  2  

ASYNC/SYNC  Process  

Primary  Instance  3  

ASYNC/SYNC  Process  

Thread  1  Redo  

Thread  2  Redo  

Thread  3  Redo  

SRL  

SRL  

SRL  

   

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Mul?-­‐Instance  Redo  Apply  

• Parallel,  mul?-­‐instance  recovery  :  standby  will  keep  up  – Standby  recovery  -­‐  u?lizes  CPU  and  IO  across  all  nodes  of  RAC  standby  – Some  of  our  OLTP  workload  tests  on  Exadata  show  great  scalability  

    34  

0  200  400  600  800  1000  1200  1400  

1  Instance   2  Instances   4  Instances   8  Instances  

OLTP  Workload  Standby  Apply  Rate  

MB/sec  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Mul?-­‐Instance  Redo  Apply  

• Mul?-­‐Instance  Apply  runs  on  all  MOUNTED  instances  or  all  OPEN  Instances  

•  Exposed  in  the  Broker  with  the  ‘ApplyInstances’  property  on  a  standby  database  

•  First  Release  caveats  – Disallows  the  use  of  In  Memory  Column  Store  on  the  Standby  – RMAN  Block  Change  Tracking  file  disabled  

35      

recover managed standby database disconnect using instances 4;

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Oracle  Data  Guard  and  Mul?tenant  • Redo  genera?on  is  at  the  Container  (CDB)  level  

– Not  the  Pluggable  (PDB)  level  • Hence  Data  Guard  works  at  the  CDB  level  also.  •  Switchover  and  Failover  will  move  the  en?re  CDB  • Mul?ple  manual  steps  can  be  taken  to  move  a  single  PDB  using  the  normal  UNPLUG  and  CREATE  PLUGGABLE  commands  in  SQLPlus.  

•  Enter  the  Data  Guard  Broker!  – New  command  to  Migrate  or  Failover  a  PDB  

•  Also  coming  in  Oracle  Database  12.1.0.2  

36  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Migrate  or  Failover  –  Same  Command  • Migrate  a  PDB  from  the  Primary  CDB  to  another  Primary  CDB  or  Failover  a  PDB  from  a  Standby  CDB  to  a  Primary  CDB  

•  The  role  of  the  CDB  you  connect  to  determines  what  happens  – Connect  and  Execute  the  command  on  a  Primary  

•  You  migrate  the  REGION1  to  another  Primary  CDB  

– Connect  and  Execute  the  command  on  a  Standby  •  You  failover  the  REGION1  to  another  Primary  CDB  

37  

DGMGRL> MIGRATE PLUGGABLE DATABASE REGION1 TO CONTAINER NORTH_SALES_NEW USING REGION1.xml CONNECT AS sys/mypassword@NORTH_SALES_NEW;

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Server1  

CDB1   CDB2’  

Server2  

CDB1’   CDB2  

Data  Guard  Broker  Enhancements  for  Mul?tenant  

•  Two  servers  with  two  CDBs  in  each  

•  DG  replica?on  between  CDB  pairs  in  opposite  direc?ons  

•  PDB  Failure  in  primary  

• Move  corresponding  PDB  from  standby  to  primary  CDB  in  same  server  – Effec?vely  perform  failover  

SupporCng  individual  PDB-­‐level  failover  

PDB1   PDB2   PDB3   PDB4   PDB5  

PDB1   PDB2   PDB3   PDB4   PDB5  Data  Guard  Rep

lica?

on  

Data  Guard  Rep

lica?

on  

Primary  CDB  1  

Primary  CDB  2  Standby  CDB  1  

Standby  CDB  2  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Opera?onal  Requirements  •  The  Target  CDB  must  be  on  the  same  system  

– No  Remote  PDB  movement  is  possible  with  the  Data  Guard  Broker  

•  The  source  PDB  must  be  on  shared  storage  with  the  Target  CDB.  – No  data  file  copying  is  done  by  the  Broker.  

•  The  plugin  at  the  target  CDB  is  done  with  STANDBYS=NONE  – Any  standbys  of  the  Target  CDB  must  be  manually  updated  with  the  new  data  files  

•  The  source  PDB  will  be  removed  from  the  source  CDB.  • Remote  PDB  reloca?on  can  be  done  in  12.2  with  the  new  RELOCATE  command  outside  the  Data  Guard  Broker.  

39  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Speed  Making  things  go  faster  and  more  transparent  

40  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Speed  up  Performance  and  Role  Changes  in  Data  Guard  Release  12.2  

• Use  the  In  Memory  Column  Store  on  your  Standby  • Use  AWR  and  SQL  Tuning  Advisor  to  diagnose  and  tune  Redo  Apply  and  Query  issues  on  your  Ac?ve  Data  Guard  Standby  

• Move  users  transparently  during  role  change  with  Session  Draining  on  the  Primary  and  Preserving  exis?ng  connec?ons  at  the  Ac?ve  Data  Guard  Standby  

41  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Database  In-­‐Memory  and  Ac?ve  Data  Guard  •  In-­‐memory  DB  on  Ac?ve  Data  Guard  

– Create  IMC  tables  and  columns  for  analy?cs  on  Ac?ve  Data  Guard  – Can  populate  with  different  data  than  produc?on  database  

• Offload  even  more  to  your  standby!  •  First  Release  Caveats  

 Cannot  be  used  with  a  standby  running  Mul?-­‐Instance  Redo  Apply,  yet!  

42      

Month    In-­‐Memory  

 

Year    In-­‐Memory  

Standby  Primary  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Configuring  In  Memory  and  Ac?ve  Data  Guard  

•  Set  the  INMEMORY_SIZE  ini?aliza?on  parameter  – Set  on  Primary  Only  –  No  Standby  In  Memory  Column  Store  – Set  on  Standby  Only  –  No  Primary  In  Memory  Column  Store  – Set  on  Primary  and  Standby  –  In  Memory  Column  Store  on  both!  (Or  more)  

•  Set  the  INMEMORY  akribute  on  all  objects  you  want  In  Memory  • Depending  on  the  INMEMORY_SIZE  parameter  seang,  the  same  objects  will  be  loaded  into  memory  at  the  Primary,  the  Standby,  or  both.  

43  

To  Be  In  Memory  or  Not  To  Be  In  Memory  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Configuring  In  Memory  and  Ac?ve  Data  Guard  

•  You  can  control  where  objects  are  populated  – On  the  Primary,  the  Standby,  or  both  

•  And  have  different  data  in  memory  at  the  Primary  and  Standby  

• Configure  role  based  services  on  the  Primary  and  the  Standby  for  the  column  store    objects  and  start  them  

•  Set  the  INMEMORY  ...  DISTRIBUTE FOR SERVICE  clause  on  all  objects  to  be  populated  using  those  services  – The  In  Memory  Column  Store  is  populated  for  that  object  where  the  service  runs  

•  Primary  only,  Standby  only,  or  both.  

44  

CreaCng  Different  In  Memory  Column  Stores  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Things  to  think  about  

• Opera?onal  Restric?ons  – In-­‐Memory  Expressions  are  captured  based  on  queries  executed  on  the  primary  only  – In-­‐Memory  Informa?on  Lifecycle  Management  (ILM)  polices  based  on  access  criteria  are  triggered  based  only  on  access  recorded  on  the  primary  database.  

• Usage  Restric?ons  – In-­‐Memory  FastStart  and  In-­‐Memory  Join-­‐Groups  are  not  supported  in  an  Ac?ve  Data  Guard  environment.  

– Using  the  DISTRIBUTE FOR SERVICE  akribute  does  not  allow  you  to  divide  an  In  Memory  Column  Store  between  the  Primary  and  Standby  •  That  is  allowed  between  RAC  Instances  of  the  Primary  OR  the  Standby  for  a  given  column  store  

45  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Analy?c  queries  on  Ac?ve  Data  Guard  

• Analy?cs  queries  used  to  fail  when  executed  on  Ac?ve  Data  Guard  –  They  create  temporary  ADT  objects  during  execu?on  

•  In  12.2,  query  on  Ac?ve  Data  Guard  will:  •  Create  any  needed  ADTs  on  Primary  ,  wait  for  ADTs  to  be  replicated  and  applied  to  the  Ac?ve  Data  Guard  standby  

•  Proceed  with  execu?on  u?lizing  the  replicated  ADTs  •  Eliminates  ORA-­‐16000  (read-­‐only  database  error)  in  this  situa?on!  

• Backport  available  for  11.2.0.4      

46  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Diagnos?cs  and  Tuning  for  Ac?ve  Data  Guard  

•  Support  for  Diagnos?c  Pack  (AWR)    

•  Support  for  Tuning  Pack  features  and  SQL  Plan  Analyzer  

47  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

AWR  Support  for  Remote  Snapshots  and  ADG  (DB12.2)  • Problem  

– AWR  snapshots  cannot  be  taken  in  a  read-­‐only  standby  environment  – Performance  monitoring  and  analysis  is  limited  to  basic  STATSPACK  func?onality  

•  Solu?on  – In  Oracle  Database  12.2,  AWR  framework  enhanced  to  support  capture  of  remote  snapshots  from  any  generic  database  including  Ac?ve  Data  Guard  (ADG)  databases.          •  A  target  catalog  database  collects  snapshots  from  the  remote  databases  (sources)  •  Snapshots  can  be  collected  automa?cally  or  manually    •  AWR  tables  on  the  catalog  database  accumulate  snapshot  data  from  all  sources  via  database  links  •  Source  databases  must  be  registered  on  the  catalog  via  new  DBMS_WORKLOAD_REPOSITORY.REGISTER_REMOTE_DATABASE  API  

 

48  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

AWR  Unified  Management  Framework  topology  

49  

Source  databases        

AcCve  Data  Guard      

Remote  AWR  Data  

Store  

Catalog  of  registered  remote  databases    

Remote  database  could  be  a  Primary  and  its  standbys    

or  any  other  generic  database      

DBID1   AWR  Data  

DBID2     AWR  Data  

ADG  

DB5  

Primary    

 db_link_to_sources  

 db_link_to_target  

DB1  

DB3   DB4  DB2  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Remote  Snapshot  Configura?on  for  ADG  Database    

50  

Primary    

Local  AWR  Data  

Catalog  database    

Remote  AWR  Data  

ADG  Reader  Farm      

Source  databases        

AcCve  Data  Guard       3.  Define  the  source  databases    

4.  Define  the  target  database    

5.  Create  the  topology  

6.  Register  the  source  databases  

7.  Register  the  source  databases  for    AWR  service    

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Remote  Snapshots:  Features    • Automated  snapshots  triggered  from  the  catalog  database  • Control  over  snapshot  interval  and  reten?on  period  per  database    • Container  database  support    • Create  snapshots  manually  on  demand  from  the  catalog  database  

– dbms_workload_repository.create_remote_snapshot(''TYPICAL'',  sourceid);  – Generate  AWR  report  from  catalog  by  running:  @?/rdbms/admin/awrrp?  .sql  

 

51  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

SQL  Tuning  Advisor  Support  for  Ac?ve  Data  Guard  • Problem  

– ADG  databases  are  widely  used  to  offload  repor?ng  or  ad  hoc  query-­‐only  jobs  from  primary  

– Repor?ng  workload  profile  is  different  from  primary  and  oVen  requires  tuning  

•  Solu?on  •  Oracle  Database  12.2  introduces  the  ability  to  tune  SQLs  workloads  running  on  ADG  database  •  All  SQL  Tuning  Advisor  tasks  issued  at  the  standby  

– Create  tuning  task,  execute  tuning  task  and  implement  SQL  Tuning  Advisor  recommenda?ons    – Test  execu?on  (heavy  liVing)  happens  on  standby,  only  minimal  write  related  ac?vity  on  primary  

•  The  required  data  for  the  above  tasks  are  fetched  from  primary  over  a  database  link  from  standby  •  Task  details  and  tuning  results  are  stored  at  primary  and  the  essen?al  data  required  to  construct  the  report  is  accessed  remotely  from  primary    

•  The  report  is  constructed  locally  at  the  standby,  with  no  CPU  overhead  in  primary  

52  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

SQL  Tuning  Advisor  Support  for  Ac?ve  Data  Guard  

Primary     Standby    

dblink_to_primary  

create  tuning  task  execute  tuning  task  report  tuning  task  implement  recommendaCons    

–  All  changes  are  done  on  primary  and  propagated  from  primary  to  standby  by  redo  apply  –  The  data  required  for  running  the  tuning  tasks  are  fetched  from  the  primary    –  Support  for  PDB  level  tuning    –  Test  execu?on  (heavy  liVing)  happens  on  standby,  only  minimal  write  related  ac?vity  on  primary  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   54  

Create  SQL  Tuning  Advisor  Support  for  Ac?ve  Data  Guard  

Primary     Standby    

dblink_to_primary   1a.  create_tuning_task  :  create  a  tuning  task    

1b.  Write  data  about  the  task  

AcCve  Data  Guard      

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   55  

Execute  SQL  Tuning  Advisor  Support  for  Ac?ve  Data  Guard  

Primary     Standby    

dblink_to_primary  

2a.  execute_tuning_task  :  Fetch  data  from    primary    to  execute  a  task      2b.  Execute  tuning  analysis  process  

2c.  Write  tuning  results  to  disk  

AcCve  Data  Guard      

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   56  

Report  then  Implement  the  RecommendaCons  SQL  Tuning  Advisor  Support  for  Ac?ve  Data  Guard  

Primary     Standby    

dblink_to_primary  

3a.  report_tuning_task:  Fetch  data  from    primary    to  produce  and  create  a  tuning  report          

3c.  Write  accepted  profile  results  to  disk    

3b.  Execute:  accept_sql_profile    

3d.  Accepted  profile  available  via  redo  apply    

AcCve  Data  Guard      

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Oracle  Data  Guard  

•  Session  Draining  support  with  the  Broker  • Preserving  Applica?on  Connec?ons  to  An  Ac?ve  Data  Guard  Standby  During  Role  Changes  

    57  

Transparent  Client  ConnecCon  Failover  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Session  Draining  support  with  the  Broker  

•  Session  Draining  works  with  the  Oracle  Drivers  today  in  both  Oracle  Database  11g  Release  2  and  Oracle  Database  12c  Release  1.  – But  it  is  a  manual  process  

•  srvctl  stop  services  on  primary  site  &  allow  drain  •  Data  Guard  switchover  (Broker  or  SQL*Plus)  •  New  primary  database  open,  srvctl  start  service,  rebalance  

•  In  Oracle  Database  12c  Release  2  the  Data  Guard  Broker  will  take  over  the  session  draining  so  the  above  becomes  one  command.  

    58  

DGMGRL> switchover to BOS1 wait;

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Preserving  Ac?ve  Data  Guard  Applica?on  Connec?ons  

• Preserve  sessions  on  Ac?ve  Data  Guard  during  failover/switchover  

• Drama?cally  improve  the  user  experience  – Users  stay  connected,  no  disrup?on  – Reduces  concern  for  reconnect  storm  aVer  failover  

• Automa?c,  nothing  to  set  up.  – Services  need  to  be  configured  correctly  

    59  

Read/Write   Read  

Read/Write  

AcCve  Data  Guard  Standby  

Primary  Failed  Primary  

Primary  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Protec?on  ProtecCng  your  data  to  the  max!  

60  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Increase  your  Data  Protec?on  with  Data  Guard  Release  12.2  • Automa?c  Password  File  management  •  Easy  repair  of  No  Logging  opera?ons  • Data  File  Block  Comparison  between  Primary  and  Standby  • Mul?ple  FSFO  Targets    and  Observers  •  FSFO  in  Maximum  Protec?on  mode  •  Zero  Data  Loss  Failovers  in  any  mode  with  Storage  Failures  • More  protec?on  with  Auto  Block  repair  enhancements  •  Enhanced  control  of  Alternate  des?na?ons  • Convert  to  TDE  easily  with  likle  or  no  down?me  

61  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Data  Guard  and  No  Force  Logging  

• No-­‐Logging  opera?ons  only  generate  enough  redo  to  tell  the  standby  that  some  blocks  are  now  unrecoverable.  – Repairing  them  meant  restoring  the  complete  affected  data  files.  

• No-­‐Logging  blocks  will  be  tracked  by  the  Primary  database  •  Standbys  can  then  be  easily  repaired  using  RMAN    

– Valida?on  and  repair  only  of  blocks  on  standby  that  were  invalidated  by  non-­‐logged  opera?ons  (such  as  direct  loads)  on  the  primary  

– This  will  query  the  Primary  for  block  loca?ons  that  contain  non-­‐logged  blocks  and  repair  the  standby  database.  

    62  

rman validate/recover .. nonlogged block

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Oracle  Data  Guard  Database  Compare  

• High  speed  database  compare  between  primary  and  standby  – Detects  latent  corrup?ons  on  blocks  that  have  not  been  touched  by  Oracle  

•  Useful  in  detec?ng  latent  corrup?ons,  lost  writes  •  Fast  compare  at  physical  level,  accounts  for  blocks  being  modified  •  Network  &  compute  efficiency  

– Send  &  compare  blocks  in  “batches”  – Op?mizes  for  blocks  where  versions  are  the  same  –  Ignores  empty  blocks  

    63  

DGMGRL> validate database bos1 datafile 10 output=checkBOS1; Operation requires a connection to database "bos1" Connecting ... Output files are created in /…/BOS1/trace on host “Boston1"

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |       64  

Oracle  Data  Guard  Database  Compare  Summary: *************************************************************************** ID: Block Type Id TOTAL: Total number of blocks found DIFFV: Number of block pairs with different version LWLOC: Lost Writes at Local LWRMT: Lost Writes at Remote SAMEV: Number of block pairs with same version SAMEV&C: Number of block pairs with same version and checksum DIFFPAIR: Number of block pairs with same version but different contents ENCERR: Undecided blocks related to encryption/decrytion error. e.g. Wallet is not open. SKIPPED: Skipped blocks due to data corruption, etc ID TOTAL DIFFV LWLOC LWRMT SAMEV SAMEV&C DIFFPAIR ENCERR SKIPPED 29 0000001 0000000 0000000 0000000 0000001 0000001 0000000 0000000 0000000 30 0000125 0000000 0000000 0000000 0000125 0000125 0000000 0000000 0000000 58 0000512 0000512 0000000 0000000 0000000 0000000 0000000 0000000 0000000

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

TDE  Tablespace  Conversion    

• Requires  an  Export  and  Import  to  encrypt  • Cannot  be  done  online  so  data  is  unavailable  during  the  process  • Outage  for  the  data  can  be  mi?gated  by  using  a  Transient  Logical  Standby  

– Convert  a  Physical  Standby  to  a  Transient  Logical  Standby  •  Export  the  data,  Create  the  encrypted  tablespace,  Import  the  data  at  the  transient  logical  standby  

– Switchover  – At  hkp://www.oracle.com/goto/maa  see  these  two  papers  

•  Conver?ng  to  Transparent  Data  Encryp?on  Using  Ac?ve  Data  Guard  12c  (DBMS_ROLLING)  •  Conver?ng  to  Transparent  Data  Encryp?on  Using  Data  Guard  Transient  Logical  Standby  with  Oracle  Database  11g    

    65  

Today  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

TDE  Tablespace  Conversion    

• New  simple  SQL  command  to  encrypt  data  files  in  place  

• Data  is  s?ll  unavailable  during  conversion  • Outage  for  the  data  can  be  mi?gated  by  using  a  Physical  Standby!  

– Stop  Redo  Apply,  execute  the  command,  Restart  Redo  Apply  •  To  encrypt  SYSTEM  and  SYSAUX  the  standby  must  also  be  in  MOUNT  mode  

– Switchover  – Repeat  steps  on  new  Physical  Standby  (Original  Primary)  

• Backport  available  for  11.2  and  12.1       66  

Tomorrow  

alter database datafile '+DATA/BOS/DATAFILE/users01.dbf' encrypt;

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

TDE  Tablespace  Conversion    

•  Tomorrow’s  (çprevious  slide)  offline  data  file  method  s?ll  available  – Complete  with  Physical  Standby  method  

• A  new  SQL  command  will  arrive  on  the  scene!  

•  Encrypts  all  data  files  in  the  tablespace  online.  – Primary  only  &  Requires  auxiliary  disk  space  

• Can  also  be  done  OFFLINE  for  beker  performance    – No  Extra  storage,  but  requires  data  outage  on  Primary.  – Offline  can  be  done  on  a  Physical  Standby  first  as  with  the  previous  example  

    67  

Future  (12.2  only)  

alter tablespace users encryption encrypt

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

A  look  at  another  customer  Implemented  Oracle  Data  Guard  Far  Sync  to  achieve  Zero  Data  Loss  over  1340+  Miles  

68  

Oracle Active data Guard 12C

Mr. Alok Khanna – ED IS Mr. Deepak Agarwal – GM COIS Mr. Rajan Wahal – CM COIS Mr. Narinder Kumar – CM COIS Mr. Manish Srivastava – Sr Mgr COIS Mr. Vikas Srivastava – Sr Mgr COIS Mr. Lokesh Rana – Mgr COIS Corporate Information Systems, IOCL,Gurgaon

Business Continuity Architecture (Previous)

Standby Database Server(Bangalore)

SAP Application

Servers

Primary Database Server(CBTC)

DB

Managed Recovery

Archived Logs

DB

Archived Logs

Online Logs

DB

Archived Logs

Standby Redo Logs

Standby Database Server(NRS)

WAN File Based Log Shipping

DataGuard Services

Corporate Information Systems, IOCL,Gurgaon

Current Architecture

ORACLE ACTIVE DATA GUARD (FIBRE CHANNEL; BW=60Mbps)

OLTP Database Size 9.13TB

Redo generation Rate

6.24MB/s

RedoLog Size*Number of redo logs

2GB*8

Redo Transport Compression ratio

75-80%

DB_LOST_WRITE_PROTECT

FULL

Corporate Information Systems, IOCL,Gurgaon

Oracle ADG Solution

Corporate Information Systems, IOCL,Gurgaon

Fast Sync Async

Priority Route Alternate Route

Primary

Far Sync A

Standby Database

Far Sync B

CDC, Gurgaon NRS, Gurgaon RBCSC, Bengaluru

Switchover

Priority Route Alternate Route

Async

Far Sync A

Far Sync B

Far Sync A is active

Max Availability

Corporate Information Systems, IOCL,Gurgaon

Benefits Obtained

Corporate Information Systems, IOCL,Gurgaon

v Near zero lag between Primary and Remote site separated by 2000 kms

v Best Data Protection v Automatic Block Repair – High Availability v Redo transport Compression v Simplification of BCP Process

Thank You

Corporate Information Systems, IOCL,Gurgaon

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

•  Ease  of  use  –  Use  DBCA  and  EMCLI  to  create  Standbys  –  Use  RMAN  and  Enterprise  Manager  to  create  Far  Sync  

Instances  in  addi?on  to  Standbys  –  Rest  Interface  to  the  Data  Guard  Broker  –  Chef  tools  to  create  and  manage  Data  Guard  standbys  –  Puang  the  FSFO  Observer  in  the  Background  –  Scrip?ng  with  the  Broker  DGMGRL    command  line  interface    

•  Speed  up  Performance  and  Role  Changes  –  Use  the  In  Memory  Column  Store  on  your  Standby  –  Use  AWR  and  SQL  Tuning  Advisor  to  diagnose  and  tune  

Redo  Apply  and  Query  issues  on  your  Ac?ve  Data  Guard  Standby  

–  Move  users  transparently  during  role  change  with  Session  Draining  on  the  Primary  and  Preserving  exis?ng  connec?ons  at  the  Ac?ve  Data  Guard  Standby  

76  

•  More  power  to  use  Data  Guard  –  Using  all  your  Standby  Instance  to  apply  redo  –  Easily  crea?ng  Subset  Standby  databases  in  Mul?tenant  –  Data  Guard  Broker  Support  and  involvement  in  

DBMS_ROLLING  controlled  rolling  upgrades    –  Migrate  and  Failover  PDBs  with  the  Broker  

•  Increase  your  Data  Protec?on  –  Automa?c  Password  File  management  –  Easy  repair  of  No  Logging  opera?ons  –  Data  File  Block  Comparison  between  Primary  and  Standby  –  Mul?ple  FSFO  Targets    and  Observers  –  FSFO  in  Maximum  Protec?on  mode  –  Zero  Data  Loss  Failovers  in  any  mode  with  Storage  Failures  –  More  protec?on  with  Auto  Block  repair  enhancements  –  Enhanced  control  of  Alternate  des?na?ons  –  Convert  to  TDE  easily  with  likle  or  no  down?me  

Data  Guard  Release  12.2  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Q  &  A  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Safe  Harbor  Statement  The  preceding  is  intended  to  outline  our  general  product  direc?on.  It  is  intended  for  informa?on  purposes  only,  and  may  not  be  incorporated  into  any  contract.  It  is  not  a  commitment  to  deliver  any  material,  code,  or  func?onality,  and  should  not  be  relied  upon  in  making  purchasing  decisions.  The  development,  release,  and  ?ming  of  any  features  or  func?onality  described  for  Oracle’s  products  remains  at  the  sole  discre?on  of  Oracle.  

78  

Copyright  ©  2016,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   79